/* ==========================================================
   Avalis Seguros — sistema de diseño v3
   Tipografía: sans serif moderna (--font la define el hero; respaldo Inter Tight)
   Color: paleta del brandbook + degradados de marca. Sin líneas divisorias.
   ========================================================== */

:root {
  /* Color — brandbook */
  --bosque: #29351a;
  --bosque-90: #323f22;
  --bosque-80: #3c4a2a;
  --olivo: #626b3a;
  --olivo-20: #e9ebdc;
  --ocre: #bd6c25;
  --ocre-txt: #9b5419;          /* ocre con contraste AA sobre crema */
  --ocre-claro: #dca15d;
  --crema: #fffcf5;
  --arena: #f6f1e6;
  --arena-2: #ede6d5;
  --tinta: #1c2412;
  --tinta-2: #4f5544;
  --linea: rgba(41, 53, 26, .1);
  --linea-clara: rgba(255, 252, 245, .14);
  --crema-80: rgba(255, 252, 245, .8);
  --crema-60: rgba(255, 252, 245, .64);

  /* Degradados de marca */
  --g-bosque: radial-gradient(120% 90% at 85% 0%, #4a5530 0%, rgba(74, 85, 48, 0) 55%), linear-gradient(160deg, #2f3c1e 0%, #29351a 45%, #1f2913 100%);
  --g-ocre: linear-gradient(135deg, #e8b878 0%, #dca15d 42%, #c97f37 100%);
  --g-ocre-hover: linear-gradient(135deg, #f0c588 0%, #e2a964 42%, #cf8740 100%);
  --g-crema: radial-gradient(80% 60% at 15% 0%, #fff6e4 0%, rgba(255, 246, 228, 0) 70%), linear-gradient(180deg, #fffcf5 0%, #f8f2e5 100%);
  --g-olivo: linear-gradient(150deg, #737d45 0%, #626b3a 50%, #4a5230 100%);
  --g-text: linear-gradient(100deg, #bd6c25 0%, #dca15d 100%);

  /* Tipografía */
  --f: var(--font, "Figtree", "Plus Jakarta Sans", "Helvetica Neue", Arial, system-ui, sans-serif);
  --t-display-1: clamp(2.7rem, 1.5rem + 5.6vw, 6.6rem);
  --t-display-2: clamp(2.1rem, 1.4rem + 3.2vw, 4.2rem);
  --t-display-3: clamp(1.6rem, 1.25rem + 1.6vw, 2.5rem);
  --t-lead: clamp(1.06rem, 1rem + .3vw, 1.25rem);

  /* Medidas */
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 56px);
  --r-xs: 10px; --r-sm: 16px; --r: 24px; --r-lg: 32px; --r-xl: clamp(28px, 3vw, 44px);
  --frame: clamp(8px, 1vw, 12px);
  --nav-h: 76px;
  --shadow-1: 0 1px 2px rgba(28, 36, 18, .06), 0 8px 24px rgba(28, 36, 18, .06);
  --shadow-2: 0 2px 6px rgba(28, 36, 18, .08), 0 24px 60px rgba(28, 36, 18, .14);

  /* Movimiento */
  --e-out: cubic-bezier(.23, 1, .32, 1);     /* salida fuerte */
  --e-io: cubic-bezier(.77, 0, .175, 1);
  --e-spring: cubic-bezier(.34, 1.4, .64, 1);
  --d-fast: 160ms; --d: 260ms; --d-slow: 700ms;
  /* Tokens v5. Respuesta de UI: nunca más de 400 ms. Escenas ligadas a lectura/scroll: aparte. */
  --dur-1: 100ms; --dur-2: 150ms; --dur-3: 200ms; --dur-4: 300ms; --dur-5: 400ms; --dur-6: 560ms;
  --dur-reveal: 900ms; --dur-scene: 1200ms; --dur-count: 1600ms;
  --ease-std: cubic-bezier(.2, 0, 0, 1);       /* estándar: hover, color */
  --ease-enter: cubic-bezier(.16, 1, .3, 1);   /* entrar: desacelera largo (expo out) */
  --ease-exit: cubic-bezier(.7, 0, .84, 0);    /* salir: acelera */
  --ease-emph: cubic-bezier(.34, 1.4, .64, 1); /* énfasis: una vez por pantalla */
  --dist-1: 4px; --dist-2: 8px; --dist-3: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; font-family: var(--f); font-weight: 400; font-size: 17px; line-height: 1.55;
  color: var(--tinta); background: var(--crema); overflow-x: clip;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.08; letter-spacing: -.02em; }
strong { font-weight: 600; }
button { font: inherit; color: inherit; }
::selection { background: var(--ocre-claro); color: var(--bosque); }
:focus-visible { outline: 2px solid var(--ocre); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: 12px; top: -80px; z-index: 300; padding: 12px 18px; border-radius: 999px; background: var(--bosque); color: var(--crema); text-decoration: none; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Tipografía ---------- */
.display-1 { font-size: var(--t-display-1); font-weight: 600; line-height: 1.02; letter-spacing: -.035em; }
.display-2 { font-size: var(--t-display-2); font-weight: 600; line-height: 1.06; letter-spacing: -.03em; text-wrap: balance; }
.display-3 { font-size: var(--t-display-3); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
/* Énfasis: sin itálicas, color con degradado ocre */
.display-1 em, .display-2 em, .display-3 em, .em {
  font-style: normal; color: var(--ocre-txt);
  background: linear-gradient(100deg, #a65a1c 0%, #c97f37 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.on-dark .display-1 em, .on-dark .display-2 em, .on-dark .display-3 em, .on-dark .em, .on-olivo em {
  color: var(--ocre-claro); background: linear-gradient(100deg, #f0c588 0%, #dca15d 100%); -webkit-background-clip: text; background-clip: text;
}
.is-split em .w__i, .is-split .em .w__i { background: inherit; -webkit-background-clip: text; background-clip: text; }
.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--tinta-2); max-width: 52ch; text-wrap: pretty; }
.on-dark .lead { color: var(--crema-80); }
.label {
  display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 600; letter-spacing: -.005em; color: var(--ocre-txt);
}
.label::before { content: none; }
.on-dark .label { color: var(--ocre-claro); }
.muted { color: var(--tinta-2); }

/* ---------- Estructura ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(88px, 12vw, 176px); }
.section--tight { padding-block: clamp(56px, 7vw, 104px); }
.on-dark { background: var(--bosque); background-image: var(--g-bosque); color: var(--crema); }
.on-olivo { background: var(--olivo); background-image: var(--g-olivo); color: var(--crema); }
.on-arena { background: var(--arena); }
.head { display: grid; gap: 18px; max-width: 860px; margin-bottom: clamp(40px, 6vw, 72px); }
.head--split { max-width: none; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 1024px) { .head--split { grid-template-columns: 1.3fr 1fr; gap: 64px; } }
.head .lead { margin: 0; }
.rule { display: none; }
/* Panel: sección oscura como tarjeta grande (sin cortes duros entre secciones) */
.panel { margin-inline: var(--frame); border-radius: var(--r-xl); overflow: hidden; }
/* Fundido suave entre secciones */
.fade-top { position: relative; }
.fade-top::before { content: ""; position: absolute; inset: 0 0 auto; height: 160px; background: linear-gradient(var(--fade-from, var(--crema)), transparent); pointer-events: none; z-index: 0; }

/* ---------- Botón píldora (componente de marca) ---------- */
.pill {
  --pill-bg: var(--g-ocre); --pill-fg: var(--bosque); --dot-bg: var(--bosque); --dot-fg: var(--crema);
  --pill-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 -1px 0 rgba(120, 60, 10, .18) inset, 0 6px 18px -6px rgba(189, 108, 37, .55);
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 6px 28px; border-radius: 999px;
  background: var(--pill-bg); color: var(--pill-fg); box-shadow: var(--pill-shadow);
  font-family: var(--f); font-size: 1rem; font-weight: 600; letter-spacing: -.005em; line-height: 1.1;
  text-decoration: none; border: 0; cursor: pointer; isolation: isolate; overflow: hidden;
  transition: transform var(--d-fast) var(--e-out), box-shadow var(--d) var(--e-out), color var(--d) var(--e-out);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
/* brillo que cruza al pasar el cursor */
.pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%) -150% 0 / 60% 100% no-repeat;
  transition: background-position 0s;
}
.pill__dot { display: none !important; }
.pill::before { display: none; }
.pill__label { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.pill__label svg { width: 20px; height: 20px; flex: none; }
.pill__dot {
  position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  background: var(--dot-bg); color: var(--dot-fg); transition: transform var(--d) var(--e-out);
}
.pill__dot svg { width: 20px; height: 20px; transition: transform 380ms var(--e-out); }
.pill__dot i { position: absolute; inset: 0; display: grid; place-items: center; transition: transform 420ms var(--e-out); }
.pill__dot .pill__a2 { transform: translateX(-130%); }
.pill:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .pill:hover { box-shadow: var(--pill-shadow), 0 10px 28px -8px rgba(28, 36, 18, .35); }
  .pill:hover::before { background-position: 250% 0; transition: background-position 900ms var(--e-out); }
  .pill:hover .pill__a1 { transform: translateX(130%); }
  .pill:hover .pill__a2 { transform: translateX(0); }
  .pill:hover .pill__dot { transform: scale(1.06); }
  .pill:hover .pill__dot > svg { transform: translateX(3px); }
  .pill--accent:hover { --pill-bg: var(--g-ocre-hover); }
  .pill--dark:hover { --pill-bg: linear-gradient(135deg, #46562e, #2f3c1e); }
  .pill--ghost:hover { --pill-bg: rgba(41, 53, 26, .06); }
  .pill--ghost-light:hover { --pill-bg: rgba(255, 252, 245, .12); }
  .pill--light:hover { --pill-bg: #fff; }
}
.pill--dark { --pill-bg: linear-gradient(135deg, #3c4a2a, #29351a); --pill-fg: var(--crema); --dot-bg: var(--g-ocre); --dot-fg: var(--bosque); --pill-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 8px 20px -8px rgba(28, 36, 18, .6); }
.pill--light { --pill-bg: var(--crema); --pill-fg: var(--bosque); --pill-shadow: 0 8px 22px -10px rgba(0, 0, 0, .4); }
.pill--ghost { --pill-bg: rgba(41, 53, 26, .02); --pill-fg: var(--bosque); --pill-shadow: inset 0 0 0 1.5px rgba(41, 53, 26, .2); }
.pill--ghost::before, .pill--ghost-light::before { display: none; }
.pill--ghost-light { --pill-bg: rgba(255, 252, 245, .04); --pill-fg: var(--crema); --dot-bg: var(--crema); --dot-fg: var(--bosque); --pill-shadow: inset 0 0 0 1.5px rgba(255, 252, 245, .3); }
.pill--wa .pill__label svg { color: #25d366; }
.pill--accent.pill--wa .pill__label svg, .pill--light.pill--wa .pill__label svg { color: var(--bosque); }
.pill--block { width: 100%; justify-content: center; }
.pill--sm { min-height: 46px; padding-inline: 20px; font-size: .94rem; }
.pill--sm .pill__dot { width: 34px; height: 34px; }
.pill--sm .pill__dot svg { width: 17px; height: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 479px) { .actions > .pill { width: 100%; justify-content: center; } }

.link {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; color: inherit;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; padding-bottom: 3px;
  transition: background-size var(--d) var(--e-out);
}
.link svg { width: 18px; height: 18px; transition: transform var(--d) var(--e-out); }
@media (hover: hover) { .link:hover { background-size: 100% 1.5px; } .link:hover svg { transform: translateX(4px); } }

/* ---------- Navegación: cápsula flotante ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 120; padding: calc(var(--frame) + 6px) calc(var(--frame) + clamp(4px, 2vw, 28px)) 0; pointer-events: none; }
.nav__bar {
  pointer-events: auto; max-width: 1200px; margin: 0 auto; height: 62px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 7px 0 20px; border-radius: 999px;
  background: rgba(31, 41, 19, .94); color: var(--crema);
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .35);
  transition: background-color var(--d-slow) var(--e-out), color var(--d-slow) var(--e-out), box-shadow var(--d-slow) var(--e-out), transform 500ms var(--e-out);
}
.nav__brand { display: flex; align-items: center; height: 40px; }
.nav__logo { height: 30px; width: auto; }
.nav__logo--dark { display: none; }
.nav__links { display: none; }
.nav__links ul { position: relative; list-style: none; margin: 0; padding: 4px; display: flex; gap: 2px; border-radius: 999px; background: rgba(255, 252, 245, .07); }
.nav__links li { position: relative; z-index: 1; }
.nav__links a {
  display: flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; font-size: .93rem; font-weight: 500; text-decoration: none; color: inherit;
  opacity: .82; transition: opacity var(--d) var(--e-out), color var(--d) var(--e-out);
}
.nav__ic { width: 16px; height: 16px; opacity: .8; transition: transform 400ms var(--e-spring); }
.nav__links a:hover, .nav__links a[aria-current="page"] { opacity: 1; }
.nav__links a:hover .nav__ic { transform: translateY(-1px) scale(1.12); }
.nav__links a[aria-current="page"] { background: rgba(255, 252, 245, .14); }
.nav__links li.nav__glow { position: absolute; z-index: 0; top: 4px; left: 0; height: calc(100% - 8px); width: 0; border-radius: 999px; background: rgba(255, 252, 245, .12); opacity: 0; transition: transform 380ms var(--e-out), width 380ms var(--e-out), opacity 200ms var(--e-out); pointer-events: none; }
.nav__links ul:hover .nav__glow { opacity: 1; }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__cta { display: none; }
.nav__menu {
  display: inline-flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px 0 20px; border-radius: 999px; border: 0;
  background: rgba(255, 252, 245, .12); color: inherit; cursor: pointer; font-size: .95rem; font-weight: 600;
  transition: transform var(--d-fast) var(--e-out);
}
.nav__menu:active { transform: scale(.96); }
.nav__menu-icon { position: relative; width: 18px; height: 10px; }
.nav__menu-icon i { position: absolute; left: 0; right: 0; height: 1.75px; background: currentColor; border-radius: 2px; transition: transform var(--d) var(--e-out), top var(--d) var(--e-out); }
.nav__menu-icon i:first-child { top: 0; } .nav__menu-icon i:last-child { top: 8.25px; }
.nav__menu[aria-expanded="true"] .nav__menu-icon i:first-child { top: 4.25px; transform: rotate(45deg); }
.nav__menu[aria-expanded="true"] .nav__menu-icon i:last-child { top: 4.25px; transform: rotate(-45deg); }
@media (min-width: 1100px) {
  .nav__links { display: block; }
  .nav__cta { display: inline-flex; }
  .nav__menu { display: none; }
}
body.nav-light .nav__bar, .nav.is-light .nav__bar {
  background: rgba(255, 255, 255, .96); color: var(--bosque); box-shadow: 0 1px 2px rgba(41, 53, 26, .05), 0 12px 40px -12px rgba(41, 53, 26, .2);
}
body.nav-light .nav__logo--light, .nav.is-light .nav__logo--light { display: none; }
body.nav-light .nav__logo--dark, .nav.is-light .nav__logo--dark { display: block; }
body.nav-light .nav__links ul, .nav.is-light .nav__links ul { background: rgba(41, 53, 26, .05); }
body.nav-light .nav__glow, .nav.is-light .nav__glow { background: rgba(41, 53, 26, .07); }
body.nav-light .nav__links a[aria-current="page"], .nav.is-light .nav__links a[aria-current="page"] { background: #fff; box-shadow: 0 1px 3px rgba(41, 53, 26, .12); }
body.nav-light .nav__menu, .nav.is-light .nav__menu { background: rgba(41, 53, 26, .07); }
.nav.is-hidden .nav__bar { transform: translateY(calc(-100% - 40px)); }
body.sheet-open .nav__bar { background: transparent; box-shadow: none; color: var(--crema); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.sheet-open .nav__logo--light { display: block; } body.sheet-open .nav__logo--dark { display: none; }
body.sheet-open .nav__menu { background: rgba(255, 252, 245, .12); }

/* Menú a pantalla completa */
.sheet {
  position: fixed; inset: 0; z-index: 110; background: var(--bosque); background-image: var(--g-bosque); color: var(--crema);
  clip-path: inset(0 0 100% 0 round 0 0 40px 40px); visibility: hidden;
  transition: clip-path 600ms var(--e-io), visibility 0s linear 600ms;
}
.sheet.is-open { clip-path: inset(0 0 0 0 round 0); visibility: visible; transition-delay: 0s; }
.sheet__inner { height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 112px var(--gutter) calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; }
.sheet__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sheet__links a {
  display: flex; align-items: center; gap: 16px; padding: 12px 14px 12px 10px; border-radius: 20px;
  font-size: clamp(1.6rem, 7vw, 2.4rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.1; text-decoration: none;
  opacity: 0; transform: translateY(20px); filter: blur(6px);
  transition: opacity 500ms var(--e-out), transform 500ms var(--e-out), filter 500ms var(--e-out), background-color var(--d) var(--e-out);
  transition-delay: calc(120ms + var(--i, 0) * 45ms);
}
.sheet__links a:active { background: rgba(255, 252, 245, .08); }
.sheet__ic { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 252, 245, .08); }
.sheet__ic svg { width: 22px; height: 22px; }
.sheet__go { margin-left: auto; opacity: .5; } .sheet__go svg { width: 22px; height: 22px; }
.sheet__links a[aria-current="page"] { color: var(--ocre-claro); }
.sheet__links a[aria-current="page"] .sheet__ic { background: var(--g-ocre); color: var(--bosque); }
.sheet.is-open .sheet__links a { opacity: 1; transform: none; filter: none; }
.sheet__foot { display: grid; gap: 12px; margin-top: 32px; }
.sheet__hours { margin: 6px 0 0; color: var(--crema-60); font-size: .9rem; }
body.sheet-open { overflow: hidden; }

/* ---------- Medios ---------- */
.media { position: relative; overflow: hidden; border-radius: var(--r); background: var(--arena-2); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.ratio-45 { aspect-ratio: 4 / 5; } .ratio-32 { aspect-ratio: 3 / 2; } .ratio-916 { aspect-ratio: 9 / 16; } .ratio-11 { aspect-ratio: 1; }

/* ---------- Reels (otras páginas) ---------- */
.reel {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden;
  background: var(--bosque-90); color: var(--crema); border: 0; padding: 0; cursor: pointer; text-align: left;
  transition: transform var(--d) var(--e-out);
}
.reel img, .reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel::after { content: ""; position: absolute; inset: 0; background: rgba(28, 36, 18, .12); pointer-events: none; transition: opacity var(--d) var(--e-out); }
.reel-card { margin: 0; display: grid; gap: 14px; }
.reel__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.reel__title { font-size: 1.05rem; font-weight: 500; line-height: 1.3; }
.reel__time { flex: none; font-size: .82rem; letter-spacing: .04em; color: var(--tinta-2); }
.on-dark .reel__time { color: var(--crema-60); }
.reel__play {
  position: absolute; top: 16px; right: 16px; z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 252, 245, .9); color: var(--bosque);
  transition: transform var(--d) var(--e-out);
}
.reel__play svg { width: 20px; height: 20px; margin-left: 3px; }
.reel.is-playing::after, .reel.is-playing .reel__play { opacity: 0; pointer-events: none; }
@media (hover: hover) { .reel:hover .reel__play { transform: scale(1.08); } }
.reel:active { transform: scale(.985); }

/* ---------- Logos de aseguradoras (tarjetas, sin líneas) ---------- */
.insurer-logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .insurer-logos { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .insurer-logos { grid-template-columns: repeat(6, 1fr); } }
.insurer-logo { display: grid; place-items: center; height: clamp(88px, 10vw, 120px); padding: 20px 24px; border-radius: var(--r-sm); background: #fff; box-shadow: var(--shadow-1); transition: transform var(--d) var(--e-out), box-shadow var(--d) var(--e-out); }
.insurer-logo img { max-height: 40px; max-width: 116px; width: auto; height: auto; object-fit: contain; }
@media (hover: hover) and (pointer: fine) { .insurer-logo:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); } }

/* ---------- Acordeón: ver bloque "Acordeones v7" al final (main.js lo aplica a todo <details> agrupado) ---------- */
.acc { display: grid; gap: 6px; }
.acc summary { list-style: none; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }

/* ---------- Cierre ---------- */
.closing { position: relative; overflow: hidden; color: var(--crema); padding-block: clamp(88px, 11vw, 160px); }
.closing__bg { position: absolute; inset: 0; z-index: 0; background: radial-gradient(60% 60% at 20% 30%, rgba(220, 161, 93, .22), transparent 70%), radial-gradient(50% 45% at 90% 55%, rgba(98, 107, 58, .45), transparent 70%); pointer-events: none; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.closing__grid { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .closing__grid { grid-template-columns: .85fr 1.15fr; gap: 88px; } }
.closing__photo { margin: 0; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 5; max-height: 660px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55); }
.closing__photo img { width: 100%; height: 100%; object-fit: cover; }
.closing__copy { display: grid; gap: 22px; justify-items: start; }
.closing__copy .lead { color: var(--crema-80); margin: 0; }
.closing__note { margin: 0; color: var(--crema-60); font-size: .9rem; }
.closing .pill--accent { --dot-bg: var(--bosque); }

/* ---------- Footer ---------- */
.footer { background: #1f2913; color: var(--crema-80); padding: clamp(64px, 8vw, 104px) 0 28px; overflow: hidden; }
.closing + .footer, main:has(> * > .closing:last-child) + .footer { background: #1f2913; }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding-bottom: 40px; }
.footer__claim { margin: 0; font-size: var(--t-display-3); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; color: var(--crema); max-width: 16ch; }
.footer__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 24px; padding: 40px 0; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: repeat(4, 1fr); } }
.footer__label { margin: 0 0 14px; font-size: .78rem; font-weight: 600; letter-spacing: 0; color: var(--ocre-claro); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .96rem; }
.footer a { text-decoration: none; transition: color var(--d) var(--e-out); }
.footer a:hover { color: var(--crema); }
.footer__social { display: flex; gap: 8px; margin-top: 22px; }
.footer__social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 252, 245, .07); transition: background-color var(--d) var(--e-out), transform var(--d-fast) var(--e-out); }
.footer__social a:hover { background: rgba(255, 252, 245, .14); }
.footer__social a:active { transform: scale(.94); }
.footer__social svg { width: 19px; height: 19px; }
.footer__ins { padding: 8px 0 32px; }
.footer .footer__logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 22px clamp(28px, 4vw, 56px); }
.footer__logos .insurer-logo { display: inline-flex; align-items: center; justify-content: center; height: 48px; min-width: 44px; padding: 0; background: none; box-shadow: none; border-radius: 6px; transform: none; }
.footer__logos .insurer-logo img { max-height: 30px; max-width: 130px; width: auto; height: auto; object-fit: contain; opacity: .6; transition: opacity var(--d) var(--e-out); }
.footer__logos .insurer-logo:hover, .footer__logos .insurer-logo:focus-visible { transform: none; box-shadow: none; }
.footer__logos .insurer-logo:hover img, .footer__logos .insurer-logo:focus-visible img { opacity: 1; }
.footer__logos .insurer-logo:focus-visible { outline: 2px solid var(--ocre-claro); outline-offset: 4px; }
.footer__word { width: 100%; height: auto; opacity: .08; margin: 8px 0 24px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .84rem; color: var(--crema-60); }

/* ---------- WhatsApp discreto ---------- */
.wa-dot {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 100;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--g-ocre); color: var(--bosque); box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 14px 34px -8px rgba(28, 36, 18, .45);
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity 400ms var(--e-out), transform 400ms var(--e-out);
}
.wa-dot svg { width: 26px; height: 26px; }
.wa-dot.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.wa-dot:active { transform: scale(.94); }
body.sheet-open .wa-dot { opacity: 0; pointer-events: none; }

/* ---------- Cotización conversacional (estilo chat) ---------- */
.qd {
  width: min(520px, 100%); max-width: 100%; height: min(100dvh, 760px); max-height: 100dvh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--crema); color: var(--tinta); overflow: hidden;
  box-shadow: 0 -10px 60px rgba(28, 36, 18, .3);
}
@media (max-width: 699px) { .qd { height: min(94dvh, 760px); } }
@media (min-width: 700px) { .qd { margin: auto; border-radius: 28px; height: min(86dvh, 720px); } }
.qd::backdrop { background: rgba(20, 26, 12, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.qd[open] { animation: qd-in 420ms var(--e-out); } .qd[open]::backdrop { animation: fade 300ms var(--e-out); }
@media (max-width: 699px) { .qd[open] { animation-name: qd-up; } }
@keyframes qd-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes qd-up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.qd__form { display: flex; flex-direction: column; height: 100%; }
.qd__form[hidden] { display: none; }
.qd__head { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px; background: var(--g-bosque); color: var(--crema); }
.qd__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; box-shadow: 0 0 0 2px rgba(255, 252, 245, .25); }
.qd__who { flex: 1; min-width: 0; }
.qd__who h2 { font-size: 1rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.qd__status { margin: 2px 0 0; white-space: nowrap; overflow: hidden; display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--crema-60); }
.qd__status i { width: 7px; height: 7px; border-radius: 50%; background: #7bd46b; box-shadow: 0 0 0 3px rgba(123, 212, 107, .2); }
.qd__close, .qd__back { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 252, 245, .1); color: var(--crema); cursor: pointer; display: grid; place-items: center; transition: transform var(--d-fast) var(--e-out), background-color var(--d) var(--e-out); }
.qd__close:hover, .qd__back:hover { background: rgba(255, 252, 245, .18); }
.qd__close:active, .qd__back:active { transform: scale(.92); }
.qd__close svg, .qd__back svg { width: 20px; height: 20px; }
.qd__back[hidden] { display: none; }
.qd__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 252, 245, .1); }
.qd__progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--g-ocre); border-radius: 0 3px 3px 0; transition: width 500ms var(--e-out); }
.qd__log:focus { outline: none; }
.qd__log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 16px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--g-crema); scroll-behavior: smooth; }
.qd__body[hidden] { display: none; }
.bub { max-width: 84%; padding: 12px 16px; border-radius: 20px; font-size: 1rem; line-height: 1.4; word-wrap: break-word; }
.bub--bot { align-self: flex-start; background: #fff; color: var(--tinta); border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(28, 36, 18, .06); }
.bub--bot + .bub--bot { border-top-left-radius: 6px; }
.bub--q { font-weight: 600; font-size: 1.06rem; letter-spacing: -.01em; }
.bub--me { align-self: flex-end; background: var(--g-bosque); color: var(--crema); border-bottom-right-radius: 6px; margin-top: 6px; margin-bottom: 8px; }
.bub--note { align-self: flex-start; display: flex; gap: 8px; background: var(--olivo-20); color: var(--bosque); font-size: .9rem; }
.bub--note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.bub.is-new { animation: bub-in 420ms var(--e-out) both; }
.bub--me.is-new { transform-origin: 100% 100%; }
.bub--bot.is-new { transform-origin: 0 100%; }
@keyframes bub-in { from { opacity: 0; transform: translateY(10px) scale(.96); filter: blur(4px); } }
.bub--typing { display: inline-flex; gap: 4px; padding: 16px 18px; }
.bub--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--olivo); opacity: .4; animation: dots 1s infinite var(--e-io); }
.bub--typing i:nth-child(2) { animation-delay: .15s; } .bub--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { opacity: 1; transform: translateY(-3px); } }
.qd__dock { padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); background: var(--crema); box-shadow: 0 -12px 24px -16px rgba(28, 36, 18, .18); display: grid; gap: 10px; }
.qd__dock > * { animation: bub-in 360ms var(--e-out) both; }
.qd__choices { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: #fff; color: var(--bosque); font-weight: 500; font-size: .97rem; box-shadow: inset 0 0 0 1.5px rgba(41, 53, 26, .16);
  transition: transform var(--d-fast) var(--e-out), background-color var(--d) var(--e-out), color var(--d) var(--e-out), box-shadow var(--d) var(--e-out);
}
@media (hover: hover) { .chip:hover { box-shadow: inset 0 0 0 1.5px var(--olivo); } }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--bosque); color: var(--crema); box-shadow: none; }
.chip--skip { background: transparent; box-shadow: none; color: var(--tinta-2); text-decoration: underline; text-underline-offset: 3px; }
.qd__input { display: flex; gap: 8px; align-items: flex-end; }
.qd__input input, .qd__input textarea {
  flex: 1; min-width: 0; min-height: 52px; padding: 14px 18px; font: 400 16px/1.4 var(--f); color: var(--tinta);
  background: #fff; border: 0; border-radius: 26px; box-shadow: inset 0 0 0 1.5px rgba(41, 53, 26, .16); -webkit-appearance: none; appearance: none; resize: none;
  transition: box-shadow var(--d) var(--e-out);
}
.qd__input textarea { min-height: 52px; max-height: 120px; }
.qd__input input:focus, .qd__input textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--olivo), 0 0 0 4px rgba(98, 107, 58, .14); }
.qd__send { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--g-ocre); color: var(--bosque); box-shadow: 0 6px 16px -6px rgba(189, 108, 37, .6); transition: transform var(--d-fast) var(--e-out); }
.qd__send:active { transform: scale(.92); }
.qd__send svg { width: 22px; height: 22px; }
.qd__err { margin: 0; color: #b3261e; font-size: .86rem; padding-left: 14px; }
.qd__err:empty { display: none; }
.is-shake { animation: shake 360ms var(--e-out); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.qd__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.qd__alt { margin: 0; text-align: center; font-size: .86rem; color: var(--tinta-2); }
.qd__alt a { color: var(--bosque); font-weight: 600; }
.qd__done { height: 100%; padding: 48px 28px calc(36px + env(safe-area-inset-bottom)); display: grid; gap: 16px; place-content: center; justify-items: center; text-align: center; background: var(--g-crema); }
.qd__done[hidden] { display: none; }
.qd__done h2 { font-size: clamp(1.7rem, 1.5rem + 1vw, 2.2rem); }
.qd__done p { margin: 0; color: var(--tinta-2); max-width: 36ch; }
.qd__check svg { width: 72px; height: 72px; fill: none; stroke: var(--olivo); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.qd__check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 700ms var(--e-out) forwards; }
.qd__check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 500ms var(--e-out) 450ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.qd__again { border: 0; background: none; color: var(--tinta-2); text-decoration: underline; cursor: pointer; padding: 10px; }
.qd.is-sending .qd__dock .pill { opacity: .7; pointer-events: none; }

/* Campos */
.field { margin-bottom: 18px; }
.field > label, .field > legend { display: block; margin: 0 0 8px; padding: 0; font-size: .93rem; font-weight: 500; }
.field .opt { font-weight: 400; color: var(--tinta-2); }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select, .field textarea {
  width: 100%; min-height: 54px; padding: 14px 16px; font: 400 16px/1.4 var(--f); color: var(--tinta);
  background: #fff; border: 0; box-shadow: inset 0 0 0 1.5px rgba(41, 53, 26, .16); border-radius: var(--r-sm); -webkit-appearance: none; appearance: none;
  transition: border-color var(--d) var(--e-out), box-shadow var(--d) var(--e-out);
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2329351a' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; padding-right: 44px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--olivo); box-shadow: inset 0 0 0 2px var(--olivo), 0 0 0 4px rgba(98, 107, 58, .14); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #b3261e; }
.field .error { display: none; margin: 6px 0 0; color: #b3261e; font-size: .85rem; }
.field.has-error .error { display: block; }
fieldset.field { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.field-row { display: grid; gap: 0 14px; }
@media (min-width: 520px) { .field-row { grid-template-columns: 1fr 1fr; } }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 10px 18px; border-radius: 999px;
  background: #fff; box-shadow: inset 0 0 0 1px rgba(41, 53, 26, .2); font-size: .94rem; cursor: pointer;
  transition: background-color var(--d) var(--e-out), color var(--d) var(--e-out), box-shadow var(--d) var(--e-out);
}
.option input:checked + span { background: var(--bosque); color: var(--crema); box-shadow: none; }
.option input:focus-visible + span { outline: 2px solid var(--ocre); outline-offset: 2px; }
.field-note { display: flex; gap: 10px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--olivo-20); font-size: .9rem; margin: 4px 0 8px; }
.field-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--olivo); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--tinta-2); }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--bosque); flex: none; }
.consent a { color: var(--bosque); }
.consent.has-error { color: #b3261e; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================
   SISTEMA DE MOVIMIENTO v5 (2 dic 2026)
   Una regla: cada movimiento dice algo. Respuesta (te escuché), orientación (viene de aquí)
   o lectura (esto es lo importante). Solo transform y opacity; clip-path únicamente en
   aperturas de imagen. Los efectos de puntero viven solo en (hover: hover) and (pointer: fine).
   Tokens en :root (--dur-*, --ease-*, --dist-*). main.js los replica en MOTION.
   ========================================================== */

/* Aparición: sube desde una máscara (no un fundido): el bloque sale de su propio borde inferior */
[data-reveal] { clip-path: inset(0 0 100% 0); transform: translateY(var(--dist-3)); transition: clip-path var(--dur-reveal) var(--ease-enter), transform var(--dur-reveal) var(--ease-enter); transition-delay: var(--rd, 0ms); }
[data-reveal="img"] { transform: scale(1.06); clip-path: inset(8% 6% 8% 6% round var(--r-xl)); transition: clip-path var(--dur-scene) var(--ease-enter), transform var(--dur-scene) var(--ease-enter); }
[data-reveal].is-in { clip-path: inset(0 0 -20% 0); transform: none; }
[data-reveal="img"].is-in { clip-path: inset(0 0 0 0 round var(--r-xl)); }
.no-js [data-reveal] { transform: none; clip-path: none; }

/* Titulares por palabras con máscara: cada palabra sube desde detrás de su línea */
.is-split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .16em 0 .14em; margin: -.16em 0 -.14em; }
.is-split .w__i { display: inline-block; transform: translateY(118%) rotate(5deg); transform-origin: 0 100%; transition: transform var(--dur-reveal) var(--ease-enter); }
.is-split.is-in .w__i { transform: none; }

/* Enlaces de texto: la línea se dibuja de izquierda a derecha y sale por la derecha */
.hm-textlink, .ex-link, .nos-textlink, .ct-textlink {
  position: relative; display: inline-block; text-decoration: none !important; padding-bottom: 4px;
  background: linear-gradient(rgba(41, 53, 26, .2), rgba(41, 53, 26, .2)) 0 100% / 100% 1.5px no-repeat;
}
.hm-textlink::after, .ex-link::after, .nos-textlink::after, .ct-textlink::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform var(--dur-5) var(--ease-std);
}
.hm-textlink:focus-visible::after, .ex-link:focus-visible::after, .nos-textlink:focus-visible::after, .ct-textlink:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }
@media (hover: hover) and (pointer: fine) {
  .hm-textlink:hover::after, .ex-link:hover::after, .nos-textlink:hover::after, .ct-textlink:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
}
.on-dark .hm-textlink, .hm-end .hm-textlink { background-image: linear-gradient(rgba(255, 252, 245, .3), rgba(255, 252, 245, .3)); }

/* Botones magnéticos: main.js mueve la propiedad translate (no transform, así :active sigue escalando) */
.pill.is-mag { transition: transform var(--dur-2) var(--ease-std), translate var(--dur-5) var(--ease-enter), box-shadow var(--dur-4) var(--ease-std), color var(--dur-4) var(--ease-std); }
.pill.is-mag .pill__label { transition: translate var(--dur-5) var(--ease-enter); }

/* Odómetro: cada dígito es un rodillo que gira hasta su número */
.odo { display: inline-flex; vertical-align: top; }
.odo__d { position: relative; display: inline-block; overflow: hidden; height: 1em; line-height: 1; }
.odo__ghost { visibility: hidden; }
.odo__strip { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; transform: translateY(0); }
.odo__strip > span { height: 1em; line-height: 1; text-align: center; }
.odo.is-in .odo__strip { transform: translateY(calc(var(--n) * -1em)); transition: transform var(--dur-count) var(--ease-enter); transition-delay: var(--dd, 0ms); }

/* Inclinación suave de bodegones bajo el puntero (main.js escribe --rx / --ry) */
[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform var(--dur-5) var(--ease-enter); }

/* Transiciones entre páginas: ver bloque "Cortinilla" al final */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal], [data-reveal="img"] { transform: none; clip-path: none; }
  .is-split .w__i { transform: none; }
  [data-tilt] { transform: none; }
}

/* ==========================================================
   Sistema v6 (2 dic 2026): display con carácter.
   Archivo ancha (wdth 118) y muy pesada en mayúsculas para titulares;
   Figtree para leer. Botones en mayúsculas compactas. Fondos sólidos con degradado sutil.
   ========================================================== */
:root {
  --fd: "Archivo", "Arial Black", system-ui, sans-serif;
  --noche: #141b0c;
  --g-noche: radial-gradient(110% 90% at 12% 0%, #3a4a22 0%, #26321a 38%, #18200f 72%, #121809 100%);
  --g-bosque6: radial-gradient(120% 95% at 18% 0%, #4b5a2c 0%, #34421f 36%, #29351a 66%, #1f2913 100%);
  --g-ocre6: radial-gradient(120% 100% at 15% 0%, #e7b06c 0%, #d0893f 45%, #bd6c25 100%);
  --g-arena6: linear-gradient(180deg, #f6f0e2 0%, #efe7d4 100%);
}
.dx, h1.dx, h2.dx {
  font-family: var(--fd); font-stretch: 118%; font-weight: 850; text-transform: uppercase;
  line-height: .95; letter-spacing: -.015em; text-wrap: balance; margin: 0;
}
.dx--md { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.7rem); }
.dx--lg { font-size: clamp(2.4rem, 1.2rem + 5vw, 6rem); }
/* Titulares del resto del sitio con la misma voz */
main h1, main h2, .footer__claim {
  font-family: var(--fd) !important; font-stretch: 115% !important; font-weight: 850 !important; text-transform: uppercase; letter-spacing: -.012em !important; line-height: .98 !important;
}
main h1:not(.h6__t):not(.h9__t) { font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4.9rem) !important; }
main h2:not(.dx) { font-size: clamp(1.7rem, 1.1rem + 2.2vw, 3.4rem) !important; }
main h2.sg-b__t, main h2.sd-others__t { font-size: clamp(1.35rem, 1rem + 1.2vw, 2.1rem) !important; }
.pill { font-family: var(--fd); font-stretch: 110%; font-weight: 750; text-transform: uppercase; font-size: .9rem; letter-spacing: .02em; }

/* ==========================================================
   MOVIMIENTO v7 (2 dic 2026): cortinilla entre páginas, migas, acordeones,
   fotos que se descubren con el scroll y secciones que se apilan.
   Solo transform, opacity y clip-path (excepción documentada: filas de grid del acordeón).
   Todo se apaga con prefers-reduced-motion.
   ========================================================== */

/* ---------- Cortinilla entre páginas (View Transitions entre documentos) ----------
   1) la página que sale sube y se recorta desde abajo, descubriendo el bosque con el logo;
   2) una franja ocre barre de abajo hacia arriba;
   3) la página nueva entra detrás de la franja. Chrome/Edge 126+ y Safari 18.2+; el resto navega normal. */
@view-transition { navigation: auto; }
::view-transition-group(root) {
  animation-duration: 900ms;
  background: url("../img/logo-crema.png") 50% 50% / clamp(150px, 16vw, 230px) auto no-repeat, var(--g-bosque6);
}
::view-transition-image-pair(root) { background: var(--g-ocre6); animation: vt-band 480ms cubic-bezier(.7, 0, .2, 1) 340ms both; }
::view-transition-old(root) { animation: vt-old 380ms cubic-bezier(.7, 0, .3, 1) both; }
::view-transition-new(root) { animation: vt-new 520ms cubic-bezier(.65, 0, .2, 1) 380ms both; }
@keyframes vt-old { to { clip-path: inset(0 0 100% 0); transform: translateY(-9vh); } }
@keyframes vt-band { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes vt-new { from { clip-path: inset(100% 0 0 0); transform: translateY(14vh); } to { clip-path: inset(0 0 0 0); transform: none; } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ---------- Migas de pan (componente global) ----------
   Aplica a toda <nav aria-label="Ruta de navegación"> sin tocar el HTML de cada página.
   El atributo va doble para ganarle a los estilos viejos de cada página (.sg-crumbs, .n7__crumbs, .e7h__crumbs, .crumbs).
   Toma el color del fondo donde vive (currentColor): sirve igual en claro, ocre u oscuro. */
nav[aria-label="Ruta de navegación"][aria-label] { display: block; margin: 0 0 clamp(18px, 2.8vh, 30px); color: inherit; }
nav[aria-label="Ruta de navegación"][aria-label] ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin: 0; padding: 0; list-style: none;
  font-family: var(--f); font-size: .9rem; font-weight: 500; line-height: 1.25; letter-spacing: 0; text-transform: none; color: inherit; opacity: 1;
}
nav[aria-label="Ruta de navegación"][aria-label] li, nav[aria-label="Ruta de navegación"][aria-label] li[class] { display: inline-flex; align-items: center; min-width: 0; margin: 0; padding: 0; }
nav[aria-label="Ruta de navegación"][aria-label] li + li::before {
  content: ""; flex: none; width: 6px; height: 10px; margin: 0 11px 0 12px; padding: 0; opacity: .5; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
nav[aria-label="Ruta de navegación"][aria-label] a {
  position: relative; display: inline-flex; align-items: center; min-height: 0; padding: 12px 0; margin: -12px 0;
  color: inherit; text-decoration: none; opacity: 1; font-weight: 500;
}
nav[aria-label="Ruta de navegación"][aria-label] a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 9px; height: 1.5px; border-radius: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform var(--dur-4) var(--ease-std);
}
nav[aria-label="Ruta de navegación"][aria-label] a:focus-visible { opacity: 1; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  nav[aria-label="Ruta de navegación"][aria-label] a:hover { opacity: 1; text-decoration: none; }
  nav[aria-label="Ruta de navegación"][aria-label] a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
}
nav[aria-label="Ruta de navegación"][aria-label] li[aria-current] { display: inline-flex; }
nav[aria-label="Ruta de navegación"][aria-label] [aria-current] { padding: 0; font-weight: 700; color: inherit; opacity: 1; overflow-wrap: anywhere; }

/* ---------- Acordeones v7 ----------
   main.js agrupa todo <details> con hermanos (.acc-g / .acc__item), cierra el abierto al abrir otro
   y envuelve la respuesta en .acc__panel > .acc__inner. El fondo del renglón nace del ícono:
   un círculo de bosque que, al abrir, crece hasta cubrir la fila (clip-path) y regresa al cerrar. */
.acc-g.acc-g { --acc-px: clamp(18px, 2.2vw, 30px); --acc-py: clamp(20px, 2.4vw, 28px); --acc-ic: 44px;
  --acc-panel: var(--g-bosque6); --acc-on: var(--crema); --acc-on-2: var(--crema-80); --acc-hover: rgba(41, 53, 26, .05);
  display: grid; gap: 4px; border: 0; padding: 0; }
.acc-g--dark.acc-g--dark { --acc-panel: var(--g-crema); --acc-on: var(--bosque); --acc-on-2: var(--tinta-2); --acc-hover: rgba(255, 252, 245, .06); }
.acc-g > .acc__item { position: relative; isolation: isolate; margin: 0; padding: 0; border: 0; font-size: clamp(1.12rem, .95rem + .85vw, 1.62rem); border-radius: var(--r); background: none; box-shadow: none; }
/* capa de fondo: en reposo es exactamente el círculo del ícono */
.acc-g > .acc__item::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--acc-panel); pointer-events: none;
  clip-path: circle(calc(var(--acc-ic) / 2) at calc(100% - var(--acc-px) - var(--acc-ic) / 2) calc(var(--acc-py) + .58em));
  transition: clip-path 300ms cubic-bezier(.4, 0, .2, 1);
}
.acc-g > .acc__item.is-open::before { clip-path: circle(150% at calc(100% - var(--acc-px) - var(--acc-ic) / 2) calc(var(--acc-py) + .58em)); transition: clip-path 520ms var(--ease-enter); }
/* tinte de hover que aparece detrás de toda la fila */
.acc-g > .acc__item::after { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; background: var(--acc-hover); opacity: 0; transition: opacity var(--dur-3) var(--ease-std); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .acc-g > .acc__item:not(.is-open) > summary:hover { color: inherit; } .acc-g > .acc__item:not(.is-open):hover::after { opacity: 1; } }
.acc-g > .acc__item > summary {
  list-style: none; cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: clamp(16px, 2.4vw, 40px);
  min-height: 0; margin: 0; padding: var(--acc-py) var(--acc-px); border-radius: inherit; color: inherit;
  font-family: var(--fd); font-stretch: 112%; font-weight: 750; text-transform: none; letter-spacing: -.012em;
  font-size: inherit; line-height: 1.16; text-wrap: balance;
  transition: color var(--dur-4) var(--ease-std);
  -webkit-tap-highlight-color: transparent;
}
.acc-g > .acc__item > summary::-webkit-details-marker { display: none; }
.acc-g > .acc__item > summary::marker { content: ""; }
.acc-g > .acc__item > summary:focus-visible { outline: 3px solid var(--ocre); outline-offset: 2px; }
.acc-g > .acc__item.is-open > summary { color: var(--acc-on); }
.acc-g .acc__q { min-width: 0; }
/* ícono: el círculo lo pinta la capa de fondo; aquí solo la cruz que gira */
.acc-g > .acc__item .acc__icon {
  position: relative; flex: none; width: var(--acc-ic); height: var(--acc-ic); margin: calc(.58em - var(--acc-ic) / 2) 0 0; border-radius: 50%; background: none; color: var(--acc-on);
  transition: transform 420ms var(--ease-enter), color var(--dur-4) var(--ease-std);
}
.acc-g > .acc__item .acc__icon::before, .acc-g > .acc__item .acc__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 2px; margin: -1px 0 0 -8px; border-radius: 2px; background: currentColor; transform: none; transition: none;
}
.acc-g > .acc__item .acc__icon::after { transform: rotate(90deg); }
.acc-g > .acc__item.is-open .acc__icon { transform: rotate(135deg); color: var(--ocre-claro); }
.acc-g--dark > .acc__item.is-open .acc__icon { color: var(--ocre-txt); }
@media (hover: hover) and (pointer: fine) { .acc-g > .acc__item:not(.is-open) > summary:hover .acc__icon { transform: rotate(90deg); } }
.acc-g > .acc__item > summary:active .acc__icon { scale: .92; }
/* panel: filas de grid 0fr → 1fr (única excepción de layout); el texto entra con opacidad y 8 px */
.acc-g .acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 280ms cubic-bezier(.4, 0, .2, 1); }
.acc-g .is-open > .acc__panel { grid-template-rows: 1fr; transition: grid-template-rows 400ms var(--ease-enter); }
.acc-g .acc__inner { min-height: 0; overflow: hidden; }
.acc-g .acc__inner > * {
  margin: 0; padding: 0 calc(var(--acc-px) + var(--acc-ic) + 24px) var(--acc-py) var(--acc-px); max-width: none; color: var(--acc-on-2);
  font-size: 1.02rem; line-height: 1.65; opacity: 0; transform: translateY(calc(var(--dist-2) * -1)); transition: opacity 160ms var(--ease-std), transform 160ms var(--ease-std);
}
.acc-g .acc__inner > * p { max-width: 62ch; margin: 0 0 .7em; color: inherit; }
.acc-g .acc__inner > * p:last-child { margin-bottom: 0; }
.acc-g .acc__inner a { color: inherit; text-underline-offset: 3px; }
.acc-g .is-open .acc__inner > * { opacity: 1; transform: none; transition: opacity 360ms var(--ease-std) 140ms, transform 460ms var(--ease-enter) 120ms; }
@media (max-width: 600px) { .acc-g.acc-g { --acc-ic: 40px; } .acc-g .acc__inner > * { padding-right: var(--acc-px); } }

/* ---------- Fotos que se descubren con el scroll (main.js marca .rv-clip) ----------
   La ventana se abre desde el centro y la foto se asienta de 1.22 a 1, ligada al scroll (sin JS por cuadro). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rv-clip { view-timeline-name: --rv; animation: rv-clip linear both; animation-timeline: --rv; animation-range: entry 5% cover 42%; }
    .rv-clip.rv-zoom img { animation: rv-zoom linear both; animation-timeline: --rv; animation-range: entry 0% cover 55%; }
  }
}
@keyframes rv-clip { from { clip-path: inset(16% 12% 16% 12% round calc(var(--rv-r, 0px) + 20px)); } to { clip-path: inset(0 0 0 0 round var(--rv-r, 0px)); } }
@keyframes rv-zoom { from { transform: scale(1.22); } to { transform: scale(1); } }

/* ---------- Secciones que se apilan (main.js marca .stk / .stk-next y escribe top) ----------
   La sección se queda quieta cuando su borde inferior toca el fondo de la pantalla; la siguiente sube
   encima como una hoja, y la de atrás retrocede (main.js escribe transform y clip-path). */
.stk { position: sticky; isolation: isolate; transform-origin: 50% var(--stk-oy, 50%); }
.stk-next:not(.stk) { position: relative; isolation: isolate; }
.stk.stk-next { isolation: isolate; }
