/* =============================================================
   SOMRIURE — Clínica dental · Dr. Cabrera · Barcelona
   Archetype: Glassmorphism modern (mesh gradient + glass cards)
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #f3f6fb;
  --ink:       #0e1a2b;
  --ink-2:     #33445a;
  --mute:      #66768c;
  --accent:    #2b61ff;
  --accent-2:  #14a88c;
  --accent-soft: rgba(43, 97, 255, 0.1);
  --line:      rgba(14, 26, 43, 0.1);
  --glass:     rgba(255, 255, 255, 0.52);
  --glass-2:   rgba(255, 255, 255, 0.72);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --shadow:    0 1px 0 rgba(255,255,255,.7) inset, 0 20px 50px -24px rgba(24, 48, 110, 0.28);

  --mint:      #b9f1e1;
  --sky:       #bcd6ff;
  --lavender:  #dccfff;

  --display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --sans:    "Inter", "Segoe UI", system-ui, sans-serif;
  --serif:   "Instrument Serif", Georgia, serif;

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1240px;
  --nav-h: 76px;
  --demo-h: 30px;
  --r: 24px;
  --r-sm: 14px;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + var(--demo-h) + 20px); }
body {
  font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip;
  padding-top: var(--demo-h);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
h1 em, h2 em, h3 em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; color: var(--accent); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* =============================================================
   3. Page-wide animated mesh (fixed, behind everything)
   ============================================================= */
.mesh { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.mesh i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .85; will-change: transform; }
.mesh i:nth-child(1) { width: 55vw; height: 55vw; left: -12vw; top: -14vw; background: var(--mint); animation: drift1 26s ease-in-out infinite; }
.mesh i:nth-child(2) { width: 50vw; height: 50vw; right: -14vw; top: 8vh; background: var(--sky); animation: drift2 30s ease-in-out infinite; }
.mesh i:nth-child(3) { width: 46vw; height: 46vw; left: 24vw; bottom: -22vw; background: var(--lavender); animation: drift3 34s ease-in-out infinite; }
@keyframes drift1 { 50% { transform: translate(14vw, 10vh) scale(1.12); } }
@keyframes drift2 { 50% { transform: translate(-12vw, 16vh) scale(.92); } }
@keyframes drift3 { 50% { transform: translate(-8vw, -14vh) scale(1.1); } }

/* =============================================================
   4. Utilities & components
   ============================================================= */
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 999; padding: .6rem 1rem; background: var(--ink); color: #fff; border-radius: 10px; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 120px); }

.glass {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
@supports ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
  .glass { background: var(--glass); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%); }
}

.chip {
  display: inline-flex; align-items: center; gap: .55em;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px rgba(20,168,140,.16); }
.eyebrow { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 52ch; }
.muted { color: var(--mute); }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  transition: transform .5s var(--ease-out), box-shadow .4s, background .3s, color .3s;
  will-change: transform;
}
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 14px 30px -12px rgba(14,26,43,.55); }
.btn-primary:hover { background: var(--accent); box-shadow: 0 18px 36px -12px rgba(43,97,255,.6); }
.btn-primary .arr { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.16); transition: transform .5s var(--ease-out); }
.btn-primary:hover .arr { transform: translateX(3px) rotate(-45deg); }
.btn-glass { color: var(--ink); }
.btn-glass:hover { background: rgba(255,255,255,.85); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: 14px; }

.link-u { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1.5px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .45s var(--ease-out); padding-bottom: 2px; }
.link-u:hover { background-size: 100% 1.5px; }

/* Demo bar */
.demo-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 90; height: var(--demo-h);
  display: flex; align-items: center; justify-content: center; padding: 0 12px;
  background: var(--ink); color: #fff; font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden;
}
.demo-bar > span { overflow: hidden; text-overflow: ellipsis; }
.demo-bar b { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mint); }
.demo-long { display: none; }
@media (min-width: 720px) { .demo-long { display: inline; } }

/* =============================================================
   5. Navigation — floating glass pill
   ============================================================= */
.nav { position: fixed; z-index: 50; left: 0; right: 0; top: calc(var(--demo-h) + 12px); padding-inline: var(--gutter); transition: top .4s var(--ease-out); }
.nav-inner {
  max-width: var(--maxw); margin-inline: auto; height: 60px; padding: 0 8px 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: box-shadow .4s, background .4s;
}
.nav.is-scrolled { top: calc(var(--demo-h) + 8px); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.logo-mark { width: 30px; height: 30px; }
.logo small { display: block; font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: .02em; color: var(--mute); margin-top: -2px; }
.nav-links { display: none; position: relative; gap: 4px; }
.nav-links a { position: relative; z-index: 1; padding: 9px 16px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); transition: color .3s; }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-pill { position: absolute; z-index: 0; top: 0; height: 100%; border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 6px 16px -8px rgba(24,48,110,.3); opacity: 0; transition: transform .45s var(--ease-out), width .45s var(--ease-out), opacity .3s; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-right .btn { display: none; }
.nav-phone { display: none; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 0 10px; }
.nav-burger { width: 46px; height: 46px; border-radius: 50%; display: grid; place-content: center; gap: 5px; background: rgba(255,255,255,.7); }
.nav-burger span { display: block; width: 18px; height: 1.8px; border-radius: 2px; background: var(--ink); transition: transform .4s var(--ease-out); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.4px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.4px) rotate(-45deg); }

.menu {
  position: fixed; z-index: 49; inset: calc(var(--demo-h) + 80px) var(--gutter) auto; padding: 18px;
  opacity: 0; transform: translateY(-10px) scale(.98); pointer-events: none; visibility: hidden;
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-out), visibility 0s .45s;
}
.menu.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .35s var(--ease-out), transform .45s var(--ease-out), visibility 0s; }
.menu a { display: flex; justify-content: space-between; align-items: center; padding: 14px 10px; border-bottom: 1px solid var(--line); font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.menu a:last-of-type { border-bottom: 0; }
.menu .btn { margin-top: 12px; width: 100%; }
.menu .btn { color: #fff; font-size: 15px; justify-content: center; letter-spacing: -.01em; }

/* =============================================================
   6. HOME — hero
   ============================================================= */
.hero { position: relative; padding-top: calc(var(--nav-h) + 44px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 7.4vw, 5.4rem); margin: 18px 0 20px; }
.hero h1 em { font-size: 1.08em; }
.hero .lead { margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 30px; font-size: 14px; color: var(--ink-2); }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust svg { width: 18px; height: 18px; color: var(--accent-2); flex: none; }

.hero-visual { position: relative; aspect-ratio: 1 / 1; max-width: 560px; width: 100%; margin-inline: auto; perspective: 1000px; }
.hero-orb {
  position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.95), rgba(255,255,255,.35) 45%, rgba(188,214,255,.35) 70%, rgba(185,241,225,.2));
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: inset 0 0 60px rgba(255,255,255,.6), 0 40px 90px -40px rgba(43,97,255,.35);
}
.tooth-wrap { position: absolute; inset: 18% 22%; transform-style: preserve-3d; transition: transform .6s var(--ease-out); }
.tooth { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 40px 36px rgba(24,48,110,.28)); animation: bob 6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(-2deg); } }
.sparkle { transform-origin: center; transform-box: fill-box; animation: twinkle 3.2s ease-in-out infinite; }
.sparkle.s2 { animation-delay: 1.4s; }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

.float-card { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 18px; font-size: 14px; line-height: 1.3; transition: transform .6s var(--ease-out); white-space: nowrap; }
.float-card .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.float-card .ic svg { width: 20px; height: 20px; }
.float-card b { display: block; font-family: var(--display); font-size: 14.5px; letter-spacing: -.01em; }
.float-card span { color: var(--mute); font-size: 12.5px; }
.fc-1 { left: -2%; top: 16%; }
.fc-2 { right: -4%; top: 44%; }
.fc-2 .ic { background: rgba(20,168,140,.12); color: var(--accent-2); }
.fc-3 { left: 6%; bottom: 8%; }
.fc-3 .ic { background: rgba(145,110,255,.14); color: #7b5cf0; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; }
.stat { padding: 26px 22px; }
.stat b { display: block; font-family: var(--display); font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.stat span { display: block; margin-top: 8px; font-size: 14px; color: var(--mute); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat:nth-child(3) { border-left: 0; }
.stats .stat:nth-child(n+3) { border-top: 1px solid var(--line); }

/* Section heads */
.head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 720px; }
.head h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
.head.center { margin-inline: auto; text-align: center; justify-items: center; }

/* Treatment cards */
.t-grid { display: grid; gap: 18px; }
.t-card { position: relative; padding: 26px; display: flex; flex-direction: column; gap: 12px; transition: transform .6s var(--ease-out), box-shadow .5s; overflow: hidden; }
.t-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--x, 50%) var(--y, 0%), rgba(255,255,255,.75), transparent 45%); opacity: 0; transition: opacity .4s; }
.t-card:hover { transform: translateY(-6px); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 34px 60px -28px rgba(24,48,110,.4); }
.t-card:hover::after { opacity: 1; }
.t-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(145deg, #fff, rgba(255,255,255,.4)); border: 1px solid rgba(255,255,255,.9); color: var(--accent); box-shadow: 0 10px 24px -14px rgba(43,97,255,.5); }
.t-ic svg { width: 26px; height: 26px; }
.t-card h3 { font-size: 1.35rem; letter-spacing: -.02em; margin-top: 6px; }
.t-card p { font-size: .98rem; color: var(--ink-2); }
.t-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); font-size: 14px; }
.t-foot b { font-family: var(--display); font-size: 1.05rem; }
.t-foot a { font-weight: 600; color: var(--accent); }

/* Steps */
.steps { display: grid; gap: 18px; counter-reset: s; }
.step { padding: 28px; position: relative; }
.step-n { font-family: var(--display); font-size: 13px; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.step h3 { font-size: 1.4rem; margin: 14px 0 8px; }
.step p { color: var(--ink-2); font-size: .98rem; }
.step .tag { display: inline-block; margin-top: 14px; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(20,168,140,.12); color: #0d7a66; }

/* Technology split */
.tech { display: grid; gap: 24px; align-items: center; }
.tech-media { position: relative; }
.tech-media .ph { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; }
.tech-media .ph img { width: 100%; height: 100%; object-fit: cover; }
.tech-media .ph.xray { position: absolute; right: -4%; bottom: -12%; width: 62%; aspect-ratio: 1024 / 542; border: 6px solid rgba(255,255,255,.8); box-shadow: 0 30px 60px -30px rgba(14,26,43,.5); }
.tech-list { display: grid; gap: 12px; margin-top: 26px; }
.tech-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 16px; }
.tech-list .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tech-list .ic svg { width: 20px; height: 20px; }
.tech-list b { font-family: var(--display); display: block; font-size: 1.02rem; letter-spacing: -.01em; }
.tech-list span { font-size: .95rem; color: var(--ink-2); }

/* Financing calculator */
.calc { display: grid; gap: 0; overflow: hidden; }
.calc-form { padding: clamp(24px, 4vw, 40px); display: grid; gap: 22px; }
.calc-out { padding: clamp(24px, 4vw, 40px); background: linear-gradient(150deg, rgba(43,97,255,.95), rgba(96,70,230,.92)); color: #fff; display: grid; align-content: center; gap: 10px; }
.calc label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--ink-2); }
.calc select { width: 100%; min-height: 52px; padding: 0 44px 0 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.8); -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%230e1a2b' stroke-width='1.6'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; }
.range-row { display: flex; justify-content: space-between; align-items: baseline; }
.range-row output { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
input[type="range"] { width: 100%; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), rgba(14,26,43,.1) var(--p, 50%)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 6px 14px -4px rgba(43,97,255,.6); cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); cursor: grab; }
.calc-out .small { font-size: 14px; opacity: .8; }
.calc-out .fee { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 8vw, 4.6rem); letter-spacing: -.05em; line-height: 1; }
.calc-out .fee small { font-size: 1.1rem; font-weight: 600; letter-spacing: 0; opacity: .8; }
.calc-out ul { margin-top: 10px; display: grid; gap: 6px; font-size: 14px; }
.calc-out li { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.2); padding-top: 8px; }
.calc-out .btn { margin-top: 14px; background: #fff; color: var(--ink); justify-self: start; }

/* Testimonials */
.quotes { position: relative; max-width: 860px; margin-inline: auto; padding: clamp(28px, 5vw, 56px); text-align: center; }
.quote { display: none; }
.quote.is-active { display: block; animation: qIn .7s var(--ease-out); }
@keyframes qIn { from { opacity: 0; transform: translateY(10px); } }
.quote p { font-family: var(--display); font-size: clamp(1.3rem, 2.8vw, 2rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.quote p em { font-family: var(--serif); font-weight: 400; color: var(--accent); }
.quote footer { margin-top: 22px; display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--mute); text-align: left; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: #fff; background: linear-gradient(135deg, #7aa2ff, #7b5cf0); flex: none; }
.quote footer b { display: block; color: var(--ink); font-weight: 600; }
.q-dots { display: flex; justify-content: center; gap: 8px; margin-top: 26px; }
.q-dots button { width: 10px; height: 10px; border-radius: 99px; background: rgba(14,26,43,.18); transition: width .4s var(--ease-out), background .3s; }
.q-dots button[aria-current="true"] { width: 28px; background: var(--accent); }

/* FAQ */
.faq { max-width: 860px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { padding: 0 24px; transition: background .3s; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-family: var(--display); font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); flex: none; transition: transform .45s var(--ease-out), background .3s; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 2px; background: var(--accent); transform: translate(-50%, -50%); }
.faq summary i::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] summary i { transform: rotate(135deg); }
.faq .ans { padding-bottom: 22px; color: var(--ink-2); max-width: 68ch; }

/* CTA band */
.cta { position: relative; overflow: hidden; padding: clamp(36px, 6vw, 72px); text-align: center; display: grid; justify-items: center; gap: 18px; }
.cta h2 { font-size: clamp(2.2rem, 5.6vw, 4rem); max-width: 16ch; }
.cta .lead { margin-inline: auto; }

/* =============================================================
   7. Interior pages
   ============================================================= */
.page-hero { padding-top: calc(var(--nav-h) + 56px); padding-bottom: clamp(32px, 5vw, 64px); }
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); margin: 16px 0 18px; max-width: 16ch; }
.crumbs { font-size: 13px; color: var(--mute); }
.crumbs a:hover { color: var(--accent); }

/* Tratamientos detail */
.tr-layout { display: grid; gap: 28px; }
.tr-nav { position: sticky; top: calc(var(--demo-h) + 84px); z-index: 20; display: flex; gap: 6px; overflow-x: auto; overflow-y: visible; scrollbar-width: none; padding: 6px; align-self: start; border-radius: 999px; }
.tr-nav::-webkit-scrollbar { display: none; }
.tr-nav a { flex: none; padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background .3s, color .3s; }
.tr-nav a.is-active { background: var(--ink); color: #fff; }
.tr-block { padding: clamp(24px, 4vw, 40px); display: grid; gap: 22px; scroll-margin-top: calc(var(--demo-h) + 150px); }
.tr-block + .tr-block { margin-top: 18px; }
.tr-top { display: flex; gap: 18px; align-items: center; }
.tr-top h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.tr-top .t-ic { flex: none; }
.tr-body { display: grid; gap: 24px; }
.tr-body p + p { margin-top: .8em; }
.tr-body > div > p { color: var(--ink-2); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { padding: 14px 16px; border-radius: var(--r-sm); background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.9); }
.fact span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.fact b { font-family: var(--display); font-size: 1.05rem; letter-spacing: -.01em; }
.price-table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.price-table td { padding: 12px 4px; border-bottom: 1px solid var(--line); }
.price-table td:last-child { text-align: right; font-family: var(--display); font-weight: 700; white-space: nowrap; }
.price-table tr:last-child td { border-bottom: 0; }
.tr-img { border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 16 / 9; }
.tr-img img { width: 100%; height: 100%; object-fit: cover; }
.note { font-size: 14px; color: var(--mute); margin-top: 18px; }

/* Clínica page */
.doctor { display: grid; gap: 28px; padding: clamp(24px, 4vw, 44px); align-items: center; }
.monogram { width: 100%; max-width: 360px; aspect-ratio: 1; border-radius: 32px; display: grid; place-items: center; position: relative; overflow: hidden;
  background: linear-gradient(145deg, #dfe9ff, #e9e1ff 55%, #d6f5ec); border: 1px solid rgba(255,255,255,.9); }
.monogram span { font-family: var(--serif); font-style: italic; font-size: clamp(6rem, 16vw, 9rem); color: var(--accent); line-height: 1; }
.monogram small { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.doctor h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
.doctor .role { color: var(--accent); font-weight: 600; margin: 6px 0 16px; }
.doctor p + p { margin-top: .8em; }
.doctor p { color: var(--ink-2); }
.creds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.creds li { font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.95); }
.team { display: grid; gap: 16px; }
.member { padding: 22px; display: flex; gap: 16px; align-items: center; }
.member .avatar { width: 56px; height: 56px; font-size: 1.1rem; }
.member:nth-child(2) .avatar { background: linear-gradient(135deg, #3fd1ae, #2b61ff); }
.member:nth-child(3) .avatar { background: linear-gradient(135deg, #ff9e7a, #d25cf0); }
.member:nth-child(4) .avatar { background: linear-gradient(135deg, #7ad0ff, #14a88c); }
.member b { font-family: var(--display); display: block; letter-spacing: -.01em; }
.member span { font-size: 14px; color: var(--mute); }
.gallery { display: grid; gap: 14px; }
.gallery figure { border-radius: var(--r); overflow: hidden; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform 1.2s var(--ease-out); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; left: 12px; bottom: 12px; padding: 8px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.values { display: grid; gap: 16px; }
.value { padding: 26px; }
.value h3 { font-size: 1.25rem; margin: 12px 0 6px; }
.value p { color: var(--ink-2); font-size: .98rem; }

/* Cita page */
.cita-grid { display: grid; gap: 24px; }
.form-card { padding: clamp(22px, 4vw, 40px); }
.form { display: grid; gap: 20px; }
.form[hidden] { display: none; }
.form-row { display: grid; gap: 20px; }
.field { display: grid; gap: 7px; }
.field label, .field legend { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.8); font-size: 16px; transition: border-color .25s, box-shadow .25s; -webkit-appearance: none; appearance: none;
}
.field select { padding-right: 44px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%230e1a2b' stroke-width='1.6'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; }
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(43,97,255,.14); }
.field.is-invalid input, .field.is-invalid select { border-color: #e0445a; }
.field .err { font-size: 13px; color: #d23a50; min-height: 1em; }
fieldset.field { border: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills label { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.75); font-size: 14.5px; font-weight: 500; color: var(--ink); cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease-bounce); }
.pills label:hover { transform: translateY(-2px); }
.pills input:checked + label { background: var(--ink); color: #fff; border-color: var(--ink); }
.pills input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; flex: none; }
.form .btn { justify-self: start; }
.form.is-sending .btn { opacity: .6; pointer-events: none; }
.success { display: none; text-align: center; padding: 20px 0; }
.success.is-visible { display: grid; justify-items: center; gap: 12px; }
.success svg { width: 76px; height: 76px; color: var(--accent-2); }
.success svg circle, .success svg path { stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 1s var(--ease-out) forwards; }
.success svg path { animation-delay: .45s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h2 { font-size: 2rem; }
.info { display: grid; gap: 16px; align-content: start; }
.info-card { padding: 24px; }
.info-card h2 { font-size: 1.2rem; margin-bottom: 12px; letter-spacing: -.01em; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.hours li:last-child { border-bottom: 0; }
.hours li span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.hours li.is-today { color: var(--accent); }
.hours li.is-today span:first-child::after { content: " · hoy"; font-size: 12px; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(14,26,43,.06); margin-bottom: 12px; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); }
.status.is-open { background: rgba(20,168,140,.12); color: #0d7a66; }
.status.is-open .dot { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(20,168,140,.18); }
.urgent { background: linear-gradient(150deg, rgba(255,255,255,.7), rgba(255,236,238,.7)); }
.urgent b { color: #d23a50; }
.map-ph { position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 16 / 10; margin-top: 12px; }
.map-ph img { width: 100%; height: 100%; object-fit: cover; }
.map-ph span { position: absolute; left: 12px; bottom: 12px; padding: 8px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; }

/* Credits */
.credits-list { display: grid; gap: 10px; }
.credits-list li { padding: 18px 20px; display: grid; gap: 4px; font-size: 14.5px; }
.credits-list strong { font-family: var(--display); font-size: 1rem; }
.credits-list a { color: var(--accent); }

/* =============================================================
   8. Footer
   ============================================================= */
.footer { padding-top: clamp(8px, 2vw, 24px); }
.footer-card { padding: clamp(26px, 4vw, 44px); display: grid; gap: 30px; }
.footer-grid { display: grid; gap: 26px; }
.footer h2 { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-bottom: 10px; }
.footer li + li { margin-top: 6px; }
.footer p, .footer li { font-size: 15px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 20px 0 30px; font-size: 13px; color: var(--mute); }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }

/* =============================================================
   9. Reveal system
   ============================================================= */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-revealed { opacity: 1; transform: none; }
.js .hero [data-in] { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: var(--d, 0ms); }
.js .is-loaded .hero [data-in] { opacity: 1; transform: none; }
.js .hero-visual[data-in] { transform: scale(.94); }
.js .is-loaded .hero-visual[data-in] { transform: none; }
.reveal-all [data-reveal], .reveal-all [data-in] { opacity: 1 !important; transform: none !important; }
.reveal[data-split] { opacity: 1; transform: none; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }

/* =============================================================
   10. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .team { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats .stat:nth-child(n+3) { border-top: 0; }
  .stat:nth-child(3) { border-left: 1px solid var(--line); }
  .t-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .calc { grid-template-columns: 1.15fr 1fr; }
  .values { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .tr-body { grid-template-columns: 1.2fr 1fr; align-items: start; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-right .btn { display: inline-flex; }
  .nav-phone { display: inline; }
  .nav-burger, .menu { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 70px); }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; }
  .t-grid { grid-template-columns: repeat(3, 1fr); }
  .tech { grid-template-columns: 1fr 1fr; gap: 72px; }
  .doctor { grid-template-columns: 360px 1fr; gap: 56px; }
  .team { grid-template-columns: repeat(4, 1fr); }
  .member { flex-direction: column; align-items: flex-start; }
  .gallery { grid-template-columns: 1.4fr 1fr 1fr; }
  .gallery figure:first-child { grid-row: span 2; }
  .gallery figure:first-child img { aspect-ratio: auto; }
  .cita-grid { grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
  .tr-layout { grid-template-columns: 230px 1fr; gap: 36px; }
  .tr-nav { flex-direction: column; border-radius: var(--r); padding: 10px; top: calc(var(--demo-h) + 110px); }
  .tr-nav a { border-radius: 12px; }
}

/* =============================================================
   11. Reduced motion — only the intrusive bits
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mesh i { animation-duration: 60s; }
  .sparkle { animation: none; opacity: .8; }
}
