/* ============================================================
   DENTALEAD / WEB CODEX
   Editorial clinical-performance layer. Loaded after v2.css.
   ============================================================ */

@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces-500.ttf') format('truetype'); font-style: normal; font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces-500-italic.ttf') format('truetype'); font-style: italic; font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('/assets/fonts/outfit-400.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('/assets/fonts/outfit-600.ttf') format('truetype'); font-style: normal; font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('/assets/fonts/outfit-700.ttf') format('truetype'); font-style: normal; font-weight: 650 800; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/ibm-plex-mono-600.ttf') format('truetype'); font-style: normal; font-weight: 500 700; font-display: swap; }

:root {
  --ink-950: #04171b;
  --ink-900: #08262b;
  --ink-800: #0d3136;
  --ink-700: #10383d;
  --mint-500: #35e6b8;
  --mint-400: #61ecc8;
  --mint-300: #9af3dc;
  --mint-glow: rgba(53, 230, 184, .34);
  --lime: #ddf96b;
  --porcelain-50: #fcfaf5;
  --bone-100: #f1ece1;
  --stone-200: #ded7c8;
  --t-on-light: #112c30;
  --t-on-light-2: #405d5d;
  --t-on-light-3: #6f8f8c;
  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 30px;
  --radius-xl: 44px;
  --maxw: 1380px;
  --maxw-text: 780px;
  --sec-pad: clamp(84px, 10vw, 150px);
}

body {
  background: var(--ink-950);
  font-size: 17px;
  letter-spacing: -.005em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: .024;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, #fff 0 .45px, transparent .55px 3px),
    repeating-radial-gradient(circle at 70% 65%, #fff 0 .35px, transparent .5px 4px);
  background-size: 9px 11px, 13px 15px;
  mix-blend-mode: soft-light;
}

h1, h2, h3 { letter-spacing: -.035em; }
h1 { font-size: clamp(3.15rem, 6.3vw, 6.8rem); line-height: .94; }
h2 { font-size: clamp(2.35rem, 4.6vw, 4.8rem); line-height: .98; }
p { text-wrap: pretty; }
.rv { opacity: 1; transform: none; }

.wrap { width: 100%; }
.eyebrow {
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--mint-500) 24%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--mint-500) 7%, transparent);
  letter-spacing: .15em;
}
.eyebrow::before { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 14px var(--mint-500); }

/* Command bar */
#nav { padding: 14px clamp(12px, 2vw, 28px) 0; }
#nav .nav-inner {
  max-width: 1360px;
  height: 64px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 0 clamp(16px, 2vw, 24px);
  background: rgba(4,23,27,.58);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 14px 50px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.04);
}
#nav.scrolled { background: transparent; border: 0; box-shadow: none; }
.nav-links { gap: clamp(18px, 2vw, 34px) !important; }
.nav-links a { position: relative; font-size: .86rem !important; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 1px;
  background: var(--mint-500); transition: right .25s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.nav-cta { padding: 12px 20px; min-height: 42px; font-size: .86rem; }

/* Hero: high-density, no decorative dead space */
.hero {
  min-height: min(980px, 100svh);
  padding-top: clamp(112px, 13vh, 150px);
  padding-bottom: clamp(54px, 8vh, 86px);
  background:
    linear-gradient(rgba(53,230,184,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53,230,184,.045) 1px, transparent 1px),
    radial-gradient(900px 600px at 72% 18%, rgba(53,230,184,.16), transparent 66%),
    radial-gradient(700px 500px at 6% 88%, rgba(221,249,107,.05), transparent 70%),
    var(--ink-950);
  background-size: 72px 72px, 72px 72px, auto, auto, auto;
}
.hero::before {
  content: "";
  position: absolute;
  width: min(52vw, 760px); aspect-ratio: 1;
  right: -12%; top: -26%; border-radius: 50%;
  border: 1px solid rgba(154,243,220,.12);
  box-shadow: 0 0 0 70px rgba(53,230,184,.018), 0 0 0 150px rgba(53,230,184,.012);
  pointer-events: none;
}
.hero-grid { grid-template-columns: minmax(0, 1.18fr) minmax(360px, .72fr); gap: clamp(52px, 7vw, 112px); }
.hero h1 { max-width: 870px; text-wrap: balance; }
.hero h1 .hl { display: block; margin-top: .08em; white-space: normal; color: var(--mint-300); }
.hero-sub { max-width: 680px; font-size: clamp(1.08rem, 1.5vw, 1.28rem); line-height: 1.6; }
.hero-badge { margin-bottom: 32px; background: rgba(53,230,184,.08); }
.hero-trust { font-size: .82rem; }
.proof-chips { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 690px; gap: 8px; }
.proof-chip {
  min-height: 70px; display: flex; flex-direction: column; justify-content: center;
  border-radius: 16px; padding: 11px 14px; font-family: var(--f-ui); font-size: .73rem;
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
}
.proof-chip b { display: block; font-family: var(--f-mono); font-size: 1.12rem; color: var(--mint-300); }

.hero .form-card {
  padding: clamp(24px, 2.2vw, 34px);
  border-color: rgba(154,243,220,.18);
  background: linear-gradient(155deg, rgba(19,61,65,.82), rgba(4,23,27,.8));
  box-shadow: 0 40px 100px -36px rgba(0,0,0,.85), 0 0 80px -40px var(--mint-glow), inset 0 1px 0 rgba(255,255,255,.12);
}
.hero .form-card::before {
  content: "ANÁLISIS  /  ZONA  /  OPORTUNIDAD";
  display: block; margin: -4px 0 18px; padding-bottom: 13px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: var(--mint-300); font: 600 .62rem/1 var(--f-mono); letter-spacing: .14em;
}
.form-card-title { font-size: 1.28rem; letter-spacing: -.02em; }
.form-card-sub { font-size: .9rem; line-height: 1.55; }
.lgf-input, .lgf-textarea { background: rgba(1,17,20,.55); border-color: rgba(255,255,255,.11); }
.lgf-submit { min-height: 56px; box-shadow: 0 12px 38px -12px var(--mint-glow); }

/* Evidence rail */
.marquee { border-color: rgba(53,230,184,.12); background: #061d21; }
.marquee span { color: #aec4c0; font-size: .73rem; }
.marquee span::before { content: "●"; font-size: .48rem; }

/* New intent section */
.signal-section { overflow: hidden; background: var(--porcelain-50); color: var(--t-on-light); }
.signal-section .eyebrow { color: var(--ink-700); background: rgba(53,230,184,.1); }
.signal-section .signal-title em.serif { color: var(--ink-700); }
.signal-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(50px, 8vw, 120px); align-items: start; }
.signal-title { position: sticky; top: 122px; }
.signal-title h2 { max-width: 640px; }
.signal-title p { max-width: 560px; margin-top: 24px; color: var(--t-on-light-2); font-size: 1.1rem; }
.signal-list { border-top: 1px solid var(--stone-200); }
.signal-item {
  display: grid; grid-template-columns: 72px 1fr; gap: 26px;
  padding: 34px 0; border-bottom: 1px solid var(--stone-200);
}
.signal-index { font: 600 .72rem/1 var(--f-mono); color: var(--t-on-light-3); padding-top: 8px; }
.signal-item h3 { font-family: var(--f-ui); font-size: clamp(1.25rem, 2vw, 1.65rem); font-weight: 650; letter-spacing: -.025em; }
.signal-item p { margin-top: 10px; color: var(--t-on-light-2); }
.signal-item strong { color: var(--ink-700); }
.signal-will-reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.8,.2,1); }
.signal-visible { opacity: 1; transform: none; }

/* Better section rhythm */
.sec-light, .sec-bone { position: relative; }
.sec-light::before, .sec-bone::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .32;
  background: radial-gradient(500px 280px at 92% 8%, rgba(53,230,184,.11), transparent 70%);
}
.sec-dark, .sec-darker, .nora-band { border-top: 1px solid rgba(255,255,255,.05); }
.sec-wave--light-to-dark { background: var(--bone-100); }
.sec-head { max-width: 940px; }
.sec-head p { max-width: 720px; font-size: 1.12rem; }

.metrics { gap: 12px; }
.metric {
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end;
}
.metric-num { font-size: clamp(2.2rem, 4vw, 4rem); letter-spacing: -.06em; }
.metric::before { content: "+"; font-family: var(--f-mono); color: var(--mint-500); opacity: .4; margin-bottom: auto; }

.pain-list { max-width: 1000px; margin-inline: auto; }
.pain {
  border-radius: 18px; padding: 20px 22px;
  background: linear-gradient(90deg, rgba(255,255,255,.065), rgba(255,255,255,.025));
}

/* Shorter, more legible system experience */
.scrolly.scrolly-on .scrolly-track { height: 390vh; }
.scrolly.scrolly-on .scrolly-stage { background: radial-gradient(circle at 65% 50%, rgba(53,230,184,.07), transparent 34%); }
.scrolly .scrolly-copy {
  max-width: 500px; border-radius: 26px; padding: 34px;
  background: linear-gradient(150deg, rgba(18,58,62,.84), rgba(4,23,27,.72));
  border-color: rgba(154,243,220,.16);
  box-shadow: 0 32px 80px -40px #000;
}
.scrolly .scrolly-copy h3 { font-size: 1.5rem; }
.scrolly .scrolly-copy p { font-size: 1rem; }

/* Atlas, proof and comparison */
.nora-band {
  background:
    linear-gradient(115deg, rgba(53,230,184,.08), transparent 45%),
    radial-gradient(600px 420px at 86% 30%, rgba(221,249,107,.07), transparent 70%),
    var(--ink-900);
}
.nora-chat-demo { transform: rotate(1.2deg); border-color: rgba(154,243,220,.18); }
.nora-chat-demo:hover { transform: rotate(0deg) translateY(-4px); }
.nora-msg { font-size: .94rem; }
.cases { gap: 14px; }
.case { border-radius: 26px; padding: clamp(24px, 3vw, 34px); }
.case .kpi { font-size: clamp(2rem, 3.2vw, 3.25rem); letter-spacing: -.05em; }
.compare-scroll { box-shadow: 0 34px 90px -54px rgba(17,44,48,.45); }
.compare-table { border-radius: 26px; overflow: hidden; }
.compare-table tbody th {
  padding: 16px 18px; text-align: left; vertical-align: top;
  font-family: var(--f-ui); font-size: .92rem; font-weight: 600;
  color: var(--t-on-light); width: 26%;
}
.compare-table tbody tr + tr th { border-top: 1px solid var(--bone-100); }
.faq-list { max-width: 900px; }
.faq { border-radius: 18px; }
.faq summary { min-height: 70px; padding: 22px 26px; }

/* Interior pages become editorial, not template-like */
.page-hero {
  min-height: 58svh; display: flex; align-items: flex-end;
  padding-top: 150px; padding-bottom: clamp(70px, 9vw, 120px);
  background:
    linear-gradient(rgba(53,230,184,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53,230,184,.035) 1px, transparent 1px),
    radial-gradient(900px 540px at 80% 0%, rgba(53,230,184,.14), transparent 68%),
    var(--ink-950);
  background-size: 80px 80px, 80px 80px, auto, auto;
}
.page-hero h1 { max-width: 1040px; text-wrap: balance; }
.page-hero .lead { max-width: 760px; font-size: clamp(1.08rem, 1.8vw, 1.3rem); }
.post-card { border-radius: 24px; padding: 30px; }
.post-card:hover { transform: translateY(-7px) rotate(-.2deg); }
.prose { max-width: 820px; margin-inline: auto; font-size: 1.1rem; }
.prose > p:first-of-type { font-size: 1.22rem; color: var(--t-on-light); }
.prose h2 { margin-top: 2.4em; font-size: clamp(2rem, 4vw, 3.3rem); }
.toc { border-radius: 22px; padding: 28px 30px; }

.cta-band, #contact.sec-darker {
  background:
    radial-gradient(700px 480px at 12% 100%, rgba(53,230,184,.13), transparent 72%),
    radial-gradient(700px 480px at 88% 0%, rgba(221,249,107,.05), transparent 72%),
    var(--ink-950);
}
footer { padding-top: 82px; }

/* Magnetic focus aura driven by codex.js */
.spotlight-card { position: relative; overflow: hidden; }
.spotlight-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(260px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(154,243,220,.12), transparent 70%);
  transition: opacity .25s;
}
.spotlight-card:hover::after { opacity: 1; }

@media (max-width: 1023px) {
  .hero-track.hero-open-on { height: auto; }
  .hero-track.hero-open-on .hero { position: relative; top: auto; height: auto; min-height: auto; }
  .hero-track.hero-open-on .hero-grid > div { transform: none !important; opacity: 1 !important; }
  .hero-track.hero-open-on .hero-veil { display: none; }
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero .form-card { max-width: 720px; }
  .signal-grid { grid-template-columns: 1fr; }
  .signal-title { position: static; }
}

@media (max-width: 719px) {
  :root { --sec-pad: 76px; }
  body { font-size: 16px; }
  body::before { display: none; }
  h1 { font-size: clamp(2.7rem, 13vw, 4.2rem); }
  h2 { font-size: clamp(2.15rem, 10.5vw, 3.45rem); }
  #nav { padding: 8px 8px 0; }
  #nav .nav-inner { height: 58px; border-radius: 15px; }
  .hero { padding-top: 104px; background-size: 48px 48px, 48px 48px, auto, auto, auto; }
  .hero-grid { gap: 38px; }
  .hero-badge { margin-bottom: 22px; }
  .hero-sub { font-size: 1.05rem; }
  .hero-ctas .btn { width: 100%; }
  .proof-chips { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .proof-chip { min-height: 72px; padding: 10px 8px; font-size: .61rem; }
  .proof-chip b { font-size: .92rem; }
  .signal-item { grid-template-columns: 42px 1fr; gap: 12px; }
  .metric { min-height: 150px; }
  .scrolly .scrolly-copy { margin-inline: 16px; padding: 24px; }
  .scrolly.scrolly-on .scrolly-track { height: auto; }
  .scrolly.scrolly-on .scrolly-stage {
    position: relative; height: auto; display: block; overflow: visible;
    padding: 24px 0 76px; background: transparent;
  }
  .scrolly.scrolly-on .scrolly-canvas,
  .scrolly.scrolly-on .scrolly-dots,
  .scrolly.scrolly-on .scrolly-hint { display: none; }
  .scrolly.scrolly-on .scrolly-copy {
    position: relative; inset: auto; width: auto; margin: 14px 16px;
    opacity: 1; transform: none; pointer-events: auto;
  }
  .nora-chat-demo { transform: none; }
  .page-hero { min-height: 52svh; padding-top: 120px; }
  .atlas-launcher-host { opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; }
  body.atlas-launcher-ready .atlas-launcher-host { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nora-chat-demo, .post-card { transform: none !important; }
}
