/* ============================================================
   OptiRest v2 — styles.css
   Tokens → reset → base → components → sections → motion → responsive
   ============================================================ */

:root {
  /* Palette */
  --primary:        #0F6E56;
  --primary-light:  #5DCAA5;
  --bg-warm:        #F4F1EA;
  --bg-white:       #FFFFFF;
  --text-main:      #1A1A1A;
  --text-muted:     #555555;

  /* Derived */
  --primary-dark:   #0B5240;
  --primary-tint:   #EAF6F1;
  --border:         #E7E2D7;

  /* Radii */
  --r-card:  12px;
  --r-btn:   8px;
  --r-badge: 24px;

  /* Shadows */
  --shadow-card: 0 2px 16px rgba(0,0,0,.06);
  --shadow-lift: 0 18px 44px rgba(15,110,86,.16);

  /* Layout */
  --container:   1120px;
  --pad-x:       clamp(1rem, 5vw, 3rem);
  --section-gap: clamp(4rem, 8vw, 7rem);

  /* Fluid type */
  --fs-hero:  clamp(2.2rem, 6.2vw, 4rem);
  --fs-h2:    clamp(1.7rem, 3.8vw, 2.6rem);
  --fs-h3:    1.15rem;
  --fs-body:  clamp(1rem, 1.1vw, 1.0625rem);
  --fs-small: .875rem;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
section[id], .hero[id] { scroll-margin-top: 84px; }

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 3px solid rgba(15,110,86,.55); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad-x); }

.section { padding-block: var(--section-gap); }
.section--white { background: var(--bg-white); }
.section--warm  { background: var(--bg-warm); }

.section__head { max-width: 640px; margin-inline: auto; margin-bottom: clamp(2.2rem, 4vw, 3.4rem); text-align: center; }
.section__title { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.section__sub { margin-top: .9rem; color: var(--text-muted); font-size: 1.05rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; margin-bottom: .9rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--primary);
}
.section__head .eyebrow { justify-content: center; }
.eyebrow__arc {
  width: 20px; height: 12px; flex: 0 0 20px;
  background: center/contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12' fill='none' stroke='%230F6E56' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M2 9.5 A8 8 0 0 1 18 9.5'/%3E%3Cpath d='M5.6 11.4 A4.4 4.4 0 0 1 14.4 11.4'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: var(--r-btn); font-weight: 600; line-height: 1; white-space: nowrap;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.btn--lg { padding: 1rem 1.9rem; font-size: 1.0625rem; }

.btn--solid { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(15,110,86,.22); }
.btn--solid:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,110,86,.32); }

.btn--ghost { background: transparent; color: var(--primary); border: 1.5px solid rgba(15,110,86,.32); }
.btn--ghost:hover { background: rgba(15,110,86,.06); border-color: var(--primary); transform: translateY(-2px); }

.btn--muted { background: #fff; color: #999; border: 1.5px solid #CCCCCC; }
.btn--muted:hover { color: var(--text-muted); border-color: #B4B4B4; transform: translateY(-1px); }

.btn--white { background: #fff; color: var(--primary); box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.btn--white:hover { background: #F1FAF6; transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0,0,0,.24); }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(255,255,255,.95);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__brand { display: inline-flex; align-items: center; animation: loadDown .6s ease-out both; animation-delay: .1s; }
.nav__logo { height: 38px; width: auto; }

.nav__links { display: flex; align-items: center; gap: 1.4rem; }
.nav__client { padding: .62rem 1.1rem; font-size: .9rem; }
.nav__link { position: relative; font-weight: 600; font-size: .95rem; color: var(--text-main); transition: color .2s var(--ease); }
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px;
  background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__link:hover { color: var(--primary); }
.nav__link:hover::after, .nav__link:focus-visible::after { transform: scaleX(1); }
.nav__cta { color: #fff; }
.nav__cta::after { display: none; }

.nav__burger { display: none; width: 44px; height: 44px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav__burger span { width: 24px; height: 2px; background: var(--text-main); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav.menu-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__scrim {
  position: fixed; inset: 0; z-index: 99; background: rgba(20,20,20,.42);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.nav__scrim.is-open { opacity: 1; pointer-events: auto; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  padding-top: clamp(7rem, 13vh, 9.5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem);
  background: radial-gradient(120% 90% at 80% -10%, rgba(93,202,165,.14), transparent 55%), var(--bg-white);
}
.hero__glow {
  position: absolute; top: -12%; right: -14%;
  width: 62vw; height: 62vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle, rgba(93,202,165,.24), transparent 62%); pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: minmax(0,1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.hero__copy { min-width: 0; }
.hero__title { font-size: var(--fs-hero); font-weight: 800; line-height: 1.05; letter-spacing: -.032em; margin-top: .3rem; }
.hero__accent { color: var(--primary); }
.hero__sub { margin-top: 1.2rem; max-width: 46ch; font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--text-muted); }
.hero__pitch { margin-top: .85rem; max-width: 48ch; font-weight: 500; font-size: clamp(.95rem, 1.15vw, 1.05rem); color: var(--text-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.9rem; }
.hero__proof { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: 1.7rem; font-size: var(--fs-small); color: var(--text-muted); }
.hero__proof li { display: inline-flex; align-items: center; gap: .5rem; }
.hero__proof span { color: var(--primary-light); font-size: 1.2rem; line-height: 0; }
.hero__local { margin-top: 1.05rem; font-size: .82rem; font-weight: 500; color: var(--text-muted); }
.hero__art { display: flex; justify-content: center; min-width: 0; padding-inline: clamp(1.5rem, 6vw, 4rem); }
.signature { width: 100%; max-width: 500px; height: auto; }

/* ---------- Hero load sequence ---------- */
.load { animation-fill-mode: both; }
.load--1 { animation: loadUp .7s var(--ease) both; animation-delay: .15s; }
.load--2 { animation: loadUp .75s var(--ease) both; animation-delay: .3s; }
.load--3 { animation: loadUp .75s var(--ease) both; animation-delay: .5s; }
.load--4 { animation: loadScale .6s var(--ease) both; animation-delay: .7s; }
.load--5 { animation: loadFade .7s var(--ease) both; animation-delay: .9s; }
.load--3b { animation: loadUp .75s var(--ease) both; animation-delay: .62s; }
.load--6 { animation: loadFade .7s var(--ease) both; animation-delay: 1.05s; }
.load--art { animation: loadFade .9s var(--ease) both; animation-delay: .5s; }
@keyframes loadUp   { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes loadScale{ from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
@keyframes loadFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes loadDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ---------- Hero phone illustration (self-drawing via stroke-dashoffset) ---------- */
.phone { overflow: visible; max-width: 430px; }
.ph-shadow     { fill: var(--primary); opacity: .06; }
.ph-frame      { fill: var(--primary); }
.ph-speaker    { fill: #6FBFA2; }
.ph-screen     { fill: #F7F6F2; }
.ph-rowbg      { fill: #fff; }
.ph-check-bg   { fill: var(--primary); }
.ph-dot        { fill: var(--primary-light); }

/* stroke draw-in — pathLength="1" normalises every shape to one dash */
.pdraw { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: pdraw 1s var(--ease) forwards; }
.ph-title      { stroke: var(--primary-light); stroke-width: 16; }
.ph-line       { stroke: #C7C4BB; stroke-width: 10; }
.ph-rowborder  { stroke: var(--primary-light); stroke-width: 2.5; }
.ph-check-tick { stroke: #fff; stroke-width: 2.6; }
.ph-sig        { stroke: var(--primary-light); stroke-width: 5; }
@keyframes pdraw { to { stroke-dashoffset: 0; } }

.ph-fade { animation: phFade .6s var(--ease) both; }
@keyframes phFade { from { opacity: 0; } to { opacity: 1; } }
.ph-pop { transform-box: fill-box; transform-origin: center; animation: phPop .5s var(--ease) both; }
@keyframes phPop { 0% { opacity: 0; transform: scale(.2); } 60% { opacity: 1; transform: scale(1.18); } 100% { opacity: 1; transform: scale(1); } }
.ph-signal { animation: phSignal 2.8s ease-in-out 2.4s infinite; }
@keyframes phSignal { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* ============================================================
   REVEAL ON SCROLL (JS toggles .is-visible)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal--left  { transform: translateX(-42px); }
.reveal--right { transform: translateX(42px); }
.reveal--scale { transform: translateY(28px) scale(.96); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Stagger inside grids */
.pain-grid .reveal:nth-child(2) { transition-delay: .15s; }
.pain-grid .reveal:nth-child(3) { transition-delay: .30s; }
.pain-grid .reveal:nth-child(4) { transition-delay: .45s; }
.pillar-grid .reveal:nth-child(2) { transition-delay: .12s; }
.pillar-grid .reveal:nth-child(3) { transition-delay: .24s; }
.pillar-grid .reveal:nth-child(4) { transition-delay: .36s; }
.steps .reveal:nth-child(2) { transition-delay: .18s; }
.steps .reveal:nth-child(3) { transition-delay: .36s; }

/* ============================================================
   PAIN POINTS
   ============================================================ */
.pain-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.pain-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow-card);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), opacity .7s var(--ease);
}
.pain-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.09); }
.pain-card__icon { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; color: var(--primary); background: var(--primary-tint); border-radius: 12px; }
.pain-card__icon svg { width: 26px; height: 26px; }
.pain-card p { font-weight: 500; }

/* ============================================================
   PILARES
   ============================================================ */
.pillar-grid { display: grid; grid-template-columns: 1fr; gap: clamp(1rem, 2.5vw, 1.6rem); }
.pillar {
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 1.8rem; box-shadow: var(--shadow-card);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease), opacity .6s var(--ease);
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: rgba(15,110,86,.25); }
.pillar__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; color: var(--primary); background: linear-gradient(145deg, var(--primary-tint), #fff); border: 1px solid rgba(15,110,86,.14); border-radius: 14px; margin-bottom: 1.1rem; }
.pillar__icon svg { width: 28px; height: 28px; }
.pillar__title { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.01em; margin-bottom: .5rem; }
.pillar p { color: var(--text-muted); }

/* ---------- Por qué OptiRest ---------- */
.why-grid { display: grid; grid-template-columns: 1fr; gap: clamp(1rem, 2.5vw, 1.6rem); }
.why-grid .reveal:nth-child(2) { transition-delay: .12s; }
.why-grid .reveal:nth-child(3) { transition-delay: .24s; }
.why-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--r-card); padding: 1.8rem; box-shadow: var(--shadow-card); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease), opacity .6s var(--ease); }
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: rgba(15,110,86,.25); }
.why-card__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; color: var(--primary); background: linear-gradient(145deg, var(--primary-tint), #fff); border: 1px solid rgba(15,110,86,.14); border-radius: 14px; margin-bottom: 1.1rem; }
.why-card__icon svg { width: 28px; height: 28px; }
.why-card__title { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.01em; margin-bottom: .5rem; }
.why-card p { color: var(--text-muted); }

/* ============================================================
   CÓMO FUNCIONA
   ============================================================ */
.steps { position: relative; display: grid; grid-template-columns: 1fr; gap: 1.6rem; }
.step {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1.1rem;
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 1.6rem 1.6rem; box-shadow: var(--shadow-card);
  transition: transform .6s var(--ease), opacity .6s var(--ease);
}
.step > :not(.step__bg) { position: relative; z-index: 1; }
.step__bg { position: absolute; top: -.6rem; right: .4rem; z-index: 0; font-size: clamp(5rem, 12vw, 8rem); font-weight: 900; line-height: 1; color: var(--primary); opacity: .08; letter-spacing: -.04em; pointer-events: none; }
.step__icon { display: grid; place-items: center; width: 46px; height: 46px; color: var(--primary); background: var(--primary-tint); border-radius: 12px; }
.step__icon svg { width: 26px; height: 26px; }
.step__text { font-weight: 500; }

/* ============================================================
   PLANES
   ============================================================ */
.plans { display: grid; grid-template-columns: 1fr; gap: 1.8rem; max-width: 860px; margin-inline: auto; }
.plans--single { display: block; max-width: 480px; margin-inline: auto; }
.plan {
  position: relative; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 2rem 1.7rem; transition: transform .6s var(--ease), opacity .6s var(--ease), box-shadow .3s var(--ease);
}
.plan__name { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; }
.plan__price { display: flex; align-items: baseline; gap: .25rem; margin-top: .5rem; }
.plan__amount { font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; color: var(--text-main); }
.plan__period { color: var(--text-muted); font-weight: 500; }
.plan__setup { margin-top: .35rem; color: var(--text-muted); font-size: var(--fs-small); }
.plan__setup strong { color: var(--text-main); font-weight: 700; }
.plan__features { margin: 1.4rem 0; }
.plan__features li { display: flex; align-items: flex-start; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid rgba(0,0,0,.055); }
.plan__features li:last-child { border-bottom: 0; }
.plan__features .is-no { color: #BBBBBB; text-decoration: line-through; }
.plan__features .is-key { font-weight: 700; }
.plan__cta { width: 100%; margin-top: .4rem; }
.plan__cta--big { padding: 1.05rem 1.4rem; font-size: 1.08rem; box-shadow: 0 10px 26px rgba(15,110,86,.28); }

.tick, .cross { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px; }

/* Muted plan (Presencia) */
.plan--muted { background: #FAFAFA; border: 1px solid #E0E0E0; opacity: .88; box-shadow: none; }
.plan--muted:hover { opacity: .95; }
.plan--muted .tick {
  background: #EDEDED center/13px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4 10-11'/%3E%3C/svg%3E");
}
.cross {
  background: #F4F4F2 center/12px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CCCCCC' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E");
}

/* Featured plan (OptiRest) */
.plan--featured {
  border: 2px solid var(--primary); background: #fff;
  box-shadow: 0 8px 32px rgba(15,110,86,.12); z-index: 2;
}
.plan--featured:hover { box-shadow: 0 8px 32px rgba(15,110,86,.12), 0 0 22px rgba(15,110,86,.16); }
.plan--featured .tick {
  background: var(--primary-tint) center/13px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F6E56' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4 10-11'/%3E%3C/svg%3E");
}
.plan__badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(120deg, var(--primary), #14855f); color: #fff;
  padding: .42rem 1.1rem; border-radius: var(--r-badge);
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15,110,86,.32); overflow: hidden;
}
.plan__badge::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%); animation: shimmer 3.2s ease-in-out infinite;
}
@keyframes shimmer { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }
.plan__nudge {
  display: inline-block; margin-top: .6rem;
  background: rgba(93,202,165,.15); color: var(--primary); font-weight: 600;
  padding: .32rem .8rem; border-radius: var(--r-badge); font-size: .76rem; line-height: 1.35;
}

/* Check pop-in when a plan enters view */
.plan.is-visible .tick, .plan.is-visible .cross { animation: tickPop .45s var(--ease) both; }
.plan.is-visible .plan__features li:nth-child(1) .tick,
.plan.is-visible .plan__features li:nth-child(1) .cross { animation-delay: .15s; }
.plan.is-visible .plan__features li:nth-child(2) .tick,
.plan.is-visible .plan__features li:nth-child(2) .cross { animation-delay: .23s; }
.plan.is-visible .plan__features li:nth-child(3) .tick,
.plan.is-visible .plan__features li:nth-child(3) .cross { animation-delay: .31s; }
.plan.is-visible .plan__features li:nth-child(4) .tick,
.plan.is-visible .plan__features li:nth-child(4) .cross { animation-delay: .39s; }
.plan.is-visible .plan__features li:nth-child(5) .tick,
.plan.is-visible .plan__features li:nth-child(5) .cross { animation-delay: .47s; }
.plan.is-visible .plan__features li:nth-child(6) .tick,
.plan.is-visible .plan__features li:nth-child(6) .cross { animation-delay: .55s; }
.plan.is-visible .plan__features li:nth-child(7) .tick,
.plan.is-visible .plan__features li:nth-child(7) .cross { animation-delay: .63s; }
@keyframes tickPop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

.plans__foot { margin-top: 1.8rem; text-align: center; color: var(--text-muted); font-size: var(--fs-small); }

/* ============================================================
   ESTADÍSTICAS
   ============================================================ */
.stats { display: grid; grid-template-columns: 1fr; gap: 1.2rem; text-align: center; }
.stat { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--r-card); padding: 2rem 1.4rem; box-shadow: var(--shadow-card); transition: transform .3s var(--ease), box-shadow .3s var(--ease), opacity .7s var(--ease); }
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.stat__num { display: block; font-size: clamp(2.6rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--primary); }
.stat__label { display: block; margin-top: .7rem; color: var(--text-muted); font-size: .95rem; }

/* ============================================================
   CTA FINAL
   ============================================================ */
.cta { position: relative; overflow: hidden; background: var(--primary); color: #fff; text-align: center; }
.cta__signal { position: absolute; inset: 0; pointer-events: none; background: repeating-radial-gradient(circle at 88% 12%, transparent 0 40px, rgba(255,255,255,.05) 40px 41px); }
.cta__inner { position: relative; max-width: 640px; }
.cta__title { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.cta__sub { margin-top: .9rem; font-size: 1.1rem; color: rgba(255,255,255,.86); }
.cta__btn { margin-top: 1.8rem; }
.cta__inner.is-visible .cta__btn { animation: btnBounce .65s var(--ease) .25s both; }
@keyframes btnBounce { 0% { opacity: 0; transform: translateY(10px) scale(.9); } 60% { opacity: 1; transform: translateY(0) scale(1.05); } 100% { transform: scale(1); } }
.cta__micro { margin-top: 1rem; font-size: var(--fs-small); color: rgba(255,255,255,.72); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--text-main); color: rgba(255,255,255,.72); padding-block: clamp(2.6rem, 5vw, 3.6rem) 1.6rem; }
.footer__inner { display: grid; grid-template-columns: 1fr; gap: 1.8rem; }
.footer__logo { height: 34px; width: auto; filter: brightness(0) invert(1); }
.footer__tag { margin-top: .9rem; font-size: var(--fs-small); max-width: 34ch; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer__nav a, .footer__contact a { transition: color .2s var(--ease); }
.footer__nav a:hover, .footer__contact a:hover { color: var(--primary-light); }
.footer__contact { display: grid; gap: .4rem; font-size: .95rem; }
.footer__contact a:first-child { color: #fff; font-weight: 600; }
.footer__bottom { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.12); font-size: var(--fs-small); color: rgba(255,255,255,.5); }

/* ============================================================
   WHATSAPP FAB (pulse)
   ============================================================ */
.wa-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 95;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25D366; color: #fff; box-shadow: 0 4px 16px rgba(37,211,102,.4);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.wa-fab:hover { transform: scale(1.12); box-shadow: 0 8px 24px rgba(37,211,102,.55); }
.wa-fab svg { position: relative; z-index: 1; }
.wa-fab__pulse { position: absolute; inset: 0; border-radius: 50%; background: #25D366; z-index: 0; animation: waPulse 2s ease-out infinite; }
@keyframes waPulse { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(1.7); opacity: 0; } }

/* ============================================================
   EXPRESSIVE HEADLINES + HIGHLIGHT WORD
   ============================================================ */
.section__title { font-weight: 400; }
.section__title .hl-strong,
.hero__title,
.oc-closing em { font-weight: 900; font-style: normal; color: inherit; }
.section__title--xl { font-size: clamp(3rem, 7vw, 6rem); letter-spacing: -.04em; line-height: 1.02; }
.hl-strong { color: var(--primary); font-style: normal; }

/* ============================================================
   HERO ADD-ONS: badge + floating notifications
   ============================================================ */
.hero__badge {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-bottom: 1rem; padding: .5rem 1rem;
  background: var(--primary-tint); border: 1px solid rgba(15,110,86,.18);
  border-radius: var(--r-badge); font-size: .82rem; font-weight: 600; color: var(--primary);
  position: relative; overflow: hidden;
}
.hero__badge::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%);
  transform: translateX(-120%); animation: shimmer 3.6s ease-in-out .8s infinite;
}
.load--0 { animation: loadUp .6s var(--ease) both; animation-delay: 0s; }

.hero__art { position: relative; }
.hero__notif {
  position: absolute; z-index: 2;
  background: #fff; color: var(--text-main); font-size: .82rem; font-weight: 600;
  padding: .55rem .9rem; border-radius: 999px; box-shadow: 0 10px 28px rgba(0,0,0,.12);
  white-space: nowrap; opacity: 0; animation: notifIn .6s var(--ease) both, notifFloat 5s ease-in-out infinite;
}
.hero__notif--1 { top: 2%;   left: -8%;  animation-delay: 1.9s, 2.5s; }
.hero__notif--2 { top: 52%;  right: -14%; animation-delay: 2.15s, 2.75s; }
.hero__notif--3 { bottom: -2%; left: -6%;  animation-delay: 2.4s, 3s; }
@keyframes notifIn { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes notifFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ============================================================
   AMBIENT FLOATING SHAPES (behind sections)
   ============================================================ */
.section--floaty { position: relative; }
.section-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.section--floaty > .container { position: relative; z-index: 1; }
.float-shape {
  position: absolute; display: block; border-radius: 50%;
  background: var(--primary-light); opacity: .1;
  animation: floatY 7s ease-in-out infinite;
}
.float-shape--a { top: 8%; left: 4%; width: 140px; height: 140px; border: 2px solid var(--primary-light); background: none; opacity: .18; animation-duration: 8s; }
.float-shape--b { bottom: 6%; right: 6%; width: 200px; height: 200px; animation-duration: 9.5s; animation-delay: .6s; }
.float-shape--c { top: 12%; right: 10%; width: 90px; height: 90px; background: var(--primary); opacity: .08; border-radius: 30% 70% 60% 40% / 40% 40% 60% 60%; animation-duration: 6.5s; animation-delay: .3s; }
.float-shape--d { bottom: 10%; left: 8%; width: 110px; height: 110px; border: 2px solid var(--primary); background: none; opacity: .12; animation-duration: 7.5s; animation-delay: .8s; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* svg-based float shapes inside OptiCoach bg */
.opticoach__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.opticoach__bg svg { width: 100%; height: 100%; }

/* ============================================================
   OPTICOACH
   ============================================================ */
.opticoach { position: relative; overflow: hidden; background: linear-gradient(175deg, var(--primary-tint) 0%, var(--bg-white) 46%); }
.opticoach__inner { position: relative; z-index: 1; }
.oc-badge {
  display: inline-flex; align-items: center; margin-bottom: 1rem; padding: .42rem 1.1rem;
  background: var(--primary); color: #fff; border-radius: var(--r-badge);
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
}
.oc-intro { max-width: 62ch; margin: 0 auto clamp(2.4rem, 5vw, 3.6rem); text-align: center; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-main); line-height: 1.55; }

.oc-grid { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }
.oc-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 2rem; box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .6s var(--ease);
}
.oc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.oc-card__icon {
  display: inline-grid; place-items: center; width: 56px; height: 56px; color: var(--primary);
  background: linear-gradient(145deg, var(--primary-tint), #fff); border: 1px solid rgba(15,110,86,.14);
  border-radius: 16px; margin-bottom: 1.2rem; transition: transform .35s var(--ease);
}
.oc-card:hover .oc-card__icon { transform: rotate(6deg) scale(1.08); }
.oc-card__icon svg { width: 30px; height: 30px; }
.oc-card__title { font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 800; letter-spacing: -.01em; margin-bottom: .6rem; }
.oc-card p { color: var(--text-muted); margin-bottom: 1.4rem; }

.oc-mock { position: relative; background: #E5F5EE; border-radius: 12px; padding: 1rem 1.1rem; font-size: .88rem; line-height: 1.55; min-height: 3.2rem; }
.oc-mock__typing { display: inline-flex; gap: 4px; align-items: center; }
.oc-mock__typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: .5; animation: typingDot 1.1s ease-in-out infinite; }
.oc-mock__typing i:nth-child(2) { animation-delay: .15s; }
.oc-mock__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.oc-mock__msg { display: none; flex-direction: column; gap: .35rem; color: var(--text-main); }
.oc-mock__msg strong { display: block; margin-bottom: .15rem; font-weight: 700; }
.oc-mock.is-typed .oc-mock__typing { display: none; }
.oc-mock.is-typed .oc-mock__msg { display: flex; animation: loadFade .4s var(--ease) both; }
.oc-mock__line--ok { color: var(--primary-dark); }
.oc-mock__line--warn { color: #A8710B; }
.oc-mock__line--tip { color: var(--primary); font-weight: 600; }

.oc-closing { margin-top: clamp(2.6rem, 5vw, 3.8rem); text-align: center; font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 400; letter-spacing: -.01em; }

/* ============================================================
   OPTICONTABLE — shares the oc-* system, own background direction
   ============================================================ */
.opticontable { position: relative; overflow: hidden; background: linear-gradient(5deg, var(--primary-tint) 0%, var(--bg-white) 46%); }
.oc-grid--4 { grid-template-columns: 1fr; }
.oc-grid--4 .why-card:nth-child(2) { transition-delay: .1s; }
.oc-grid--4 .why-card:nth-child(3) { transition-delay: .2s; }
.oc-grid--4 .why-card:nth-child(4) { transition-delay: .3s; }

.oct-dash {
  max-width: 640px; margin: clamp(2.4rem, 5vw, 3.6rem) auto 0;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 1.8rem 2rem; box-shadow: var(--shadow-card);
}
.oct-dash__title { display: block; font-weight: 700; font-size: .92rem; color: var(--text-muted); margin-bottom: 1rem; }
.oct-dash__row { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; font-size: 1rem; color: var(--text-main); margin-bottom: 1.4rem; }
.oct-dash__row strong { display: block; font-size: .78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .15rem; }
.oct-dash__bars { display: flex; align-items: flex-end; gap: .55rem; height: 64px; }
.oct-dash__bars span { flex: 1; height: var(--h); background: var(--primary-light); border-radius: 4px 4px 0 0; }

/* ============================================================
   BUTTON PERSONALITY: shine + arrow + press
   ============================================================ */
.btn { position: relative; overflow: hidden; }
.btn:active { transform: scale(.98) !important; }
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-130%); transition: transform .6s var(--ease); pointer-events: none;
}
.btn:hover::before { transform: translateX(130%); }
.btn--outline-nav { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn--outline-nav:hover { background: var(--primary-tint); transform: translateY(-2px); }
.btn--arrow::after {
  content: "→"; display: inline-block; margin-left: .2rem; transition: transform .3s var(--ease);
}
.btn--arrow:hover::after { transform: translateX(4px); }

/* ============================================================
   STAT SPARKLINES
   ============================================================ */
.stat__spark { display: block; width: 100%; height: 26px; margin-top: .9rem; }
.stat__spark polyline { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sparkDraw 1.2s var(--ease) .3s forwards; }
@keyframes sparkDraw { to { stroke-dashoffset: 0; } }
.stat__spark--bars rect { fill: var(--primary-light); opacity: 0; transform-box: fill-box; transform-origin: bottom; animation: barGrow .5s var(--ease) both; }
.stat__spark--bars rect:nth-child(1) { animation-delay: .1s; } .stat__spark--bars rect:nth-child(2) { animation-delay: .2s; }
.stat__spark--bars rect:nth-child(3) { animation-delay: .3s; } .stat__spark--bars rect:nth-child(4) { animation-delay: .4s; }
.stat__spark--bars rect:nth-child(5) { animation-delay: .5s; }
@keyframes barGrow { from { opacity: 0; transform: scaleY(.2); } to { opacity: 1; transform: scaleY(1); } }

/* ============================================================
   NAV LINK — richer hover
   ============================================================ */
.nav__link { transition: color .4s var(--ease); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 768px) {
  .pain-grid  { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
  .oc-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .pillar-grid{ grid-template-columns: repeat(2, 1fr); }
  .why-grid   { grid-template-columns: repeat(3, 1fr); }
  .stats      { grid-template-columns: repeat(3, 1fr); }
  .oc-grid    { grid-template-columns: repeat(2, 1fr); }

  .steps { grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
  .step { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 2.4rem 1.6rem 2rem; gap: .8rem; }
  .step__bg { top: .6rem; right: auto; left: 50%; transform: translateX(-50%); }
  .step:not(:last-child)::after {
    content: ""; position: absolute; top: 50%; right: -1.15rem; width: 1.5rem; height: 1.5rem; transform: translateY(-50%);
    background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235DCAA5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E");
    animation: arrowRight 1.8s ease-in-out infinite; z-index: 3;
  }
  @keyframes arrowRight { 0%,100% { opacity: .45; transform: translate(0,-50%); } 50% { opacity: 1; transform: translate(4px,-50%); } }
  /* Staggered vertical rhythm so the sequence doesn't read as a rigid row */
  .steps li:nth-child(1) { transform: translateY(0); }
  .steps li:nth-child(2) { transform: translateY(26px); }
  .steps li:nth-child(3) { transform: translateY(4px); }
}

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.05fr .95fr; }
  .hero__copy { max-width: 34rem; }
  .plans { grid-template-columns: 1fr 1fr; max-width: 820px; align-items: center; }
  .plan--featured { transform: scale(1.035); }
  .plan--featured.reveal { transition-delay: .2s; }
  .oc-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Hide floating hero notifications below the width where they'd collide with copy */
@media (max-width: 899.98px) {
  .hero__notif { display: none; }
}

/* Mobile: OptiRest first, stacked */
@media (max-width: 899.98px) {
  .plan--featured { order: -1; }
}

/* Mobile nav (below 860px) */
@media (max-width: 859.98px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed; top: 0; right: 0; z-index: 100;
    flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1.4rem;
    width: min(80vw, 320px); height: 100dvh; padding: 6rem 2rem 2rem;
    background: rgba(255,255,255,.98); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: -12px 0 40px rgba(0,0,0,.14); transform: translateX(100%); transition: transform .32s var(--ease);
  }
  .nav.menu-open .nav__links { transform: translateX(0); }
  .nav__link { font-size: 1.1rem; }
  .nav__client { order: 3; width: 100%; justify-content: center; font-size: .92rem; padding: .7rem 1.2rem; }
  .nav__cta { order: 4; width: 100%; margin-top: .4rem; }

  .steps .step:not(:last-child)::after {
    content: ""; position: absolute; left: 50%; bottom: -1.15rem; width: 1.4rem; height: 1.4rem; transform: translateX(-50%);
    background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235DCAA5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v13M6 13l6 6 6-6'/%3E%3C/svg%3E");
    animation: arrowDown 1.8s ease-in-out infinite; z-index: 3;
  }
  @keyframes arrowDown { 0%,100% { opacity: .45; transform: translate(-50%,0); } 50% { opacity: 1; transform: translate(-50%,4px); } }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .pdraw { stroke-dashoffset: 0 !important; }
  .ph-fade, .ph-pop, .ph-signal { opacity: 1 !important; transform: none !important; }
  .tick, .cross { transform: none !important; }
  .float-shape, .hero__notif, .hero__badge::after, .btn::before,
  .stat__spark polyline, .stat__spark--bars rect, .oc-mock__typing i {
    animation: none !important;
  }
  .hero__notif { opacity: 1 !important; transform: none !important; position: static; margin-bottom: .5rem; display: inline-block; }
  .stat__spark--bars rect { opacity: 1 !important; transform: none !important; }
  .stat__spark polyline { stroke-dashoffset: 0 !important; }
  .oc-mock__typing { display: none !important; }
  .oc-mock__msg { display: flex !important; }
}

/* Ambient parallax + asymmetric offsets are desktop-only refinements */
@media (max-width: 767.98px) {
  .float-shape { display: none; }
}
