/* ==========================================================================
   Fome Producciones — hoja de estilos
   Mobile-first · sin frameworks · fuente Quicksand alojada localmente
   ========================================================================== */

@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/quicksand-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --gold: #ddac6a;
  --gold-dark: #b68b52;
  --gold-soft: #f3dfc0;
  --slate: #393d4c;
  --slate-dark: #2b2e3a;
  --gray: #6a6777;
  --gray-light: #9490a0;
  --line: #e4e2e0;
  --bg-soft: #f6f6f6;
  --white: #fff;
  --wa: #25d366;

  --font: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 35px rgba(57, 61, 76, .14);
  --header-h: 136px;
  --container: 1200px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 112px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.7;
  color: var(--gray);
  background: var(--white);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--gold-dark); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 860px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 300; background: var(--white); color: var(--slate); padding: .6rem 1rem; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 1rem; }

h1, h2, h3 { font-weight: 600; line-height: 1.15; color: var(--slate); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.4rem); }

.section { padding-block: clamp(3.5rem, 8vw, 7rem); position: relative; }
.section__head { text-align: center; max-width: 780px; margin: 0 auto clamp(2rem, 5vw, 3.5rem); }
.section__head h2 { margin-bottom: 1rem; }
.section__head--light h2 { color: var(--white); }
.section__head--light p { color: #d8d6e0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .75rem 1.6rem; border: 0; border-radius: 6px;
  font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  transition: transform .2s, box-shadow .2s, background-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--slate-dark); box-shadow: 0 6px 18px rgba(182, 139, 82, .35); }
.btn--gold:hover { background: #e7b977; }
.btn--gold[disabled] { background: #e6e3df; color: #9a97a3; box-shadow: none; cursor: not-allowed; transform: none; }
.btn--dark { background: #000; color: var(--white); padding: 0; overflow: hidden; gap: 0; }
.btn--dark .btn__ico { display: grid; place-items: center; width: 48px; align-self: stretch; background: var(--gold); color: var(--slate-dark); }
.btn--dark .btn__txt { padding: .75rem 1.5rem; }
.btn--dark:hover { background: var(--slate); }
.btn--ghost { background: rgba(255, 255, 255, .18); color: var(--white); border: 2px solid rgba(255, 255, 255, .85); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: var(--white); color: var(--slate); }
.btn--sm { min-height: 40px; padding: .5rem 1.1rem; font-size: .72rem; }
.btn--block { width: 100%; }

/* ---------- Cabecera ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; transition: background-color .3s, box-shadow .3s; }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; transition: min-height .3s; }
.brand { display: block; line-height: 0; }
.brand__logo { width: auto; height: 124px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .18)); }
.brand__logo--compact { display: none; height: 92px; }
.site-header.is-scrolled .header__inner, .site-header.is-solid .header__inner, .site-header.nav-open .header__inner { min-height: 108px; }
.site-header.is-scrolled, .site-header.is-solid, .site-header.nav-open { background: rgba(57, 61, 76, .97); box-shadow: 0 4px 24px rgba(0, 0, 0, .18); }
.site-header.is-scrolled .brand__logo--full, .site-header.is-solid .brand__logo--full, .site-header.nav-open .brand__logo--full { display: none; }
.site-header.is-scrolled .brand__logo--compact, .site-header.is-solid .brand__logo--compact, .site-header.nav-open .brand__logo--compact { display: block; }

.nav-toggle { display: none; width: 46px; height: 46px; border: 0; border-radius: 10px; background: rgba(0, 0, 0, .25); position: relative; }
.js .nav-toggle { display: block; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { position: absolute; left: 12px; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .25s, opacity .25s; content: ""; }
.nav-toggle__bars { top: 22px; }
.nav-toggle__bars::before { left: 0; top: -7px; }
.nav-toggle__bars::after { left: 0; top: 7px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

.nav__list { display: flex; flex-direction: column; gap: .25rem; }
.nav a:not(.btn) { display: block; padding: .8rem 0; color: var(--white); text-decoration: none; font-weight: 600; font-size: .95rem; letter-spacing: .03em; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: .45rem; width: 0; height: 2px; background: var(--gold); transition: width .25s; }
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { width: 100%; }

@media (max-width: 1000px) {
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: rgba(57, 61, 76, .98); padding: .5rem var(--gutter) 1.5rem; box-shadow: 0 18px 30px rgba(0, 0, 0, .25); max-height: calc(100dvh - 108px); overflow-y: auto; }
  .js .nav { display: none; }
  .js .nav-open .nav { display: block; }
  .nav__list > li { border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .nav__cta { border: 0 !important; padding-top: 1rem; }
  .nav__cta .btn { width: 100%; }
}
@media (min-width: 1001px) {
  .js .nav-toggle { display: none; }
  .nav__list { flex-direction: row; align-items: center; gap: clamp(1rem, 2vw, 2.2rem); }
  .nav a:not(.btn) { padding: .5rem 0; font-size: .88rem; }
  .nav__cta { margin-left: .5rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; flex-direction: column; min-height: 0; background: linear-gradient(135deg, #de9a35 0%, #f6bd4c 55%, #fdd070 100%); color: var(--white); overflow: hidden; isolation: isolate; }
.hero__media { order: 2; position: relative; z-index: 0; height: clamp(300px, 92vw, 480px); margin-top: 1.5rem; }
.hero__media img { position: absolute; right: 0; bottom: 0; width: auto; height: 100%; max-width: 100%; object-fit: contain; object-position: right bottom; }
.hero__inner { padding-top: calc(var(--header-h) + 1.5rem); }
.hero__text { max-width: 640px; text-align: left; }
.hero h1 { color: var(--white); font-size: clamp(1.9rem, 1.1rem + 4vw, 3.6rem); font-weight: 600; line-height: 1.15; text-shadow: 0 2px 18px rgba(57, 61, 76, .45); }
.hero h1 span { display: block; margin-top: .4rem; font-weight: 500; font-size: .72em; opacity: .95; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: clamp(1.5rem, 4vw, 2.6rem); }

@media (min-width: 600px) and (max-width: 900px) {
  .hero { flex-direction: row; align-items: flex-end; min-height: 640px; }
  .hero__inner { flex: 1.25; align-self: center; padding-bottom: 3rem; min-width: 0; }
  .hero__media { flex: 1; height: min(640px, 82vw); margin: 0; align-self: flex-end; }
}
@media (min-width: 901px) {
  .hero { flex-direction: row; align-items: center; min-height: clamp(600px, 52.4vw, 1000px); }
  .hero__media { position: absolute; inset: 0; z-index: -1; height: auto; margin: 0; }
  .hero__media img { inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: right center; }
  .hero__inner { padding-bottom: 3rem; }
  .hero__text { text-align: center; margin-inline: 0; max-width: 700px; }
  .hero__actions { justify-content: center; }
}
@media (min-width: 1500px) { .hero__text { margin-left: 4vw; } }


/* ---------- Newsletter ---------- */
.newsletter { background: var(--slate) linear-gradient(115deg, transparent 0 30%, rgba(255, 255, 255, .04) 30% 55%, transparent 55% 70%, rgba(255, 255, 255, .05) 70%); color: var(--white); padding-block: clamp(2.2rem, 5vw, 3.4rem); }
.newsletter__inner { display: grid; gap: 1.4rem; align-items: center; text-align: center; }
.newsletter h2 { color: var(--white); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem); }
.newsletter p { color: #c9c7d3; }
.inline-form { display: grid; gap: .8rem; }
.inline-form input[type="email"] { min-height: 52px; padding: .7rem 1.1rem; border-radius: 6px; border: 2px solid transparent; background: var(--white); color: var(--slate); }
.inline-form input[type="email"]:focus { border-color: var(--gold); outline: 0; }
.newsletter .form-msg { color: var(--gold-soft); }
@media (min-width: 800px) {
  .newsletter__inner { grid-template-columns: 1fr minmax(380px, 1fr); text-align: left; gap: 3rem; }
  .inline-form { grid-template-columns: 1fr auto; }
  .inline-form .form-msg { grid-column: 1 / -1; }
}

/* ---------- El origen ---------- */
.origin { background: linear-gradient(180deg, #fff 0 55%, #f7f7f7 55%); }
.origin__grid { display: grid; gap: 2rem; align-items: center; }
.origin__photo { max-width: 340px; margin-inline: auto; }
.origin__photo img { width: 100%; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .22)); }
.origin__text h2 { margin-bottom: 1.2rem; font-weight: 500; }
.origin__text p { max-width: 62ch; }
.origin__text strong { color: var(--slate); }
@media (min-width: 800px) {
  .origin__grid { grid-template-columns: minmax(260px, 5fr) 7fr; gap: clamp(2rem, 6vw, 6rem); }
  .origin__photo { max-width: 440px; }
}

/* ---------- Servicios ---------- */
.services { background: var(--slate) linear-gradient(115deg, transparent 0 22%, rgba(0, 0, 0, .12) 22% 40%, transparent 40% 58%, rgba(255, 255, 255, .05) 58% 78%, rgba(255, 255, 255, .1) 78%); }
.services__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.4rem, 3vw, 2.4rem) 1rem; }
.service { text-align: center; }
.service__icon { display: grid; place-items: center; width: clamp(70px, 14vw, 92px); aspect-ratio: 1; margin: 0 auto 1rem; border: 2px solid rgba(255, 255, 255, .3); border-radius: 50%; color: #d8d6e0; transition: border-color .25s, color .25s, transform .25s, background-color .25s; }
.service__icon .icon { width: 42%; height: 42%; }
.service:hover .service__icon { border-color: var(--gold); color: var(--gold); transform: translateY(-4px); background: rgba(221, 172, 106, .08); }
.service h3 { color: var(--white); font-size: 1rem; font-weight: 600; letter-spacing: .02em; }
.service p { margin-top: .35rem; font-size: .88rem; line-height: 1.5; color: #aeabbb; max-width: 24ch; margin-inline: auto; }
@media (min-width: 700px) { .services__grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Portafolio (vista previa) ---------- */
.portfolio-preview { background: var(--white); padding-top: clamp(4rem, 8vw, 7rem); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: 2.4rem; }
.tile { position: relative; overflow: hidden; border-radius: 10px; aspect-ratio: 1; background: #eee; }
.tile__link { display: block; height: 100%; color: inherit; text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile__cap { position: absolute; inset: auto 0 0 0; padding: 2.5rem .9rem .8rem; display: flex; flex-direction: column; color: var(--white); background: linear-gradient(to top, rgba(30, 32, 42, .85), transparent); line-height: 1.25; }
.tile__cap small { font-size: .78rem; opacity: .85; }
.tile:hover img, .tile__link:focus-visible img { transform: scale(1.07); }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }

/* ---------- Pack Pymes ---------- */
.pack { position: relative; isolation: isolate; background: linear-gradient(135deg, #e5a03c, #f9b947); padding-block: clamp(3.5rem, 8vw, 7rem); overflow: hidden; }
.pack__media { position: absolute; inset: 0; z-index: -1; display: none; }
.pack__media img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.pack__inner { position: relative; z-index: 2; }
.pack .section__head p { text-shadow: 0 1px 8px rgba(120, 70, 0, .35); color: var(--white); }
.price-card { max-width: 560px; margin-inline: auto; background: var(--white); border-radius: 6px; border-top: 10px solid var(--gold); box-shadow: 0 24px 60px rgba(60, 40, 0, .3); padding: clamp(1.5rem, 4vw, 2.4rem); }
.price-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 1.2rem; border-bottom: 4px dotted #e3e1de; }
.price-card h3 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); font-weight: 500; }
.price-card__price { color: var(--gold); font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.2rem); font-weight: 600; }
.price-card__price span { font-size: 1.5em; line-height: 1; }
.checklist { display: grid; gap: .9rem; padding-block: 1.4rem; }
.checklist li { display: flex; align-items: center; gap: .8rem; color: var(--gray); }
.checklist .icon { width: 1.7rem; height: 1.7rem; padding: .32rem; border-radius: 50%; background: var(--gold); color: var(--white); stroke-width: 3; }
.price-card__note { padding-top: 1.1rem; margin-bottom: 1.4rem; border-top: 1px solid var(--line); font-size: .82rem; line-height: 1.6; color: var(--gray-light); }
.price-card__note b { color: var(--slate); }
@media (min-width: 901px) {
  .pack__media { display: block; }
  .pack__inner { padding-right: clamp(var(--gutter), 20vw, 380px); }
}

/* ---------- Agenda / reservas ---------- */
.agenda { background: var(--bg-soft); }
.booking { display: grid; gap: 1.5rem; max-width: 1080px; margin-inline: auto; }
.booking__pick, .booking__form { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.1rem, 3vw, 2rem); }
.booking__pick { display: grid; gap: 1.6rem; align-content: start; }
.booking__form h3 { font-size: 1.4rem; margin-bottom: .4rem; }
.booking__summary { margin-bottom: 1.1rem; padding: .7rem .9rem; border-radius: 8px; background: var(--bg-soft); font-size: .92rem; line-height: 1.45; }
.booking__summary.is-set { background: #fbf2e2; color: var(--slate); border-left: 4px solid var(--gold); }


.cal { width: 100%; max-width: 460px; margin-inline: auto; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.cal__title { font-size: 1.2rem; }
.cal__title::first-letter, .slots__title::first-letter, .booking__summary strong::first-letter { text-transform: uppercase; }
.cal__nav { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--slate); transition: background-color .2s, border-color .2s; }
.cal__nav:hover:not([disabled]) { background: var(--gold-soft); border-color: var(--gold); }
.cal__nav[disabled] { opacity: .35; cursor: not-allowed; }
.cal__dow, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { margin-bottom: 4px; text-align: center; font-size: .78rem; font-weight: 700; color: var(--gray-light); }
.cal__day { aspect-ratio: 1; display: grid; place-items: center; min-height: 40px; border: 2px solid transparent; border-radius: 10px; background: transparent; color: var(--slate); font-weight: 600; font-size: .95rem; transition: background-color .15s, border-color .15s; }
.cal__day:hover:not([disabled]) { background: var(--gold-soft); }
.cal__day[disabled] { color: #c3c1c9; cursor: not-allowed; font-weight: 500; }
.cal__day.is-today { border-color: var(--line); }
.cal__day.is-selected { background: var(--gold); border-color: var(--gold); color: var(--slate-dark); }
.cal__blank { visibility: hidden; }

.slots__title { font-size: 1.1rem; margin-bottom: .8rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: .5rem; min-height: 48px; }
.slot { min-height: 44px; border: 2px solid var(--gold); border-radius: 999px; background: var(--white); color: var(--slate); font-weight: 700; font-size: .92rem; transition: background-color .15s, color .15s; }
.slot:hover { background: var(--gold-soft); }
.slot.is-selected { background: var(--slate); border-color: var(--slate); color: var(--white); }
.slots__empty { grid-column: 1 / -1; font-size: .92rem; color: var(--gray-light); }
.tz-note { margin-top: .9rem; font-size: .8rem; color: var(--gray-light); }

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .35rem; font-size: .85rem; font-weight: 700; color: var(--slate); }
.field abbr { text-decoration: none; color: var(--gold-dark); }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: .7rem .9rem; border: 1.5px solid #d9d7d5; border-radius: 8px; background: var(--white); color: var(--slate); font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(221, 172, 106, .25); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #d0493f; }

.form-msg { margin-top: .9rem; min-height: 1.2em; font-size: .92rem; font-weight: 600; }
.form-msg.is-ok { color: #2e7d4f; }
.form-msg.is-error { color: #b3372d; }
.form-msg a { font-weight: 700; }
.booking__success { text-align: center; padding: 2rem 1rem; }
.booking__success h3 { margin-bottom: .6rem; }

@media (min-width: 640px) and (max-width: 959px) {
  .booking__pick { grid-template-columns: minmax(300px, 400px) 1fr; gap: 2rem; }
  .cal { margin-inline: 0; }
}
@media (min-width: 960px) {
  .booking { grid-template-columns: 1.1fr .9fr; align-items: start; }
  .booking__pick { grid-template-columns: 1fr; }
}

/* ---------- Contacto ---------- */
.contact { background: var(--white); }
.card-form { background: #f5f5f5; border: 1px solid #ececec; border-radius: var(--radius); padding: clamp(1.2rem, 4vw, 2.6rem); }
.card-form .btn { min-width: 220px; }

/* ---------- CTA final ---------- */
.cta { position: relative; isolation: isolate; text-align: center; color: var(--white); padding-block: clamp(3rem, 7vw, 5.5rem); background: linear-gradient(120deg, #4aa8bd, #9fdbe0); overflow: hidden; }
.cta__media { position: absolute; inset: 0; z-index: -1; }
.cta__media img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.cta__inner { position: relative; }
.cta h2 { color: var(--white); font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3rem); text-shadow: 0 2px 14px rgba(20, 70, 90, .45); }
.cta p { margin-top: .6rem; color: var(--white); text-shadow: 0 1px 8px rgba(20, 70, 90, .45); }
.cta__mail { display: inline-block; margin-top: .4rem; padding: .5rem 1.2rem; border-radius: 999px; background: rgba(0, 0, 0, .35); color: var(--white); font-weight: 700; text-decoration: none; text-shadow: none; }
.cta__mail:hover { background: rgba(0, 0, 0, .55); }
.cta--plain { background: var(--slate); }
.cta--plain h2, .cta--plain p { text-shadow: none; }

/* ---------- Pie ---------- */
.site-footer { background: #000; color: #9a98a5; font-size: .85rem; padding-block: 1.4rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.social { display: flex; gap: 1.2rem; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; color: var(--gold); transition: transform .2s, color .2s; }
.social a:hover { color: var(--white); transform: translateY(-3px); }
.social .icon { width: 24px; height: 24px; }

/* ---------- WhatsApp flotante ---------- */
.wa { position: fixed; z-index: 150; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: .8rem; pointer-events: none; }
.wa > * { pointer-events: auto; }
.wa__btn { position: relative; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--wa); color: var(--white); box-shadow: 0 8px 24px rgba(0, 0, 0, .3); transition: transform .2s; }
.wa__btn .icon { width: 34px; height: 34px; }
.wa__btn:hover { transform: scale(1.08); }
.wa__btn::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--wa); z-index: -1; animation: wa-pulse 2.4s ease-out infinite; }
.wa__bubble { position: relative; max-width: 220px; padding: .7rem 1rem; border-radius: 14px; background: var(--white); color: var(--slate); font-size: .88rem; line-height: 1.35; box-shadow: 0 8px 26px rgba(0, 0, 0, .22); opacity: 0; transform: translateX(14px) scale(.96); visibility: hidden; transition: opacity .35s, transform .35s, visibility .35s; }
.wa__bubble::after { content: ""; position: absolute; right: -6px; top: 50%; width: 14px; height: 14px; background: var(--white); transform: translateY(-50%) rotate(45deg); }
.wa__bubble.is-visible { opacity: 1; transform: none; visibility: visible; }
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(1.7); opacity: 0; } }
@media (max-width: 480px) { .wa__bubble { max-width: 180px; font-size: .82rem; } .wa__btn { width: 58px; height: 58px; } }

/* ---------- Animación de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.services__grid .reveal:nth-child(4n+2) { transition-delay: .08s; }
.services__grid .reveal:nth-child(4n+3) { transition-delay: .16s; }
.services__grid .reveal:nth-child(4n+4) { transition-delay: .24s; }

/* ==========================================================================
   Página Portafolio
   ========================================================================== */
.page-hero { background: var(--slate) linear-gradient(115deg, transparent 0 22%, rgba(0, 0, 0, .12) 22% 40%, transparent 40% 62%, rgba(255, 255, 255, .06) 62%); padding: calc(var(--header-h) + clamp(2rem, 5vw, 4rem)) 0 clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.page-hero h1 { color: var(--white); font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.2rem); margin-bottom: 1rem; }
.page-hero p { color: #d3d1dc; }
.breadcrumb { margin-bottom: 1rem; font-size: .85rem; color: #aeabbb; }
.breadcrumb a { color: var(--gold); }

.gallery { padding-top: clamp(2rem, 5vw, 3.5rem); }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-bottom: clamp(1.5rem, 4vw, 2.6rem); }
.chip { min-height: 42px; padding: .45rem 1.1rem; border: 2px solid var(--line); border-radius: 999px; background: var(--white); color: var(--slate); font-weight: 700; font-size: .88rem; transition: background-color .2s, border-color .2s, color .2s; }
.chip:hover { border-color: var(--gold); }
.chip.is-active { background: var(--slate); border-color: var(--slate); color: var(--white); }

.works { column-count: 1; column-gap: 1rem; }
.work { break-inside: avoid; margin-bottom: 1rem; }
.work[hidden] { display: none !important; }
.work__link { position: relative; display: block; overflow: hidden; border-radius: 10px; background: #eee; color: inherit; text-decoration: none; }
.work img { width: 100%; height: auto; transition: transform .5s ease; }
.work__cap { position: absolute; inset: auto 0 0 0; padding: 3rem 1rem .9rem; display: flex; flex-direction: column; color: var(--white); line-height: 1.25; background: linear-gradient(to top, rgba(30, 32, 42, .88), transparent); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.work__cap small { font-size: .8rem; opacity: .85; }
.work__link:hover img, .work__link:focus-visible img { transform: scale(1.05); }
.work__link:hover .work__cap, .work__link:focus-visible .work__cap { opacity: 1; transform: none; }
@media (hover: none) { .work__cap { opacity: 1; transform: none; } }
@media (min-width: 520px) { .works { column-count: 2; } }
@media (min-width: 800px) { .works { column-count: 3; } }
@media (min-width: 1200px) { .works { column-count: 4; } }

.editorial { background: var(--bg-soft); }
.editorial h2 { margin-bottom: 1rem; }
.flipbooks { display: grid; gap: clamp(2rem, 5vw, 3.5rem); max-width: 1040px; margin-top: clamp(2rem, 5vw, 3rem); }
.flipbook__title { margin-bottom: .9rem; font-size: 1.15rem; text-align: center; }
.flipbook__stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; min-height: 260px; padding: 1.5rem; border-radius: var(--radius); background: var(--slate) linear-gradient(115deg, transparent 0 30%, rgba(255, 255, 255, .05) 30% 55%, transparent 55%); text-align: center; }
.flipbook__alt { font-size: .9rem; }
.flipbook__alt a { color: var(--gold); }
.flipbook__stage.is-loaded { display: block; min-height: 0; padding: 0; background: none; }
.flipbook iframe { display: block; width: 100%; height: 600px; border: 1px solid lightgray; border-radius: var(--radius); background: #fff; }

.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(20, 22, 30, .95); color: var(--white); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(20, 22, 30, .8); }
.lightbox__fig { display: grid; justify-items: center; gap: .8rem; padding: 4.5rem 1rem 1.5rem; max-width: 100%; }
.lightbox__fig img { max-width: min(92vw, 1280px); max-height: 78dvh; width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox__fig figcaption { font-size: .95rem; text-align: center; color: #d7d5e0; }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: var(--white); transition: background-color .2s; }
.lightbox__btn:hover { background: var(--gold); color: var(--slate-dark); }
.lightbox__close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 10px; }
.lightbox__next { right: 10px; }
@media (max-width: 600px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 14px; transform: none; } }

/* ---------- Pantallas muy grandes (2K / 4K) ---------- */
@media (min-width: 1800px) {
  :root { --container: 1360px; }
  html { font-size: 112.5%; }
}
@media (min-width: 2500px) {
  :root { --container: 1560px; }
  html { font-size: 125%; }
}

/* ---------- Pantallas bajas en horizontal ---------- */

/* ---------- Preferencias de usuario ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .wa, .nav-toggle, .lightbox { display: none !important; }
}
