/* Patients First — template 6: the name as a monument. Type, flat fields and space only. */

:root {
  --black: #000000;
  --ground: #07090C;
  --f1: #11161C;
  --f2: #1A2129;
  --ink: #EEF2F6;
  --muted: #A9B4C0;
  --lime: #7BD62B;
  --on-lime: #07090C;
  --blue: #2A9DF4;
  --link: #62B8FF;
  --line: rgba(238, 242, 246, 0.12);
  --radius: 14px;

  --display: "Imbue", "Bodoni 72", "Didot", Georgia, serif;
  --text: "Albert Sans", "Helvetica Neue", Arial, sans-serif;

  --step-small: 0.8125rem;                                  /* legal text only */
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);  /* 17–19px */
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);    /* 20–26px */
  --step-head: clamp(2.25rem, 1.4rem + 3vw, 4.5rem);        /* 36–72px: hero only */
  --step-h2: clamp(2rem, 1.2rem + 1.9vw, 3.25rem);          /* 32–52px: every heading below the hero */

  --m: clamp(20px, 3vw, 48px);
  --gap: clamp(20px, 2vw, 32px);
  --section: clamp(96px, 11vw, 176px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  /* Behind the nav and hero only (every later section has its own solid field):
     faint film grain (an SVG noise tile, about 3.5% alpha), a soft lime glow behind the name,
     a softer blue glow low on the right, over black. */
  background-color: var(--black);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0.07 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(1300px 900px at 24% 300px, rgba(123, 214, 43, 0.22), rgba(123, 214, 43, 0) 70%),
    radial-gradient(1150px 900px at 88% 920px, rgba(42, 157, 244, 0.14), rgba(42, 157, 244, 0) 70%);
  background-repeat: repeat, no-repeat, no-repeat;
  background-size: 180px 180px, 100% 1800px, 100% 1800px;
  background-position: 0 0, 0 0, 0 0;
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--lime); color: var(--on-lime); }
button { font: inherit; }

/* ---------- language switch ---------- */
html:not(.js) span[lang="es"]::before { content: " / "; }
html.js[data-lang="en"] body [lang="es"] { display: none !important; }
html.js[data-lang="es"] body [lang="en"] { display: none !important; }

/* ---------- frame ---------- */
.wrap {
  display: block;
  width: 100%;
  max-width: calc(1600px + 2 * var(--m));
  margin-inline: auto;
  padding-inline: var(--m);
}

.skip {
  position: absolute; left: var(--m); top: -100px; z-index: 10;
  background: var(--lime); color: var(--on-lime); padding: 12px 18px; font-weight: 500;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */
/* The header has no fill of its own: the hero's glow runs up behind it. */
.top { background: transparent; }
.announce {
  background: var(--f1);
  color: var(--ink);
  padding-block: 12px;
  font-size: var(--step-body);
  line-height: 1.4;
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px 40px;
  padding-block: 16px;
  flex-wrap: wrap;
}
.brand { display: block; margin-right: auto; }
/* the logo is drawn on solid black: screen drops the black so it sits cleanly on the glow */
.brand img { width: clamp(118px, 10vw, 156px); mix-blend-mode: screen; }
.nav-links { display: flex; gap: 8px 32px; flex-wrap: wrap; }
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding-block: 8px;
  display: inline-block;
  transition: color 160ms ease;
}
.nav-links a:hover { color: var(--link); }
.nav-links li:last-child a { color: var(--link); }
.nav-links li:last-child a:hover { color: var(--ink); }

.lang { display: flex; gap: 4px; }
.lang button {
  min-width: 48px; min-height: 44px;
  padding: 0 10px;
  background: var(--f1);
  color: var(--muted);
  border: 0;
  border-radius: 0;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-pop);
}
.lang button:hover { color: var(--ink); background: var(--f2); }
.lang button:active { transform: scale(0.94); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--on-lime); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  text-align: center;
  line-height: 1.3;
  padding: 16px 28px;
  font-weight: 500;
  font-size: var(--step-body);
  text-decoration: none;
  border-radius: 0;
  transition: background-color 180ms ease, color 180ms ease, transform 200ms var(--ease-pop);
}
.btn:active { transform: scale(0.97); }
.btn-lime { background: var(--lime); color: var(--on-lime); }
.btn-lime:hover { background: var(--ink); color: var(--on-lime); }
.btn-dark { background: var(--ink); color: var(--on-lime); }
.btn-dark:hover { background: var(--lime); color: var(--on-lime); }

/* ---------- shared type ---------- */
.h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-h2);
  line-height: 1;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
  text-wrap: balance;
}
.h3 {
  font-family: var(--text);
  font-weight: 500;
  font-size: var(--step-lead);
  line-height: 1.25;
}
.lead { font-size: var(--step-lead); line-height: 1.4; }
/* The section's label line, set as a readable line in the lead size, sentence case, blue ink */
.label {
  color: var(--link);
  font-size: var(--step-lead);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 20px;
}

/* ---------- hero ---------- */
/* The hero has no fill: it shows the page's glow (see body), which also runs behind the nav. */
.hero { padding-top: 0; padding-bottom: var(--section); background: transparent; }
.hero .wrap { container-type: inline-size; }

.monument {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.8;
  white-space: nowrap;
  /* one phrase on the left edge, a normal word space between the two inks */
  font-size: clamp(56px, 8vw, 160px);
  display: flex;
  justify-content: flex-start;
  gap: 0 0.22em;
  overflow: clip;
  overflow-clip-margin: 0.1em;
}
.mline { display: block; overflow: hidden; padding-top: 0.06em; padding-bottom: 0.04em; }
.mword { display: block; color: var(--ink); }
.mword-2 { color: var(--lime); }

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 0;
  margin-top: clamp(32px, 2.6vw, 52px);
  align-items: start;
}
.hero-label { grid-column: 1 / -1; margin-bottom: 16px; }
.hero-main { grid-column: 1 / span 7; }
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-head);
  line-height: 0.98;
  letter-spacing: -0.015em;
  max-width: 11em;
  text-wrap: balance;
}
.lead-body { margin-top: 20px; max-width: 34em; }
.hero-main .btn { margin-top: 28px; }

.hero-card {
  grid-column: 9 / span 4;
  background: var(--f2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 2.4vw, 40px);
}
.card-h { font-size: var(--step-lead); font-weight: 500; line-height: 1.25; }
.card-phone { margin-top: 10px; }
.card-phone a {
  font-family: var(--display);
  font-size: var(--step-head);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}
.card-phone a:hover { color: var(--lime); }
.card-list { margin-top: 24px; display: grid; gap: 12px; }
.card-list li { padding-left: 22px; position: relative; }
.card-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; background: var(--blue);
}

/* ---------- services ---------- */
.services { background: var(--f1); padding-block: var(--section); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
}
.services-head { grid-column: 1 / span 5; position: sticky; top: 40px; }
.services-head .lead { margin-top: 28px; max-width: 26em; }
.service-list { grid-column: 7 / span 6; display: grid; gap: clamp(40px, 4vw, 64px); }
.service p { margin-top: 10px; max-width: 34em; }
.service, .promise { border-left: 3px solid var(--lime); padding-left: clamp(18px, 1.6vw, 24px); }

/* ---------- steps ---------- */
.steps { background: var(--black); padding-block: var(--section); }
.steps-intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
}
.steps-intro > div { grid-column: 1 / span 6; }
.steps-intro .lead { grid-column: 7 / span 5; }
.step-list {
  margin-top: clamp(56px, 6vw, 96px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
  counter-reset: none;
}
.step {
  background: var(--f2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 2.6vw, 44px);
}
.step-h { min-height: 2em; }
@media (min-width: 1500px) { .step-h { min-height: 0; } }
.nowrap { white-space: nowrap; }
.step p { margin-top: 20px; max-width: 30em; }

/* ---------- why ---------- */
.why { background: var(--f2); padding-block: var(--section); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 40px;
}
.why-head { grid-column: 1 / span 4; }
.why-body { grid-column: 5 / span 8; }
.statement {
  font-size: var(--step-lead);
  line-height: 1.3;
  max-width: 30em;
}
.promise-list {
  margin-top: clamp(48px, 5vw, 80px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 56px) var(--gap);
}
.promise p { margin-top: 10px; max-width: 30em; }

/* ---------- contact ---------- */
.contact { background: var(--black); padding-top: var(--section); padding-bottom: clamp(48px, 5vw, 80px); }
.contact .wrap { container-type: inline-size; }
.contact-top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 48px;
  align-items: start;
}
.contact-top > div:first-child { grid-column: 1 / span 6; }
.ready {
  grid-column: 7 / span 6;
  background: var(--f1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 2.6vw, 44px);
}
.ready p:not(.r-pop) { margin-top: 12px; max-width: 34em; }
.ready .btn { margin-top: 28px; }

.details {
  margin-top: clamp(40px, 4vw, 64px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 28px;
  font-size: var(--step-lead);                              /* values: 20–26px */
  line-height: 1.35;
}
.detail:nth-child(1) { grid-column: 1 / span 3; }
.detail:nth-child(2) { grid-column: 4 / span 3; }
.detail:nth-child(3) { grid-column: 7 / span 3; }
.detail:nth-child(4) { grid-column: 10 / span 3; }
.details dt { color: var(--link); font-size: 1rem; font-weight: 500; line-height: 1.4; margin-bottom: 8px; }
.details dd { margin: 0; }
.details dd + dd { margin-top: 6px; }
.detail-phone a {
  font-family: var(--display);
  font-size: clamp(1.625rem, 1.3rem + 0.7vw, 2rem);        /* 26–32px */
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}
.detail-phone a:hover { color: var(--lime); }
.note em { font-style: italic; }
.ulink { color: var(--link); font-weight: 500; }

/* ---------- final call to action ---------- */
.cta {
  background: var(--lime);
  color: var(--on-lime);
  padding-block: clamp(80px, 8vw, 128px);
}
.cta-top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 24px;
  align-items: end;
}
.cta-top .h2 { grid-column: 1 / span 7; }
.cta-top .lead { grid-column: 8 / span 5; }
.cta-action { margin-top: 36px; }
.btn-ondark { background: var(--on-lime); color: var(--ink); }
.btn-ondark:hover { background: var(--ink); color: var(--on-lime); }
.cta :focus-visible { outline-color: var(--on-lime); }

/* ---------- footer ---------- */
.foot { background: var(--f1); padding-top: clamp(72px, 8vw, 128px); padding-bottom: 32px; }
.foot .wrap { container-type: inline-size; }
.foot-cols {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 32px;
}
.foot-col:nth-child(1) { grid-column: 1 / span 4; }
.foot-col:nth-child(2) { grid-column: 5 / span 2; }
.foot-col:nth-child(3) { grid-column: 7 / span 3; }
.foot-col:nth-child(4) { grid-column: 10 / span 3; }
.foot-col { color: var(--muted); }
.foot-col p + p { margin-top: 6px; }
.foot-first { color: var(--ink); font-weight: 500; }
.foot-links { display: grid; gap: 6px; align-content: start; }
.foot-links a { color: var(--link); }
.foot-links a:hover { color: var(--ink); }
.foot-col a[href^="tel"] { color: var(--link); }

.wordmark {
  margin-top: clamp(48px, 5vw, 80px);
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
  font-size: var(--step-h2);
  color: var(--ink);
}
.wordmark .wm-2 { color: var(--lime); }
.legal {
  margin-top: 28px;
  font-size: var(--step-small);
  line-height: 1.5;
  color: var(--muted);
  max-width: 66ch;
}

/* ---------- motion: masked monument + pop-in ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .monument [data-line] {
    transform: translateY(105%);
    animation: line-up 900ms var(--ease-out) forwards;
    animation-delay: calc(var(--i) * 110ms + 120ms);
  }
  .js .r {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
    transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
    transition-delay: var(--d, 0ms);
  }
  .js .r.r-pop, .js .card-list .r { transition-timing-function: var(--ease-out), var(--ease-pop); }
  .js .r.in { opacity: 1; transform: none; }
  .js.show-all .r { opacity: 1; transform: none; }
}
@keyframes line-up { to { transform: none; } }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .hero-main { grid-column: 1 / -1; }
  .hero-card { grid-column: 1 / -1; margin-top: 48px; }
  .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
  .services-head { grid-column: 1 / -1; position: static; }
  .service-list { grid-column: 1 / -1; margin-top: 56px; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
  .steps-intro > div, .steps-intro .lead { grid-column: 1 / -1; }
  .steps-intro .lead { margin-top: 24px; max-width: 34em; }
  .step-list { grid-template-columns: 1fr; row-gap: var(--gap); }
  .step-h { min-height: 0; }
  .why-head, .why-body { grid-column: 1 / -1; }
  .contact-top > div:first-child, .ready { grid-column: 1 / -1; }
  .detail:nth-child(odd) { grid-column: 1 / span 6; }
  .detail:nth-child(even) { grid-column: 7 / span 6; }
  .cta-top .h2, .cta-top .lead { grid-column: 1 / -1; }
  .foot-col:nth-child(1) { grid-column: 1 / span 6; }
  .foot-col:nth-child(2) { grid-column: 7 / span 6; }
  .foot-col:nth-child(3) { grid-column: 1 / span 6; }
  .foot-col:nth-child(4) { grid-column: 7 / span 6; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .announce { font-size: 1rem; }
  .nav { gap: 12px 20px; padding-block: 16px; }
  .nav-links { order: 3; width: 100%; gap: 0 22px; }
  .nav-links a { padding-block: 10px; }

  .monument { font-size: 16vw; }
  .hero-card { grid-column: 1 / -1; }
  .card-list { grid-template-columns: 1fr; }
  .hero-main .btn { width: 100%; }

  .service-list { grid-template-columns: 1fr; }
  .promise-list { grid-template-columns: 1fr; }
  .detail:nth-child(n) { grid-column: 1 / -1; }
  .cta-action .btn { width: 100%; }
  .ready .btn { width: 100%; }

  .foot-col:nth-child(n) { grid-column: 1 / -1; }
}
