/* Patients First Dentures & Implants — template 8, "Loud and flat"
   Type, flat colour and layout only. One family (TikTok Sans), five sizes. */

:root {
  --ground: #000000;
  --ground-2: #07090C;
  --field-1: #11161C;
  --field-2: #1A2129;
  --field-3: #222A33;
  --lime: #7BD62B;
  --on-lime: #07090C;
  --blue: #2A9DF4;
  --link: #62B8FF;
  --ink: #EEF2F6;
  --muted: #A9B4C0;

  --font: "TikTok Sans", "Arial Narrow", Arial, sans-serif;

  /* type scale (1920 / phone) */
  --s-small: 0.875rem;                                     /* 14px: the SMS legal text only */
  --s-body: clamp(1rem, 0.9rem + 0.2vw, 1.0625rem);        /* 17 / 16 */
  --s-intro: clamp(1.125rem, 1rem + 0.25vw, 1.25rem);      /* 20 / 18: section intros */
  --s-title: clamp(1.1875rem, 1.05rem + 0.3vw, 1.375rem);  /* 22 / 19: item titles */
  --s-head: clamp(2rem, 1.4rem + 1.9vw, 3.25rem);          /* 52 / 32: section headings */
  --s-phone: clamp(1.75rem, 1.45rem + 0.55vw, 2.125rem);   /* 34 / 28: the phone number */
  /* the hero h1 is fitted to the width of its column */

  --m: clamp(20px, 4vw, 64px);
  --gap: clamp(16px, 2vw, 32px);
  --sec: clamp(72px, 6.7vw, 128px);          /* section padding 128 / 72 */
  --head-gap: clamp(36px, 2.9vw, 56px);      /* heading block to content */
  --item-gap: clamp(28px, 2.1vw, 40px);      /* between items */
  --pad-card: clamp(24px, 2.1vw, 40px);      /* inside cards */
  --radius: 14px;
  --edge: 1px solid rgba(238, 242, 246, 0.12);
  --max: 1600px;

  --ease: 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; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--s-body);
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
::selection { background: var(--lime); color: var(--on-lime); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--m));
  margin-inline: auto;
  padding-inline: var(--m);
}

/* ---------- language ---------- */
/* With no script both languages show: Spanish follows English. */
html:not(.js) .i[data-l="es"]::before { content: " / "; }
h1 [data-l], h2 [data-l], h3 [data-l], .val [data-l], .sub [data-l] { display: block; }
html.js:not([lang="es"]) [data-l="es"],
html.js[lang="es"] [data-l="en"] { display: none !important; }

/* ---------- shared type ---------- */
.label {
  color: var(--link);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 12px 0 0;
}
.h2 {
  font-size: var(--s-head);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h3 {
  font-size: var(--s-title);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin-bottom: 10px;
}
p { max-width: 62ch; }
.lead { font-size: var(--s-intro); line-height: 1.55; font-weight: 400; }
p + p[data-l] { margin-top: 0.75em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  text-align: center;
  padding: 16px 28px;
  background: var(--lime);
  color: var(--on-lime);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  border-radius: 0;
  transition: transform 220ms var(--ease-pop), background-color 160ms linear, color 160ms linear;
}
.btn:hover { background: var(--ink); color: var(--on-lime); transform: translateY(-3px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-ink { background: var(--on-lime); color: var(--lime); }
.btn-ink:hover { background: var(--ground); color: var(--ink); }
.close .btn-ink:focus-visible { outline-color: var(--on-lime); }

/* ---------- announcement ---------- */
.bar { background: var(--field-1); }
.bar p { padding-block: 12px; font-size: 1rem; line-height: 1.4; max-width: 75ch; }

/* ---------- top ---------- */
.top-in {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: center;
  padding-block: 14px;
}
.logo { grid-column: 1 / 5; justify-self: start; display: block; }
.logo img { width: clamp(140px, 10vw, 190px); }
.nav {
  grid-column: 5 / 13;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px clamp(20px, 2.6vw, 44px);
}
.nav > a {
  color: var(--ink);
  font-size: var(--s-body);
  font-weight: 600;
  text-decoration: none;
  padding-block: 10px;
  transition: color 160ms linear;
}
.nav > a:hover { color: var(--lime); }
.nav-call { color: var(--link) !important; }
.nav-call:hover { color: var(--lime) !important; }
.lang { margin-left: auto; display: flex; gap: 4px; }
.lang button {
  font: inherit;
  font-size: 1rem;
  font-weight: 750;
  min-width: 52px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: var(--field-2);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 160ms linear, color 160ms linear, transform 200ms var(--ease-pop);
}
.lang button:hover { background: var(--field-1); color: var(--lime); }
.lang button:active { transform: scale(0.94); }
.lang button[aria-pressed="true"] { background: var(--lime); color: var(--on-lime); }
html:not(.js) .lang { display: none; }

/* ---------- hero: one two-column grid ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-top: clamp(24px, 2.5vw, 48px); padding-bottom: clamp(56px, 5vw, 96px); }
/* a wide diagonal lime band behind the headline and the card, fading out at both edges */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(168deg, rgba(123, 214, 43, 0) 30%, rgba(123, 214, 43, 0.16) 50%, rgba(123, 214, 43, 0) 70%);
  /* the band never meets the hero's top or bottom edge with a cut */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 68fr) minmax(0, 28fr);
  column-gap: 4%;
  grid-template-areas:
    "tag ."
    "h1 card"
    "intro card"
    "act card";
  grid-template-rows: auto auto auto 1fr;
}
.tag {
  grid-area: tag;
  color: var(--link);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 16px;
}
.h1-box { grid-area: h1; container-type: inline-size; }
.lines {
  font-weight: 850;
  font-stretch: 100%;
  line-height: 0.94;
  letter-spacing: -0.03em;
  /* fitted: the longest authored line runs the width of its column, capped */
  --cap: max(4.6vw, clamp(3rem, 1.6rem + 4vw, 6rem));
  font-size: min(calc(100cqi / 12.32), var(--cap));
}
html[lang="es"] .lines { font-size: min(calc(100cqi / 13.1), var(--cap)); }
html:not(.js) .lines { font-size: min(calc(100cqi / 13.1), var(--cap)); }
.lines .lv { display: block; }
html:not(.js) .lines .lv + .lv { margin-top: 0.2em; }
.lines .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; white-space: nowrap; }
.lines [data-line] { display: block; }
.intro { grid-area: intro; margin-top: clamp(24px, 2vw, 36px); }
.intro p { font-size: var(--s-intro); line-height: 1.55; max-width: 34ch; }
.act { grid-area: act; margin-top: 32px; }
.card {
  grid-area: card;
  align-self: center;
  background: var(--field-2);
  color: var(--ink);
  padding: var(--pad-card);
  border: var(--edge);
  border-radius: var(--radius);
}
.card-h { font-size: var(--s-intro); font-weight: 600; line-height: 1.3; color: var(--ink); margin-bottom: 8px; }
.card-num {
  display: inline-block;
  font-size: var(--s-phone);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--lime);
  text-decoration: none;
  transition: color 160ms linear;
}
.card-num:hover { color: var(--ink); }
.facts {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  font-size: var(--s-body);
  line-height: 1.45;
  color: var(--ink);
}
/* very wide screens: the headline takes the full width, the two columns sit under it */
@media (min-width: 2000px) {
  .hero-grid { grid-template-areas: "tag tag" "h1 h1" "intro card" "act card"; }
  .card { margin-top: clamp(24px, 2vw, 36px); align-self: start; }
}

/* ---------- services: mosaic of unlike tiles ---------- */
.services { padding-top: clamp(16px, 2vw, 32px); }
.mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
}
.tile { padding: var(--pad-card); min-height: 180px; border: var(--edge); border-radius: var(--radius); }
.tile p { max-width: 40ch; }
.t-head { grid-column: 1 / 13; padding: 0 0 calc(var(--head-gap) - 8px); min-height: 0; border: 0; border-radius: 0; }
.t-head .h2 { max-width: 22ch; }
.t-head .label + .rv { margin-top: 20px; }
.t-head p { max-width: 52ch; font-size: var(--s-intro); line-height: 1.55; }
/* row two: 6 + 3 + 3; row three mirrors it: 3 + 3 + 6 */
.m-a { grid-column: 1 / 7; min-height: clamp(200px, 15vw, 260px); }
.m-b { grid-column: 7 / 10; }
.m-c { grid-column: 10 / 13; }
.m-d { grid-column: 1 / 4; }
.m-e { grid-column: 4 / 7; }
.m-f { grid-column: 7 / 13; }
.t-1 { background: var(--field-1); }
.t-2 { background: var(--field-2); }
.t-lime { background: var(--lime); color: var(--on-lime); }

/* ---------- how it works: tiles that grow ---------- */
.steps { padding-block: var(--sec); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: var(--head-gap);
  align-items: end;
}
.steps-intro {
  grid-column: 1 / 13; grid-row: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 10px;
  align-items: end;
}
.steps-intro > .label, .steps-intro > .h2 { grid-column: 1 / 9; }
.steps-intro > .rv:last-child { grid-column: 9 / 13; grid-row: 1 / 3; padding-left: var(--pad-card); }
.stair { display: contents; counter-reset: step; }
.step {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--pad-card);
  border: var(--edge);
  border-radius: var(--radius);
  counter-increment: step;
}
/* the step's number, large, at the top of its tile */
.step::before {
  content: counter(step);
  margin-bottom: auto;
  padding-bottom: 20px;
  font-size: clamp(3rem, 2rem + 2vw, 4.5rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--lime);
}
.s3::before { color: var(--on-lime); }
.step p { max-width: 34ch; }
.s1 { grid-column: 1 / 5; grid-row: 2; min-height: clamp(200px, 14vw, 250px); background: var(--field-2); }
.s2 { grid-column: 5 / 9; grid-row: 2; min-height: clamp(240px, 18vw, 310px); background: var(--field-3); }
.s3 { grid-column: 9 / 13; grid-row: 2; min-height: clamp(280px, 22vw, 370px); background: var(--lime); color: var(--on-lime); }
.s3 p { font-weight: 500; }

/* ---------- why: side facts, wide paragraph ---------- */
.why { padding-block: var(--sec); background: var(--field-1); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}
.why-side { grid-column: 1 / 13; margin-bottom: var(--head-gap); }
.why-main { display: contents; }
.why-main > .rv { grid-column: 1 / 5; padding-right: var(--gap); }
.statement { font-size: var(--s-intro); line-height: 1.55; font-weight: 500; max-width: 28ch; }
.points {
  grid-column: 5 / 13;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--item-gap) var(--gap);
}
.points p { max-width: 36ch; }

/* ---------- contact: one field, details and a card ---------- */
.contact { padding-block: var(--sec); }
.contact-head { margin-bottom: var(--head-gap); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
}
.details-col { grid-column: 1 / 7; }
.details { display: grid; gap: var(--item-gap); }
.details dt { font-size: 1rem; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.val { display: block; font-size: var(--s-title); font-weight: 600; line-height: 1.35; color: var(--ink); text-decoration: none; }
.val-phone { font-size: var(--s-phone); font-weight: 700; transition: color 160ms linear; }
.val-phone:hover { color: var(--lime); }
.sub { display: block; margin-top: 4px; color: var(--muted); }
.nw { white-space: nowrap; }
.dir { display: inline-block; margin-top: 6px; font-weight: 600; padding-block: 4px; }
.note { margin-top: var(--item-gap); color: var(--muted); max-width: 44ch; }
.ready { grid-column: 8 / 13; background: var(--field-2); padding: var(--pad-card); border: var(--edge); border-radius: var(--radius); }
.ready .btn { margin-top: 24px; }

/* ---------- close: the idea again, inverted ---------- */
.close {
  background: var(--lime);
  color: var(--on-lime);
  padding-block: var(--sec);
}
.close-h {
  font-size: var(--s-head);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.close-low {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 32px var(--gap);
  margin-top: clamp(28px, 2.6vw, 44px);
}
.close-low > .rv { max-width: 34ch; }

/* ---------- footer ---------- */
.foot { padding-top: clamp(72px, 7vw, 128px); padding-bottom: 40px; }
.foot-cols {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 32px;
}
.foot-cols > div { grid-column: 1 / 9; color: var(--muted); }
.foot-cols > div p + p { margin-top: 0.35em; }
.foot-cols .strong { color: var(--ink); font-weight: 600; }
.foot-links { grid-column: 9 / 13; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px clamp(24px, 3vw, 48px); align-content: start; }
.foot-links a { font-weight: 600; display: inline-block; padding-block: 6px; }
.foot-mark { margin-top: clamp(48px, 4vw, 72px); }
.mark {
  font-weight: 900;
  font-stretch: 150%;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.82;
  white-space: nowrap;
  color: var(--lime);
  font-size: var(--s-head);
}
.legal {
  margin-top: clamp(28px, 2.6vw, 44px);
  font-size: var(--s-small);
  line-height: 1.55;
  color: var(--muted);
  max-width: 64ch;
}
.legal a { color: var(--link); }

/* ---------- motion: pop-in on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .rv {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
    transition-delay: var(--d, 0ms);
  }
  .js .rv.pop { transition-timing-function: var(--ease), var(--ease-pop); }
  .js .rv.in { opacity: 1; transform: none; }
  /* buttons keep their own hover transform once in */
  .js .btn.rv.in { transition: opacity 600ms var(--ease), transform 220ms var(--ease-pop), background-color 160ms linear, color 160ms linear; transition-delay: 0ms; }

  /* signature: the headline rises line by line from behind its baseline */
  .js .lines [data-line] {
    transform: translateY(105%);
    animation: line-up 900ms var(--ease) forwards;
    animation-delay: calc(var(--i) * 110ms + 150ms);
  }
}
@keyframes line-up { to { transform: none; } }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .m-a, .m-f { grid-column: 1 / 13; min-height: 0; }
  .m-b, .m-d { grid-column: 1 / 7; }
  .m-c, .m-e { grid-column: 7 / 13; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tag" "h1" "intro" "act" "card"; grid-template-rows: none; }
  .card { margin-top: var(--head-gap); align-self: start; max-width: 560px; }
  .points { grid-column: 1 / 13; }
  .why-main > .rv { grid-column: 1 / 13; margin-bottom: 48px; padding-right: 0; }
  .statement { max-width: 36ch; }
  .steps-intro > .label, .steps-intro > .h2, .steps-intro > .rv:last-child { grid-column: 1 / 13; grid-row: auto; padding-left: 0; max-width: 40ch; }
  .steps-intro .label { margin-bottom: 16px; }
  .details-col { grid-column: 1 / 13; }
  .ready { grid-column: 1 / 13; margin-top: var(--head-gap); max-width: 640px; }
}

@media (max-width: 860px) {
  .s1, .s2, .s3 { grid-column: 1 / 13; align-self: auto; }
  .s1 { grid-row: 2; min-height: clamp(150px, 24vw, 190px); }
  .s2 { grid-row: 3; min-height: clamp(190px, 30vw, 240px); }
  .s3 { grid-row: 4; min-height: clamp(230px, 36vw, 290px); }
  .steps-grid { row-gap: 10px; }
  .step p { max-width: 62ch; }
  .steps-intro { margin-bottom: 22px; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .top-in { row-gap: 12px; padding-block: 14px; }
  .logo { grid-column: 1 / 13; }
  .logo img { width: 150px; }
  .nav { grid-column: 1 / 13; gap: 4px 20px; }
  .nav-call { order: 3; flex-basis: 100%; }
  .lang { order: 2; }
  .lines { font-stretch: 78%; font-size: calc(100cqi / 10.8); }
  html[lang="es"] .lines, html:not(.js) .lines { font-size: calc(100cqi / 11.35); }
  .act .btn { width: 100%; }
  .m-b, .m-c, .m-d, .m-e { grid-column: 1 / 13; }
  .h2 { font-stretch: 84%; }
  .foot-cols > div, .foot-links { grid-column: 1 / 13; }
  .tile { min-height: 0; }
  .points { grid-template-columns: 1fr; }
  .close-h { font-stretch: 84%; }
  .mark { font-size: 1.75rem; }
  .close-low .btn { width: 100%; }
  .foot-links { flex-direction: column; gap: 4px; justify-content: flex-start; }
}
