:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f7;
  --line: #e4e6e9;
  --ink: #0e1013;
  --text: #4a4f56;
  --muted: #8a9098;
  --accent: #2f5f8a;
  --accent-soft: #e8eff6;
  --font: "Manrope Variable", "Manrope", "Inter", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 4.2vw, 72px);
  --copy-w: min(360px, 27vw);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 400; letter-spacing: -0.02em; }
p { margin: 0; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* columns slide in from beyond the edges: never let them widen the page */
html, body { overflow-x: clip; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; gap: 28px;
  height: 64px; padding: 0 var(--gutter);
  font-size: 13px; letter-spacing: 0.01em;
  background: linear-gradient(#fff 30%, rgba(255,255,255,0));
}
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 500; margin-right: auto; }
/* brand: the vertical logo accompanies the whole scroll; it steps aside on the opening screen
   (monogram) and in the contact section (horizontal logo) */
.nav__brand:has(.nav__logo) { align-self: flex-start; margin-top: 12px; margin-left: calc(10px - var(--gutter)); } /* near the left edge, top aligned with Cita */
.nav__logo { display: block; height: 82px; width: auto; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.at-hero .nav__logo, .at-contact .nav__logo { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.hero__logo { display: block; width: clamp(110px, 10vw, 170px); height: auto; margin: 0 auto 14px; }
.contact__logo { display: block; width: min(360px, 100%); height: auto; margin-bottom: 30px !important; }
.nav__muted { color: var(--muted); font-weight: 400; margin-left: 4px; }
.nav__mark { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--accent); position: relative; }
.nav__mark::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--accent); }
.nav__links { display: flex; gap: 26px; }
.nav__links a { text-decoration: none; color: var(--muted); transition: color .3s; position: relative; }
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--ink); }
.nav__links a[aria-current="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--ink); }
.nav__cta {
  text-decoration: none; color: var(--ink); border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px; transition: border-color .3s, background .3s;
}
.nav__cta:hover { border-color: var(--ink); }
.nav__progress { display: none; } /* only the logo at the top left, no line under it */
.nav__progress span { display: block; height: 100%; width: 100%; background: var(--ink); opacity: .14; transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 40; background: #fff;
  display: grid; place-content: center; gap: 18px; text-align: center;
  transition: opacity .9s var(--ease), visibility .9s;
}
.loader__logo { width: min(240px, 52vw); height: auto; margin: 0 auto; }
.loader__line { width: 160px; height: 1px; background: var(--line); overflow: hidden; margin: 0 auto; }
.loader__line span { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); transition: transform .4s var(--ease); }
.is-ready .loader { opacity: 0; visibility: hidden; }
.no-js .loader, .no-webgl .loader { display: none; }

/* ---------- 3D layer ---------- */
.world { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; }
/* ---------- Story beats ---------- */
main { position: relative; z-index: 2; }
.anchor { position: relative; top: -64px; height: 0; }
.beat {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr minmax(0, 46vw) 1fr;
  align-items: center;
  padding: 96px var(--gutter);
}
.beat--hero { min-height: 100vh; min-height: 100svh; }
/* content sections flow upwards like an editorial page; each one is at least a screen tall
   so the dermatoscope has room to move while it passes */
.beat--services, .beat--panel { min-height: 100vh; padding-top: 18vh; padding-bottom: 18vh; }
.beat--panel-center { align-items: start; padding-top: 12vh; }
.beat--lens { min-height: 72vh !important; padding: 0 !important; }
.beat--panel, .beat--services { --copy-w: min(440px, 30vw); }

.js .beat--hero .copy { opacity: 0; will-change: opacity, transform; }
.no-webgl .copy, .reduced .copy { will-change: auto; }
.copy { max-width: var(--copy-w); }
.copy--left { grid-column: 1; justify-self: start; }
.copy--right { grid-column: 3; justify-self: end; }
.copy > * + * { margin-top: 14px; }

.eyebrow {
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7; }
h1 { font-size: clamp(42px, 5.4vw, 88px); line-height: 1.02; font-weight: 300; letter-spacing: -0.035em; }
.h1__pre { display: block; font-size: .32em; letter-spacing: .02em; color: var(--muted); font-weight: 400; margin-bottom: .5em; }
.beat--hero .copy--left { max-width: min(480px, 34vw); }
h2 { font-size: clamp(26px, 2.35vw, 38px); line-height: 1.12; font-weight: 400; }
.copy p:not(.eyebrow) { color: var(--text); max-width: 34ch; }
.lede { font-size: 17px; color: var(--ink) !important; line-height: 1.5; }
.scroll-cue { display: flex; align-items: center; gap: 12px; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted) !important; margin-top: 40px !important; }
.scroll-cue span { width: 1px; height: 38px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue span::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { to { top: 110%; } }

.stats { display: grid; gap: 14px; margin-top: 22px !important; }
.stats dd { margin: 0; }
.stats div { display: flex; align-items: baseline; gap: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.stats dt { font-weight: 300; font-size: 34px; color: var(--ink); letter-spacing: -0.03em; min-width: 2.4ch; font-variant-numeric: tabular-nums; }
.stats dd { font-size: 13.5px; }

/* ---------- Hero roles ---------- */
.roles { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 0; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.roles li + li::before { content: "·"; margin: 0 10px; color: var(--line); }

/* ---------- Excellence panels ---------- */
.copy h2.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .16em; color: var(--muted); }
.merits { list-style: none; padding: 0; margin-top: 18px !important; border-top: 1px solid var(--line); }
.merits li { padding: 15px 0 14px; border-bottom: 1px solid var(--line); display: grid; gap: 3px; }
.merits strong { font-weight: 400; color: var(--ink); font-size: clamp(19px, 1.6vw, 26px); line-height: 1.18; letter-spacing: -0.02em; }
.merits span { font-size: 13px; color: var(--muted); }
.beat--panel .stats { margin-top: 18px !important; gap: 0; }
.beat--panel .stats div { padding: 14px 0; border-top: 1px solid var(--line); align-items: center; }
.beat--panel .stats div:last-child { border-bottom: 1px solid var(--line); }
.beat--panel .stats dt { font-size: clamp(44px, 4.4vw, 72px); font-weight: 200; line-height: 1; min-width: 2.2ch; }
.beat--panel .stats dd { font-size: 14px; color: var(--text); max-width: 14ch; }

/* ---------- Services ---------- */
.services { list-style: none; padding: 0; margin-top: 22px !important; border-top: 1px solid var(--line); }
.service { position: relative; border-bottom: 1px solid var(--line); padding: 13px 26px 13px 0; }
.service h3 { font-size: 14.5px; font-weight: 500; letter-spacing: -0.005em; }
.service button {
  appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit;
  text-align: left; cursor: pointer; transition: color .3s;
}
.service button::before { content: ""; position: absolute; inset: 0; }
.service p { font-size: 12.8px; line-height: 1.5; color: var(--muted); margin-top: 3px; max-width: none !important; transition: color .3s; }
.service::after {
  content: ""; position: absolute; right: 4px; top: 19px; width: 7px; height: 7px; pointer-events: none;
  border-top: 1.25px solid var(--muted); border-right: 1.25px solid var(--muted);
  transform: rotate(45deg); transition: transform .35s var(--ease), border-color .3s;
}
.service:hover button, .service button:focus-visible, .service button[aria-expanded="true"] { color: var(--accent); }
.service button:focus-visible { outline: none; }
.service:has(button:focus-visible) { outline: 1.5px solid var(--accent); outline-offset: 2px; }
.service:hover p { color: var(--text); }
.service:hover::after, .service:has(button:focus-visible)::after { transform: translateX(3px) rotate(45deg); border-color: var(--accent); }
.count { font-variant-numeric: tabular-nums; }

/* pending/review markers: visible only in development */
[data-review]::before { content: none; }
.dev [data-review] h3 button::after { content: "revisar"; margin-left: 8px; vertical-align: 2px; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #a46a00; border: 1px dashed #d9a43c; padding: 0 5px; border-radius: 2px; }
.placeholder { color: #a46a00; border: 1px dashed #d9a43c; padding: 0 6px; border-radius: 2px; font-size: 12.5px; background: #fffaf0; }

/* ---------- Contact ---------- */
.contact { position: relative; min-height: 100vh; padding: 120px var(--gutter) 0; display: flex; flex-direction: column; background: transparent; }
.contact__inner {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 6vw, 110px);
  align-items: center; max-width: 1180px; width: 100%; margin: 0 auto; padding-bottom: 80px;
}
.contact__body > * + * { margin-top: 18px; }
.contact__main { display: grid; gap: 40px; }
/* the photograph rests full-bleed on the left half; the appointment lives on the right */
.js:not(.no-webgl) .contact { padding-left: calc(46vw + var(--gutter)); }
.js:not(.no-webgl) .contact .footer { max-width: none; }
.contact__body h2 { font-size: clamp(40px, 5vw, 76px); font-weight: 300; letter-spacing: -0.035em; line-height: 1.02; }

/* ---------- Portrait (revealed through the lens) ---------- */
.beat--portrait { min-height: 110vh; }
.portrait {
  --pf-h: min(76vh, 100vw); --pf-cy: 50%;
  position: fixed; inset: 0; margin: 0; z-index: 1; pointer-events: none; visibility: hidden; overflow: hidden;
  background: #d1d0ce; /* the studio backdrop of the photograph, fills the lens beyond the image */
}
.portrait img {
  position: absolute; left: 50%; top: var(--pf-cy); height: var(--pf-h); width: auto; aspect-ratio: 4 / 5;
  translate: -50% -50%; object-fit: cover; transform-origin: 50% 25%; max-width: none; background: var(--bg-soft);
}
.no-webgl .portrait, .no-js .portrait { position: relative; inset: auto; clip-path: none; visibility: visible; grid-column: 2; height: 70vh; }
.no-webgl .portrait img, .no-js .portrait img { position: static; translate: none; height: 100%; }
.contact__data { display: grid; grid-template-columns: max-content 1fr; gap: 10px 26px; margin: 0; font-size: 14px; border-top: 1px solid var(--line); padding-top: 24px; }
.contact__data dt { color: var(--muted); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; padding-top: 2px; }
.contact__data dd { margin: 0; color: var(--ink); }
.contact__data a { text-decoration: none; border-bottom: 1px solid var(--line); }

.button {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--ink); color: #fff; padding: 15px 26px; border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: background .35s var(--ease), transform .35s var(--ease);
}
.button svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.button:hover { background: var(--accent); }
.button:hover svg { transform: translateX(4px); }
.button:active { transform: scale(.98); }
.button--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.button--ghost:hover { background: var(--ink); color: #fff; }
.button[aria-disabled="true"] { cursor: default; }

.footer {
  max-width: 1180px; width: 100%; margin: 0 auto; padding: 28px 0 36px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 32px; justify-content: space-between; font-size: 12px; color: var(--muted);
}
.footer__legal { display: flex; gap: 22px; }
.footer__legal a { text-decoration: none; }
.footer__legal a:hover { color: var(--ink); }
.footer__credit { flex-basis: 100%; font-size: 11px; opacity: .8; }

/* ---------- Drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer[hidden] { display: none; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(14,16,19,.08); backdrop-filter: blur(2px); opacity: 0; transition: opacity .45s var(--ease); }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  background: #fff; border-left: 1px solid var(--line); padding: 84px 44px 44px; overflow-y: auto;
  transform: translateX(100%); transition: transform .55s var(--ease); outline: none;
  box-shadow: -30px 0 60px -40px rgba(14,16,19,.25);
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__panel > * + * { margin-top: 16px; }
.drawer__panel h2 { font-size: 30px; }
.drawer__short { color: var(--ink); font-size: 15.5px; }
.drawer__close { position: absolute; top: 22px; right: 22px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; color: var(--ink); transition: border-color .3s, transform .4s var(--ease); }
.drawer__close:hover { border-color: var(--ink); transform: rotate(90deg); }
.drawer__close svg { width: 16px; height: 16px; }
.drawer__detail { margin: 30px 0 0; }
.drawer__detail dt { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.drawer__detail dd { margin: 8px 0 0; font-size: 14.5px; }
.drawer__note { font-size: 12px; color: var(--muted); margin-top: 30px !important; }
.drawer .button { margin-top: 26px; }

/* ---------- Fallbacks ---------- */
.no-webgl .copy, .no-js .copy { opacity: 1 !important; transform: none !important; }
.no-webgl body, .no-webgl { background: radial-gradient(60% 50% at 50% 45%, #f1f4f7, #fff); }

/* ---------- Tablet & mobile ---------- */
@media (max-width: 1100px) {
  :root { --copy-w: min(320px, 30vw); }
  .beat { grid-template-columns: 1fr minmax(0, 36vw) 1fr; }
}
/* ---------- Hero: pinned headline that cross-fades as the journey starts ---------- */
.js:not(.no-webgl) .beat--hero .copy {
  position: fixed; top: 50%; z-index: 3;
  width: var(--copy-w); max-width: var(--copy-w);
  transform: translateY(-50%);
}
.js:not(.no-webgl) .beat--hero .copy--left { width: min(540px, 36vw); max-width: none; }

/* ---------- Editorial flow: blocks rise into view as the page scrolls ---------- */
.copy { position: relative; z-index: 3; }
.beat:not(.beat--hero) .copy { text-shadow: 0 0 14px #fff, 0 0 4px #fff; } /* legible as it rises over the instrument */
.reduced .reveal { transform: none !important; transition: opacity .3s linear !important; }
.js .reveal {
  opacity: 0; transform: translateY(46px);
  transition: opacity .9s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }
/* side columns enter from their own edge, leaving the centre to the instrument */
.js .copy--left .reveal { transform: translateX(-80px); }
.js .copy--right .reveal { transform: translateX(80px); }
.js .copy--left .reveal.is-in, .js .copy--right .reveal.is-in { transform: none; }
.callouts { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.callouts__line { fill: none; stroke: rgba(14,16,19,.32); stroke-width: 1; }
.callouts__dot { fill: #fff; stroke: var(--accent); stroke-width: 1.5; }
.callouts__halo { fill: rgba(47,95,138,.10); stroke: none; }
.no-webgl .callouts { display: none; }



/* ---------- Typography upgrade: numbered titles, stronger hierarchy ---------- */
.col-title {
  display: flex; align-items: flex-start; gap: 12px; margin: 0; padding-bottom: 4px;
  font-size: clamp(24px, 2.15vw, 36px); font-weight: 600; line-height: 1.04; letter-spacing: -0.035em; color: var(--ink);
}
.merits { border-top: 1px solid var(--ink) !important; }
.merits strong { font-weight: 500 !important; font-size: clamp(20px, 1.8vw, 29px) !important; letter-spacing: -0.03em !important; }
.merits span { font-size: 13.5px !important; color: var(--accent) !important; }
/* over the dark hair the service copy turns white so it stays legible */
.copy--group :is(.group-title, .group-items button) { transition: color .35s, text-shadow .35s, transform .4s var(--ease); }
.copy--group .on-dark, .copy--group .on-dark:hover { color: #fff !important; text-shadow: 0 0 10px rgba(20,12,8,.75), 0 0 2px rgba(20,12,8,.9) !important; }
.dev .group-items [data-review] .on-dark::after { color: #ffe2a6; border-color: #ffe2a6; }
/* service groups: a fine line ties each group to the dermatoscope; group large & bold, services small */
.copy--group { position: relative; }
.group-title {
  font-size: clamp(30px, 2.9vw, 50px); font-weight: 700; line-height: 1; letter-spacing: -0.045em; color: var(--ink); margin: 0;
}
.group-items { list-style: none; padding: 0; margin-top: 18px !important; display: grid; gap: 4px; }
.group-items button {
  appearance: none; background: none; border: 0; padding: 4px 0; margin: 0; cursor: pointer; text-align: left;
  font: inherit; font-size: clamp(17px, 1.3vw, 20px); font-weight: 450; color: var(--ink); letter-spacing: -0.01em; line-height: 1.3;
  transition: color .3s, transform .4s var(--ease);
}
.group-items button:hover, .group-items button:focus-visible, .group-items button[aria-expanded="true"] { color: var(--accent); transform: translateX(3px); }
.copy--right .group-items button:hover { transform: translateX(-3px); }
.dev .group-items [data-review] button::after { content: "revisar"; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: #a46a00; border: 1px dashed #d9a43c; padding: 0 4px; border-radius: 2px; margin-left: 8px; vertical-align: 2px; }
.copy--right.copy--group { text-align: left; }

/* excellence panels: rich side columns */
.js:not(.no-webgl) .copy--rich {
  background: rgba(255,255,255,.74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 24px 26px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(14,16,19,.05);
}
.beat--panel-rich { --copy-w: min(360px, 25vw); align-items: start; padding-top: 16vh; padding-bottom: 16vh; row-gap: 9vh; }
/* the lead (name / figures) rises alone through the middle, then the side columns follow */
.beat--panel-rich > .copy--lead { grid-row: 1; }
.beat--panel-rich > .copy--left, .beat--panel-rich > .copy--right { grid-row: 2; }
.beat .copy--lead {
  grid-column: 1 / -1; justify-self: center; text-align: center;
  padding: 22px 44px; border-radius: 4px;
  background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(14,16,19,.05);
}
.lead-name { font-size: clamp(30px, 3.8vw, 62px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; color: var(--ink) !important; max-width: none !important; white-space: normal; text-wrap: balance; }
.lead-name em { font: inherit; letter-spacing: inherit; }
/* figures: one centred row, then the columns rise along the sides */
/* section heading: Dr. Manuel Almenara Blasco · Formación y experiencia */
.beat .copy--heading {
  grid-column: 1 / -1; justify-self: center; text-align: center;
  padding: 20px 40px 22px; border-radius: 4px;
  background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(14,16,19,.05);
}
.heading__kicker { font-size: clamp(16px, 1.3vw, 20px); font-weight: 600; color: var(--ink) !important; letter-spacing: -0.01em; max-width: none !important; }
.heading__kicker em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.15em; }
.heading__title { margin-top: 6px !important; font-size: clamp(30px, 2.9vw, 46px); font-weight: 700; letter-spacing: -0.045em; line-height: 1; color: var(--ink); }
.beat .copy--stats {
  grid-column: 1 / -1; justify-self: center; text-align: center;
  padding: 18px 34px 16px; border-radius: 4px;
  background: rgba(255,255,255,.78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(14,16,19,.05);
}
.col-lede { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.45; color: var(--ink) !important; font-weight: 500; max-width: none !important; margin-top: 14px !important; }
.sub-title { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 30px 0 0 !important; }
.timeline { list-style: none; padding: 0 0 0 22px; margin-top: 22px !important; position: relative; display: grid; gap: 16px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--accent), var(--line)); }
.timeline li { position: relative; display: grid; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 1.5px solid var(--accent); }
.timeline strong { font-size: clamp(16px, 1.25vw, 19px); font-weight: 600; letter-spacing: -0.015em; color: var(--ink); line-height: 1.25; }
.timeline span { font-size: 13.5px; color: var(--text); line-height: 1.45; }
.xp { list-style: none; padding: 0; margin-top: 20px !important; display: grid; gap: 10px; }
.xp > li { border: 1px solid var(--line); border-left: 2px solid var(--ink); background: rgba(255,255,255,.82); padding: 13px 16px; display: grid; gap: 3px; }
.xp strong { font-size: clamp(17px, 1.35vw, 20px); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.xp__place { font-size: 14px; color: var(--accent); font-weight: 500; }
.xp__detail { font-size: 13px; color: var(--text); }
.stays { list-style: none; padding: 0; margin-top: 18px !important; display: grid; gap: 0; border-top: 1px solid var(--line); }
.stays li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.stays strong { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.stays span { font-size: 13px; color: var(--accent); }
.areas { list-style: none; padding: 0; margin-top: 22px !important; display: flex; flex-wrap: wrap; gap: 7px; }
.areas li { display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.3; font-size: 12.5px; padding: 6px 14px; border-radius: 18px; border: 1px solid var(--ink); color: var(--ink); background: rgba(255,255,255,.85); text-shadow: none; transition: background .3s, color .3s; }
.areas li:hover { background: var(--ink); color: #fff; }
.figures { margin: 22px 0 0 !important; display: grid; gap: 0; }
.figures div { display: flex; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.figures dt { font-size: clamp(52px, 5vw, 84px); font-weight: 600; color: var(--accent); letter-spacing: -0.05em; line-height: .95; min-width: 2.1ch; }
.figures dd { margin: 0; font-size: 15px; color: var(--ink); font-weight: 500; }
.facts { list-style: none; padding: 0; margin-top: 12px !important; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts li { position: relative; padding: 11px 0 11px 20px; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.facts li::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 1.5px; background: var(--accent); }

/* hero: the name is the headline at the top; specialty below the instrument */
.js:not(.no-webgl) .beat--hero .copy--hero-name {
  justify-self: stretch; /* grid item: otherwise it shrinks to its content at the left */
  top: 72px; left: var(--gutter); right: var(--gutter); width: auto; max-width: none; transform: none; text-align: center;
}
.copy--hero-name .eyebrow { justify-content: center; }
.copy--hero-name .eyebrow::before { display: none; } /* just "Zaragoza (España)" under the monogram */
.copy--hero-name h1 {
  font-size: clamp(36px, 4.4vw, 74px); font-weight: 500; line-height: 1; letter-spacing: -0.04em; white-space: nowrap;
}
/* "Dr." in exactly the same type as the name */
.copy--hero-name .h1__pre {
  display: inline; font: inherit; letter-spacing: inherit; color: inherit; margin: 0;
}
.copy--hero-name .lede { margin: 18px auto 0 !important; font-size: clamp(17px, 1.45vw, 22px); font-weight: 500; max-width: none !important; color: var(--ink) !important; }
.copy--hero-name .promise {
  margin: 10px auto 0 !important; max-width: 46ch !important; color: var(--text) !important;
  font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: clamp(18px, 1.55vw, 24px); line-height: 1.3;
}
.js:not(.no-webgl) .beat--hero .copy--hero-side {
  top: auto; bottom: 4vh; left: 50%; right: auto; transform: translateX(-50%);
  width: auto; max-width: none; text-align: center;
}
.copy--hero-side .scroll-cue { justify-content: center; margin-top: 18px !important; max-width: none !important; }

/* centred research block, instrument lying horizontal below it */
.beat .copy--center {
  grid-column: 1 / -1; justify-self: center;
  width: min(1000px, 88vw); max-width: none; text-align: center;
}
.copy--center .col-title { justify-content: center; }
/* the figures rise straight over the 3D scene, no panel behind them */
.beat .copy--lead { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.copy--lead .lead-name, .copy--lead .stats--row dt, .copy--lead .stats--row dd { text-shadow: 0 0 18px rgba(255,255,255,.9), 0 0 4px rgba(255,255,255,.8); }
.copy--lead .stats--row dd { color: var(--ink) !important; font-weight: 500; }
.stats--row { display: flex !important; justify-content: center; gap: clamp(28px, 5vw, 84px) !important; margin-top: 22px !important; }
.stats--row div { flex-direction: column; align-items: center !important; gap: 6px !important; border: 0 !important; padding: 0 !important; }
.stats--row dt { font-size: clamp(56px, 6.2vw, 108px) !important; font-weight: 600 !important; color: var(--accent); letter-spacing: -0.05em !important; line-height: .9 !important; }
.stats--row dd { font-size: clamp(16px, 1.3vw, 20px) !important; line-height: 1.3; color: var(--text) !important; max-width: 16ch !important; }
.merits--row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; margin-top: 30px !important; border-top: 0 !important; text-align: left; }
.merits--row li { border-top: 1px solid var(--ink); border-bottom: 0 !important; }
.merits--row strong { font-size: clamp(17px, 1.35vw, 22px) !important; }

/* medium widths (small laptops, split windows, tablets): keep the paired side columns
   with the instrument in the middle; everything just gets tighter */
@media (max-width: 820px) and (min-width: 561px) {
  :root { --gutter: 18px; }
  .nav__links, .nav__muted { display: none; }
  .beat { grid-template-columns: 1fr minmax(0, 34vw) 1fr; }
  .beat--panel-rich, .beat--services { --copy-w: 31vw; }
  .copy--hero-name h1 { white-space: normal; font-size: clamp(34px, 5.6vw, 46px); }
  .js:not(.no-webgl) .copy--rich { padding: 16px 16px 18px; }
  .col-title { font-size: 20px; }
  .heading__title { font-size: 26px; }
  .heading__kicker { font-size: 14px; }
  .group-title { font-size: 24px; }
  .group-items button { font-size: 15.5px; padding: 3px 0; }
  .timeline { padding-left: 18px; gap: 12px; }
  .timeline li::before { left: -18px; }
  .timeline strong { font-size: 14px; }
  .timeline span, .stays span, .xp__detail { font-size: 11.5px; }
  .stays li { font-size: 12.5px; }
  .areas li { font-size: 11px; padding: 5px 10px; }
  .facts li { font-size: 12px; padding-left: 16px; }
  .figures dt { font-size: 38px; }
  .figures dd { font-size: 12.5px; }
}

@media (max-width: 560px) {
  :root { --gutter: 20px; --copy-w: 100%; }
  body { font-size: 15px; }
  .nav { height: 56px; gap: 14px; }
  .nav__logo { height: 58px; }
  .nav__brand:has(.nav__logo) { margin-top: 8px; margin-left: calc(6px - var(--gutter)); }
  .hero__logo { width: 104px; margin-bottom: 10px; }
  .nav__links { display: none; }
  .nav__muted { display: none; }
  .beat { grid-template-columns: 1fr; min-height: auto; padding: 0 var(--gutter); }
  .beat--hero { min-height: 100svh; }
  /* phone: each section leaves the instrument visible above, then its cards rise over it */
  .beat--services, .beat--panel, .beat--panel-center { padding: 56svh var(--gutter) 14svh; gap: 14px; align-items: start; }
  .beat--panel .stats dt { font-size: 34px; }
  .beat--panel .stats div { padding: 8px 0; }
  .beat--portrait { min-height: 110svh; }
  .copy--left, .copy--right { grid-column: 1; justify-self: stretch; }
  .copy { max-width: none; }

  /* cards over the instrument */
  .js:not(.no-webgl) .beat:not(.beat--hero) .copy {
    padding: 18px 18px 14px; border-radius: 6px;
    background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: 0 0 0 1px rgba(14,16,19,.06);
  }
  .js:not(.no-webgl) .beat--hero .copy--hero-name { top: 68px; bottom: auto; left: 0; right: 0; width: auto; padding: 0 var(--gutter); background: none; max-height: none; transform: none; }
  .copy--hero-name h1 { font-size: clamp(32px, 9vw, 42px); white-space: normal; }
  .js:not(.no-webgl) .beat--hero .copy--hero-side { left: 0; right: 0; transform: none; width: auto; text-align: left; }
  .copy--hero-side .roles, .copy--hero-side .scroll-cue { justify-content: flex-start; }
  .stats--row dt { font-size: 40px !important; }
  .stats--row { gap: 12px !important; }
  .stats--row dd { font-size: 12.5px !important; max-width: 11ch !important; } /* phone: labels stay inside the white card */
  .beat--panel-rich { row-gap: 14px; padding-top: 56svh; }
  .beat--panel-rich > .copy--lead, .beat--panel-rich > .copy--left, .beat--panel-rich > .copy--right { grid-row: auto; }
  .lead-name { font-size: 30px; white-space: normal; }
  .figures dt { font-size: 44px; }
  .copy--hero-name .lede { font-size: 16px; margin-top: 12px !important; }
  .copy--hero-name .promise { font-size: 17px; }
  .js:not(.no-webgl) .beat--hero .copy--hero-side { display: none; }
  .group-title { font-size: 28px; }
  .group-items button { font-size: 16.5px; padding: 4px 0; }
  .merits--row { grid-template-columns: 1fr; margin-top: 14px !important; }
  .col-title { font-size: 24px; }

  h1 { font-size: clamp(38px, 11vw, 52px); }
  h2 { font-size: 25px; }
  .merits span { display: none; }
  .merits li { padding: 10px 0; }
  .treatments button { font-size: 21px; padding: 8px 26px 8px 0; }
  .scroll-cue { margin-top: 18px !important; }
  .contact { padding-top: 90px; }
  /* phone: the photograph rests as a full-width band on top, the appointment below */
  .js:not(.no-webgl) .contact { padding: 38vh var(--gutter) 0 !important; }
  .contact .footer { padding: 18px 0 22px; font-size: 11px; }
  .contact__inner { padding-bottom: 24px; }
  .contact__main { gap: 18px; }
  .contact__body > * + * { margin-top: 10px; }
  .contact__body h2 { font-size: 32px; }
  .contact__body .lede { font-size: 14px; }
  .contact__body .button { padding: 11px 18px; font-size: 13px; }
  .contact__data { padding-top: 14px; grid-template-columns: max-content 1fr !important; gap: 6px 14px !important; font-size: 13px; }
  .contact__data dd { margin-bottom: 0 !important; }
  .portrait { --pf-h: min(48vh, 88vw); --pf-cy: 34%; }
  .contact__data { grid-template-columns: 1fr; gap: 4px; }
  .contact__data dd { margin-bottom: 10px; }
  .drawer__panel { padding: 76px 24px 34px; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  .scroll-cue span::after { animation: none; }
  .js .copy { transition: opacity .35s linear; }
  .drawer__panel, .drawer__scrim { transition-duration: .01s; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
