/* ============================================================================
   06-PAGES.CSS — Multi-page layer: HUD nav menu + inner pages
   (About · Services · FAQ · Contact). Loads on every page, after 01–05.
   Pure CSS, no dependencies. Mobile-first.
   ========================================================================== */

/* ---- HUD primary nav --------------------------------------------------- */
.hud { gap: 1rem; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav__list {
  display: flex; gap: 1.7rem; list-style: none; margin: 0; padding: 0;
}
.nav__list a {
  color: var(--c-paper); text-decoration: none;
  font-size: 0.72rem; font-weight: var(--fw-bold);
  letter-spacing: var(--ls-kicker); text-transform: uppercase;
  padding-bottom: 4px; border-bottom: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.nav__list a:hover,
.nav__list a:focus-visible,
.nav__list a[aria-current="page"] { color: var(--c-gold); border-color: var(--c-gold); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--c-paper-border);
  color: var(--c-paper); border-radius: var(--radius-pill);
  font-size: 0.64rem; font-weight: var(--fw-bold); letter-spacing: var(--ls-kicker);
  text-transform: uppercase; padding: 0.55rem 0.9rem; cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .nav {
    position: fixed; inset: 0 0 auto 0; top: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(7, 13, 29, 0.97);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: var(--border-hairline);
    padding: 5.5rem var(--gutter) 2rem;
    transform: translateY(-110%); transition: transform var(--t-med) var(--ease-out);
    z-index: -1;
  }
  .hud.is-open .nav { transform: translateY(0); }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list li { border-bottom: var(--border-hairline); }
  .nav__list a { display: block; padding: 1.05rem 0; font-size: 0.82rem; border: 0; }
  .nav .call { margin-top: 1.4rem; align-self: flex-start; }
}

/* ---- Inner-page shell -------------------------------------------------- */
.page-hero {
  position: relative; min-height: 62svh;
  display: flex; align-items: flex-end; overflow: hidden;
  padding: 7rem var(--gutter) clamp(2.5rem, 6vh, 4.5rem);
}
.page-hero__bg { position: absolute; inset: -8% 0; z-index: var(--z-scene-bg); }
.page-hero__bg picture { display: block; width: 100%; height: 100%; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__veil {
  position: absolute; inset: 0; z-index: var(--z-scene-veil);
  background: linear-gradient(180deg, rgba(7,13,29,0.72), rgba(7,13,29,0.86) 70%, var(--c-navy-black));
}
.page-hero__inner { position: relative; z-index: var(--z-scene-content); width: var(--container-act); margin-inline: auto; }
.page-hero h1 {
  font-family: var(--font-display); font-weight: var(--fw-semi);
  font-size: clamp(2.4rem, 6.5vw, 4.6rem); line-height: 1.04; color: var(--c-paper);
}
.page-hero h1 em { color: var(--c-gold); font-style: italic; }
.page-hero .kicker { display: block; margin-bottom: var(--space-sm); }
.page-hero p { color: var(--c-mist); max-width: 60ch; margin-top: var(--space-sm); font-size: var(--fs-sub); }

.section { padding: clamp(3.5rem, 8vh, 6rem) var(--gutter); }
.section--alt { background: #0A1326; }
.wrap { width: var(--container-act); margin-inline: auto; }
.wrap--narrow { max-width: 720px; }
.lead { font-size: var(--fs-sub); color: var(--c-paper); line-height: 1.7; }
.body-copy { color: var(--c-mist); }
.body-copy p { margin-bottom: var(--space-sm); max-width: 68ch; }
.section .kicker { display: block; margin-bottom: var(--space-sm); }
.section h2 {
  font-family: var(--font-display); font-weight: var(--fw-semi);
  font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; color: var(--c-paper);
  margin-bottom: var(--space-md);
}
.section h2 em { color: var(--c-gold); font-style: italic; }
.section h3 { font-family: var(--font-display); color: var(--c-paper); font-size: 1.5rem; margin-bottom: 0.5rem; }

/* ---- About: founder split --------------------------------------------- */
.split { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 860px) { .split { grid-template-columns: 0.85fr 1.15fr; } }
.founder-photo {
  width: 100%; border-radius: 6px; border: 1px solid var(--c-gold-line);
  background: linear-gradient(160deg, #16284E, #070D1D);
}
.founder-quote {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem); color: var(--c-paper); line-height: 1.4;
  border-left: 2px solid var(--c-gold); padding-left: var(--space-md); margin: var(--space-md) 0;
}
.cred-grid { display: grid; gap: var(--space-md); margin-top: var(--space-lg); }
@media (min-width: 700px) { .cred-grid { grid-template-columns: 1fr 1fr; } }
.cred-card { border: var(--border-hairline); border-radius: 4px; padding: var(--space-md); }
.cred-card h4 {
  font-size: var(--fs-micro); letter-spacing: var(--ls-wide); text-transform: uppercase;
  color: var(--c-gold); margin-bottom: var(--space-sm); font-weight: var(--fw-bold);
}
.cred-card ul { list-style: none; margin: 0; padding: 0; }
.cred-card li { color: var(--c-mist); padding: 0.35rem 0; font-size: 0.92rem; border-bottom: 1px dotted var(--c-dot-line); }
.cred-card li:last-child { border-bottom: 0; }

/* ---- Services: stacked cinematic scenes -------------------------------- */
.svc-scene {
  position: relative; min-height: 86svh; display: flex; align-items: center;
  overflow: hidden; border-bottom: var(--border-hairline);
}
.svc-scene__bg { position: absolute; inset: 0; z-index: var(--z-scene-bg); }
.svc-scene__bg picture { display:block; width:100%; height:100%; }
.svc-scene__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.28; }
.svc-scene__veil {
  position: absolute; inset: 0; z-index: var(--z-scene-veil);
  background: linear-gradient(90deg, var(--c-navy-black) 8%, rgba(7,13,29,0.78) 55%, rgba(7,13,29,0.45));
}
.svc-scene__inner { position: relative; z-index: var(--z-scene-content); width: var(--container-act); margin-inline: auto; padding: 4rem var(--gutter); }
.svc-scene__num {
  position: absolute; right: -1%; bottom: -8%; z-index: var(--z-scene-veil);
  font-family: var(--font-display); font-weight: var(--fw-semi);
  font-size: clamp(10rem, 26vw, 22rem); color: var(--c-blue-ghost); user-select: none;
}
.svc-scene h2 { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.22; }
/* Palabra de acento en dorado e itálica (igual que el home), con un respiro
   para que no quede pegada a la línea superior. */
.svc-scene h2 em { color: var(--c-gold); font-style: italic; display: inline-block; margin-top: .18em; }
.svc-list { list-style: none; margin: var(--space-md) 0 0; padding: 0; max-width: 60ch; }
.svc-list li {
  color: var(--c-mist); padding: 0.6rem 0 0.6rem 1.7rem; position: relative;
  border-bottom: 1px dotted var(--c-dot-line); font-size: 0.96rem;
}
.svc-list li::before { content: "▸"; position: absolute; left: 0; color: var(--c-gold); }
.svc-list b { color: var(--c-paper); font-weight: var(--fw-semi); }

/* ---- FAQ: native accordion -------------------------------------------- */
.faq-part { margin-bottom: var(--space-xl); }
.faq-part > .kicker { display: block; margin-bottom: var(--space-md); }
.faq {
  border-top: var(--border-hairline);
}
.faq details {
  border-bottom: var(--border-hairline);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1.2rem 2.5rem 1.2rem 0; position: relative;
  font-family: var(--font-display); font-size: 1.2rem; color: var(--c-paper);
  transition: color var(--t-fast);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.2rem; top: 1rem;
  color: var(--c-gold); font-size: 1.6rem; line-height: 1; transition: transform var(--t-fast);
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--c-gold); }
.faq__a { color: var(--c-mist); padding: 0 0 1.4rem; max-width: 75ch; line-height: 1.75; }
.faq__a ul { margin: 0.6rem 0 0 1.2rem; }
.faq__a li { padding: 0.2rem 0; }

/* ---- Contact ----------------------------------------------------------- */
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; } }
.contact-info dl { display: grid; gap: var(--space-md); margin: 0; }
.contact-info dt {
  font-size: var(--fs-micro); letter-spacing: var(--ls-wide); text-transform: uppercase;
  color: var(--c-gold); margin-bottom: 0.3rem; font-weight: var(--fw-bold);
}
.contact-info dd { color: var(--c-paper); margin: 0; font-size: 1.05rem; }
.contact-info dd a { color: var(--c-paper); text-decoration: none; }
.contact-info dd a:hover { color: var(--c-gold); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: var(--space-lg); align-items: stretch; }
/* Todos los botones de contacto con EXACTAMENTE el mismo tamaño y el de
   Instagram correctamente proporcionado/alineado (mismo padding y alto). */
.contact-actions .btn-marquee,
.contact-actions .btn-outline {
  margin: 0;
  flex: 1 1 0; min-width: 190px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1rem 1.8rem; font-size: 0.8rem; line-height: 1; text-align: center;
}
.btn-outline {
  display: inline-block; border: 1px solid var(--c-gold); color: var(--c-gold);
  text-decoration: none; font-weight: var(--fw-bold); font-size: 0.78rem;
  letter-spacing: var(--ls-kicker); text-transform: uppercase;
  padding: 0.9rem 1.6rem; border-radius: var(--radius-pill); transition: var(--t-fast);
}
.btn-outline:hover { background: var(--c-gold); color: var(--c-navy); }

.form { display: grid; gap: var(--space-sm); }
.form .row { display: grid; gap: var(--space-sm); }
@media (min-width: 620px) { .form .row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-size: var(--fs-micro); letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-mist); font-weight: var(--fw-bold);
}
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(159,176,204,0.25);
  border-radius: 4px; color: var(--c-paper); padding: 0.85rem 1rem;
  font-family: var(--font-sans); font-size: 0.95rem; width: 100%;
  transition: border-color var(--t-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--c-gold);
}
.field textarea { resize: vertical; min-height: 110px; }
.field select option { color: #111; }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--c-mist); font-size: 0.82rem; line-height: 1.5; }
.consent input { margin-top: 0.25rem; accent-color: var(--c-gold); }
.form .btn-marquee { justify-self: start; margin-top: 0.4rem; border: 0; cursor: pointer; }
.form__note { font-size: 0.78rem; color: var(--c-credit-dim); }

/* ---- Mini-CTA band reused on inner pages ------------------------------- */
.cta-band {
  text-align: center; padding: clamp(3.5rem, 8vh, 6rem) var(--gutter);
  background: radial-gradient(80% 120% at 50% 0%, #1E3563 0%, var(--c-navy) 45%, var(--c-navy-black) 100%);
}
.cta-band h2 { font-family: var(--font-display); font-weight: var(--fw-semi); font-size: clamp(1.8rem, 4.4vw, 3rem); color: var(--c-paper); margin-bottom: var(--space-sm); }
.cta-band h2 em { color: var(--c-gold); font-style: italic; }
.cta-band p { color: var(--c-mist); max-width: 52ch; margin: 0 auto var(--space-md); }
.cta-band .tel { display: inline-block; font-weight: var(--fw-black); font-size: clamp(1.4rem, 4vw, 2.2rem); color: var(--c-paper); text-decoration: none; letter-spacing: var(--ls-body); margin-bottom: var(--space-md); }
.cta-band .tel:hover { color: var(--c-gold); }

/* Reveal helper for inner pages (no GSAP dependency; simple) */
.up { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.up.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .up { opacity: 1; transform: none; } }

/* ============================================================================
   HUD UTILITIES — language toggle · Instagram · phone (Directives 3 & 4)
   ========================================================================== */
.hud__utils { display: flex; align-items: center; gap: 1.1rem; }
.lang-toggle {
  background: none; border: 1px solid var(--c-paper-border); color: var(--c-paper);
  border-radius: var(--radius-pill); cursor: pointer;
  font-family: var(--font-sans); font-size: 0.66rem; font-weight: var(--fw-bold);
  letter-spacing: var(--ls-kicker); text-transform: uppercase; padding: 0.5rem 0.8rem;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.lang-toggle:hover, .lang-toggle:focus-visible { color: var(--c-gold); border-color: var(--c-gold); }
.lang-toggle .on { color: var(--c-gold); }
.hud__ig {
  color: var(--c-paper); text-decoration: none; font-size: 0.7rem; font-weight: var(--fw-bold);
  letter-spacing: var(--ls-kicker); text-transform: uppercase; transition: color var(--t-fast);
}
.hud__ig:hover, .hud__ig:focus-visible { color: var(--c-gold); }

/* Suppress the Google Translate widget chrome (keeps the auto-translate, hides its UI) */
.goog-te-banner-frame, .skiptranslate iframe { display: none !important; }
body { top: 0 !important; }
#google_translate_element { display: none !important; }
.goog-tooltip, .goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

@media (max-width: 900px) {
  .nav .hud__utils { margin-top: 1.4rem; gap: 1.4rem; flex-wrap: wrap; }
}

/* ============================================================================
   HOME FINALE — Alex cutout beside the closing line (Directive 1)
   2 columns desktop · stacked (photo top) mobile · gold border + shadow
   ========================================================================== */
#finale .scene__content.finale-split {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; text-align: left;
}
.finale-text .kicker, .finale-text .gs-fade { text-align: left; }
.finale-photo { justify-self: center; }
.finale-photo img {
  width: min(360px, 80vw); height: auto; display: block;
  border: 1px solid var(--c-gold); border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.5), 0 0 40px rgba(242,176,30,0.12);
  background: linear-gradient(160deg, rgba(34,115,184,0.18), rgba(7,13,29,0.4));
}
@media (min-width: 860px) {
  #finale .scene__content.finale-split { grid-template-columns: 1.25fr 0.75fr; }
  .finale-text { text-align: left; }
  #finale .finale-text .sub { margin-left: 0; margin-right: 0; }
}
@media (max-width: 859px) {
  #finale .scene__content.finale-split { text-align: center; }
  .finale-photo { order: -1; }                /* photo on top, text below */
  .finale-text .kicker { text-align: center; }
}

/* ============================================================================
   FOOTER — white logo + Follow Us (Directives 2 & 4)
   ========================================================================== */
.credits__logo { width: 132px; height: auto; margin: 0 auto var(--space-md); display: block; opacity: 0.95; }
.credits__follow {
  margin-top: var(--space-md); display: flex; justify-content: center; gap: 1.4rem; align-items: center;
  font-size: var(--fs-micro); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--c-mist);
}
.credits__follow a { color: var(--c-mist); text-decoration: none; transition: color var(--t-fast); }
.credits__follow a:hover { color: var(--c-gold); }

/* ============================================================================
   ABOUT — brand signature sign-off + social pills (Directives 2 & 4)
   ========================================================================== */
.signoff { text-align: center; margin-top: var(--space-lg); }
.signoff__plate {
  display: inline-block; background: var(--c-paper); border-radius: 8px;
  padding: 0.9rem 1.4rem; box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}
.signoff__plate img { height: 46px; width: auto; display: block; }
.signoff__cap { display: block; margin-top: 0.9rem; font-size: var(--fs-micro); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--c-mist); }
.social-pills { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: var(--space-lg); }
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
  border: 1px solid var(--c-gold-line); color: var(--c-paper); border-radius: var(--radius-pill);
  font-size: 0.74rem; font-weight: var(--fw-bold); letter-spacing: var(--ls-label); text-transform: uppercase;
  padding: 0.7rem 1.2rem; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.pill:hover, .pill:focus-visible { background: var(--c-gold); color: var(--c-navy); border-color: var(--c-gold); }

/* ============================================================================
   SPECIAL NEEDS — B2C checklist + key terms + B2B partner (Directive 5)
   ========================================================================== */
.terms-grid { display: grid; gap: var(--space-md); margin-top: var(--space-lg); }
@media (min-width: 700px) { .terms-grid { grid-template-columns: 1fr 1fr; } }
.term-card { border: var(--border-hairline); border-radius: 6px; padding: var(--space-md); background: rgba(255,255,255,0.02); }
.term-card h3 { font-size: 1.3rem; color: var(--c-gold); margin-bottom: 0.5rem; }
.term-card p { color: var(--c-mist); font-size: 0.95rem; margin: 0; }

/* Interactive checklist (counts items → prompts a call at 5+) */
.checklist-group { margin-bottom: var(--space-lg); }
.checklist-group h3 { color: var(--c-paper); font-size: 1.3rem; margin-bottom: var(--space-sm); }
.check {
  display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.7rem 0;
  border-bottom: 1px dotted var(--c-dot-line); color: var(--c-mist); cursor: pointer; font-size: 0.96rem;
}
.check input { margin-top: 0.2rem; accent-color: var(--c-gold); width: 18px; height: 18px; flex: none; }
.check input:checked + span { color: var(--c-paper); }
.tally {
  position: sticky; bottom: 0; z-index: 5; margin-top: var(--space-lg);
  background: rgba(7,13,29,0.92); backdrop-filter: blur(10px);
  border: 1px solid var(--c-gold-line); border-radius: 10px; padding: 1.2rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.tally__count { font-family: var(--font-display); font-size: 1.6rem; color: var(--c-paper); }
.tally__count b { color: var(--c-gold); }
.tally.alert { border-color: var(--c-gold); box-shadow: var(--glow-cta); }
.tally__msg { color: var(--c-mist); font-size: 0.9rem; flex: 1 1 240px; }

/* B2B partner band */
.partner { background: #0A1326; border-top: var(--border-hairline); }
.partner-why { display: grid; gap: var(--space-md); margin-top: var(--space-lg); }
@media (min-width: 720px) { .partner-why { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .partner-why { grid-template-columns: repeat(5, 1fr); } }
.why-card { border: var(--border-hairline); border-radius: 6px; padding: var(--space-md); }
.why-card h4 { font-size: 0.8rem; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--c-gold); margin-bottom: 0.6rem; }
.why-card p { color: var(--c-mist); font-size: 0.9rem; margin: 0; }
.two-col { display: grid; gap: var(--space-lg); margin-top: var(--space-lg); }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: var(--space-md); }
.chip-tag {
  border: 1px solid var(--c-gold-line); border-radius: var(--radius-pill); color: var(--c-paper);
  padding: 0.5rem 1rem; font-size: 0.78rem; letter-spacing: var(--ls-label);
}

/* ============================================================================
   ROUND-2 ADDITIONS (28-jun) — logo, Practice Areas dropdown, home hero
   figure, chatbot widget y cookie banner.
   ========================================================================== */

/* ---- Header logo (responsivo). Logo principal: White + tagline sobre el
        header navy. La sombra sutil despega el logo del fondo translúcido y
        mantiene legible la línea del tagline. -------------------------------- */
.mark__logo { height: 42px; width: auto; display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
@media (max-width: 900px) { .mark__logo { height: 34px; } }
@media (max-width: 480px) { .mark__logo { height: 30px; } }

/* ---- Practice Areas dropdown (Special Needs ahora vive aquí) ----------- */
.nav__list .has-sub { position: relative; }
.sub-toggle { display: none; }
.sub-menu {
  list-style: none; margin: 0; padding: .4rem 0;
  position: absolute; top: 100%; left: 0; min-width: 244px;
  background: rgba(7,13,29,.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(251,249,254,.10); border-radius: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s, transform .18s, visibility .18s; z-index: 6;
}
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0); }
.sub-menu a { display: block; padding: .62rem 1.1rem; border: 0; white-space: nowrap; }

@media (max-width: 900px) {
  .sub-toggle { display: inline-block; position: absolute; right: 0; top: .55rem;
    background: none; border: 0; color: var(--c-gold); font-size: 1.2rem;
    line-height: 1; cursor: pointer; padding: .35rem .6rem; }
  .sub-menu { position: static; opacity: 1; visibility: visible; transform: none;
    background: none; border: 0; border-radius: 0; padding: 0 0 .4rem 1rem;
    min-width: 0; max-height: 0; overflow: hidden; transition: max-height .25s ease; }
  .has-sub.open .sub-menu { max-height: 520px; }
  .sub-menu a { font-size: .74rem; padding: .7rem 0; }
}

/* ---- Home hero — fotografía de Alex Trujillo (cutout) ------------------ */
#open .scene__content { position: relative; z-index: 3; }
.hero-figure { position: absolute; right: max(2vw, .5rem); bottom: 0; z-index: 2;
  height: min(80vh, 740px); width: auto; pointer-events: none;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.55)); }
/* ===========================================================================
   HERO RESPONSIVO (TABLET + MOBILE) — copy a la IZQUIERDA, Alex a la DERECHA.
   Desktop (>=992px) queda INTACTO (figura absoluta + composición original).
   En <=991px #open pasa a un grid editorial de 2 columnas [copy | Alex]:
   sin solapamientos, escalado proporcional y sin deformar la imagen.
   =========================================================================== */

/* ---- TABLET (768–991px): split equilibrado, Alex tamaño moderado --------- */
@media (max-width: 991px) {
  #open {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;   /* copy | Alex */
    align-items: center;
    column-gap: clamp(.5rem, 2.5vw, 1.75rem);
    padding-inline: clamp(1.25rem, 5vw, 3rem);
  }
  /* El bg y el velo son absolutos: siguen a pantalla completa, fuera del grid. */
  #open .scene__content {
    grid-column: 1; justify-self: start; align-self: center;
    width: auto; max-width: none; margin: 0;
    text-align: left; align-items: flex-start;   /* copy alineado a la izquierda */
  }
  #open .scene__content .presents,
  #open .scene__content .sub {
    margin-left: 0; margin-right: 0; text-align: left;
  }
  #open .giant { font-size: clamp(2.6rem, 10vw, 4.4rem); line-height: 1.02; }
  .hero-figure {
    position: relative; inset: auto; transform: none;   /* sale del modo absoluto */
    grid-column: 2; justify-self: end; align-self: end; /* Alex anclada abajo-derecha */
    width: 100%; max-width: 340px; height: auto; opacity: 1;  /* proporción intacta */
    filter: drop-shadow(0 14px 32px rgba(0,0,0,.5));
  }
}

/* ---- MOBILE (<=767px): copy compacto, Alex visible y proporcionada ------- */
@media (max-width: 767px) {
  #open {
    grid-template-columns: 1.45fr 0.85fr;   /* más peso al copy, Alex más pequeña */
    column-gap: .55rem;
    padding-inline: clamp(1rem, 4.5vw, 1.6rem);
  }
  #open .giant { font-size: clamp(2.05rem, 11vw, 3.1rem); }
  #open .scene__content .sub { font-size: .9rem; line-height: 1.5; }
  .hero-figure { max-width: 36vw; align-self: end; }
}

/* ---- MOBILE pequeño (<=380px): evita sensación de apretado --------------- */
@media (max-width: 380px) {
  #open { grid-template-columns: 1.5fr 0.8fr; column-gap: .4rem; }
  #open .giant { font-size: clamp(1.9rem, 12.5vw, 2.5rem); }
  .hero-figure { max-width: 34vw; }
}

/* TV / pantallas grandes 1080p: garantiza que el título y "Scroll to begin"
   queden dentro de la zona segura y la foto no los tape. */
@media (min-width: 1280px) and (max-height: 1100px) {
  .hero-figure { height: min(72vh, 660px); }
}

/* ---- Chatbot widget (Responsas) — autocontenido, sin teléfono --------- */
.tru-chat-btn { position: fixed; right: 18px; bottom: 18px; z-index: 120;
  background: var(--c-gold); color: var(--c-navy); border: 0; border-radius: 50%;
  width: 56px; height: 56px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.tru-chat-btn svg { display: block; }
.tru-chat-panel { position: fixed; right: 18px; bottom: 84px; z-index: 121;
  width: min(340px, 92vw); max-height: 72vh; display: none; flex-direction: column;
  background: #0E1A33; border: 1px solid rgba(251,249,254,.12); border-radius: 14px;
  overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.tru-chat-panel.open { display: flex; }
.tru-chat-head { background: var(--c-gold); color: var(--c-navy); padding: .8rem 1rem;
  font-weight: 800; font-size: .85rem; display: flex; justify-content: space-between; align-items: center; }
.tru-chat-head button { background: none; border: 0; color: var(--c-navy); font-size: 1.2rem; cursor: pointer; }
.tru-chat-body { padding: 1rem; overflow-y: auto; gap: .55rem; display: flex; flex-direction: column; font-size: .85rem; }
.tru-msg { padding: .6rem .8rem; border-radius: 10px; line-height: 1.5; max-width: 90%; }
.tru-msg.bot { background: rgba(255,255,255,.06); color: #E7EDF7; align-self: flex-start; }
.tru-msg.me  { background: var(--c-gold); color: var(--c-navy); align-self: flex-end; font-weight: 600; }
.tru-chat-opts { display: flex; flex-wrap: wrap; gap: .4rem; padding: .2rem 1rem 1rem; }
.tru-chat-opts button { background: none; border: 1px solid var(--c-gold); color: var(--c-gold);
  border-radius: 14px; padding: .4rem .7rem; font-size: .72rem; cursor: pointer; }
.tru-chat-opts button:hover { background: var(--c-gold); color: var(--c-navy); }
.tru-chat-foot { padding: .6rem 1rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .72rem; color: #9FB0CC; }
.tru-chat-foot a { color: var(--c-gold); text-decoration: none; }

/* ---- Chatbot CTA de cierre (botones contacto + enlace de sección) ------ */
.tru-cta-wrap { max-width: 100%; }
.tru-cta-lead { margin: 0 0 .55rem; color: #E7EDF7; font-weight: 600; }
.tru-cta-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.tru-cta {
  display: inline-flex; align-items: center; gap: .35rem; text-decoration: none;
  background: var(--c-gold); color: var(--c-navy); border: 1px solid var(--c-gold);
  border-radius: 14px; padding: .38rem .7rem; font-size: .72rem; font-weight: 700;
  line-height: 1; transition: var(--t-fast); }
.tru-cta:hover { background: transparent; color: var(--c-gold); }
.tru-cta svg { flex: none; }
.tru-cta-link {
  display: inline-block; margin-top: .55rem; color: var(--c-gold);
  text-decoration: none; font-size: .74rem; font-weight: 700; }
.tru-cta-link:hover { text-decoration: underline; }

/* ---- Entrada de texto (conversación básica) + indicador "escribiendo" -- */
.tru-chat-input { display: flex; gap: .45rem; padding: .55rem 1rem; border-top: 1px solid rgba(255,255,255,.08); }
.tru-chat-input input {
  flex: 1 1 auto; min-width: 0; background: rgba(255,255,255,.06);
  border: 1px solid rgba(251,249,254,.16); border-radius: 18px; color: #E7EDF7;
  padding: .55rem .9rem; font-family: var(--font-sans); font-size: .82rem; }
.tru-chat-input input::placeholder { color: #8294B2; }
.tru-chat-input input:focus { outline: none; border-color: var(--c-gold); }
.tru-chat-input button {
  flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: var(--c-gold); color: var(--c-navy); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: var(--t-fast); }
.tru-chat-input button:hover { filter: brightness(1.06); }
.tru-typing { display: inline-flex !important; gap: 4px; align-items: center; }
.tru-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #9FB0CC;
  display: inline-block; animation: truDot 1s infinite ease-in-out; }
.tru-typing span:nth-child(2) { animation-delay: .15s; }
.tru-typing span:nth-child(3) { animation-delay: .30s; }
@keyframes truDot { 0%,80%,100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-4px); opacity: 1; } }

/* ---- Cookie consent banner -------------------------------------------- */
.tru-cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 130;
  background: #0E1A33; border: 1px solid rgba(251,249,254,.14); border-radius: 12px;
  padding: .9rem 1.2rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  justify-content: center; box-shadow: 0 12px 40px rgba(0,0,0,.5); font-size: .8rem; color: #E7EDF7; }
.tru-cookie a { color: var(--c-gold); }
.tru-cookie button { background: var(--c-gold); color: var(--c-navy); border: 0;
  border-radius: 20px; padding: .55rem 1.3rem; font-weight: 800; cursor: pointer; }
.hero-figure img { height: 100%; width: auto; display: block; }

/* ============================================================================
   LANGUAGE SWITCHER (8 idiomas) — header + footer. Reemplaza el botón ES.
   ========================================================================== */
.lang-switch { position: relative; display: inline-block; }
.lang-switch__btn {
  display: inline-flex; align-items: center; gap: .4rem;
  background: none; border: 1px solid var(--c-paper-border); color: var(--c-paper);
  border-radius: var(--radius-pill); cursor: pointer;
  font-family: var(--font-sans); font-size: .66rem; font-weight: var(--fw-bold);
  letter-spacing: var(--ls-kicker); text-transform: uppercase; padding: .45rem .7rem;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.lang-switch__btn:hover, .lang-switch__btn:focus-visible { color: var(--c-gold); border-color: var(--c-gold); }
.lang-switch__flag { font-size: .9rem; line-height: 1; }
.lang-switch__arr { font-size: .7rem; transition: transform var(--t-fast); }
.lang-switch.open .lang-switch__arr { transform: rotate(180deg); }
.lang-switch__menu {
  list-style: none; margin: 0; padding: .35rem 0;
  position: absolute; top: calc(100% + .5rem); right: 0; min-width: 170px;
  background: rgba(7,13,29,.98);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(251,249,254,.12); border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s, transform .18s, visibility .18s; z-index: 40;
}
.lang-switch.open .lang-switch__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-switch__menu a {
  display: flex; align-items: center; gap: .6rem; padding: .55rem 1rem;
  color: var(--c-paper); text-decoration: none; font-size: .82rem; white-space: nowrap;
  border: 0; transition: background var(--t-fast), color var(--t-fast);
}
.lang-switch__menu a:hover, .lang-switch__menu a:focus-visible { background: rgba(255,255,255,.06); color: var(--c-gold); }
.lang-switch__menu a[aria-current="true"] { color: var(--c-gold); }

/* Footer variant: menu opens upward, centered */
.credits .lang-switch { margin: var(--space-md) auto 0; display: block; width: max-content; }
.credits .lang-switch__menu { top: auto; bottom: calc(100% + .5rem); right: 50%; transform: translate(50%, 8px); }
.credits .lang-switch.open .lang-switch__menu { transform: translate(50%, 0); }

/* Short translation-accuracy note in the footer */
.credits__xlate { margin-top: var(--space-sm); font-size: .68rem; line-height: 1.5;
  color: var(--c-credit-dim); max-width: 60ch; margin-inline: auto; }

/* RTL support for Hebrew & Arabic static pages */
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .nav__list a,
html[dir="rtl"] .cred-card,
html[dir="rtl"] .body-copy p,
html[dir="rtl"] .post-body { text-align: right; }
html[dir="rtl"] .founder-quote,
html[dir="rtl"] .post-body blockquote { border-left: 0; border-right: 2px solid var(--c-gold);
  padding-left: 0; padding-right: var(--space-md); }
html[dir="rtl"] .svc-list li { padding: .6rem 1.7rem .6rem 0; }
html[dir="rtl"] .svc-list li::before { left: auto; right: 0; }
html[dir="rtl"] .lang-switch__menu { right: auto; left: 0; }

@media (max-width: 900px) {
  .nav .lang-switch { margin-top: .2rem; }
  .lang-switch__menu { right: auto; left: 0; }
}
