/* Patients First Dentures & Implants — template 2, "Colour chapters"
   Every section is one flat field from the brand's own colours: black, lime and tone steps of the black.
   Blue is kept for small accents only (links, focus). Content is capped at 1600px; fields run edge to edge. */

:root {
  /* brand palette (kept) */
  --black: #000000;
  --night: #07090C;
  --lime: #7BD62B;
  --blue: #2A9DF4;
  --link-blue: #62B8FF;
  --ink: #EEF2F6;
  --muted: #A9B4C0;
  /* tone steps of the black ground, used as fields */
  --panel: #11161C;     /* black, one step up */
  --panel-2: #1A2129;   /* black, two steps up */
  --pale: #EEF2F6;      /* the ink colour used as a light field */

  --font: "Jost", system-ui, sans-serif;

  /* type scale */
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.1875rem, 1.05rem + 0.6vw, 1.625rem);
  --step-head: clamp(1.875rem, 1rem + 2.2vw, 3.25rem);   /* h2: about 52px at 1920, the largest size below the hero */
  --step-display: clamp(2.1rem, 0.4rem + 7.1vw, 7.6rem);

  --max: 1600px;                        /* content width cap */
  --m: clamp(1rem, 2.8vw, 2.5rem);      /* page margin */
  --px: max(var(--m), calc((100% - var(--max)) / 2));  /* side padding: margin, or centring past the cap */
  --g: clamp(1rem, 2vw, 2rem);          /* column gap */
  --section: clamp(6rem, 11vw, 11rem);  /* space at the top and bottom of a chapter */
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--black); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 1rem; }
::selection { background: var(--lime); color: var(--night); }
:focus-visible { outline: 3px solid var(--link-blue); outline-offset: 3px; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; }
p { max-width: 62ch; text-wrap: pretty; }

/* ---------- language: one at a time with script, both without ---------- */
html[data-show="en"] [data-lang="es"],
html[data-show="es"] [data-lang="en"],
html[data-show] .sep { display: none !important; }

/* ---------- shared ---------- */
.wrap { padding-inline: var(--px); }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); }
.ch { position: relative; }
.ch-black { --field: var(--black); background: var(--black); color: var(--ink); }
.ch-lime  { --field: var(--lime);  background: var(--lime);  color: var(--night); }
.ch-panel { --field: var(--panel); background: var(--panel); color: var(--ink); }
.ch-pale  { --field: var(--pale);  background: var(--pale);  color: var(--night); }

/* soft seams: each chapter's colour blends up into the previous chapter's bottom padding (no text sits there) */
.services::before, .how::before, .why::before, .cta::before, .foot::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: clamp(80px, 6vw, 120px);
  background: linear-gradient(to bottom, transparent, var(--field)); pointer-events: none; /* taste-skill-ignore: seams requested by the user */
}

.head { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.03em; }
.lead { font-size: var(--step-lead); line-height: 1.38; font-weight: 400; max-width: 34ch; }
.chapter-line { font-size: var(--step-lead); font-weight: 400; line-height: 1.3; margin-top: 1.1rem; }
/* Spanish runs about 10% longer: its headings take one smaller step of the same scale */
.head [data-lang="es"] { font-size: 0.9em; }

/* every photograph gets one treatment: black and white, so no picture fights the black / lime palette */
.strip img, .why-fig img, .tile-photo img { filter: grayscale(1) contrast(1.06); }

.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: currentColor; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; min-height: 3.25rem; padding: 0 1.75rem; border-radius: 999px; font-weight: 700; font-size: var(--step-body); text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.btn:active { transform: scale(0.97); }
.btn-lime { background: var(--lime); color: var(--night); }
.btn-dark { background: var(--night); color: var(--ink); }
.btn-sm { min-height: 2.75rem; padding: 0 1.1rem; }
@media (hover: hover) and (pointer: fine) {
  .btn-lime:hover { background: var(--ink); color: var(--night); }
  .btn-dark:hover { background: var(--black); color: var(--lime); }
}

/* =========================================================
   Chapter 1 · hero (black) — natural height, content directly under the headline
   ========================================================= */
/* background photo: greyscale palms multiplied into a deep lime tone, under a dark scrim and a soft lime / blue glow */
.hero { isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #4f9a1c; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 60%; filter: grayscale(1) contrast(1.15); mix-blend-mode: multiply; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, 0.7) 100%), /* taste-skill-ignore: scrim */
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.66) 45%, rgba(0, 0, 0, 0.36) 100%), /* taste-skill-ignore: scrim */
    radial-gradient(55% 65% at 82% 22%, rgba(123, 214, 43, 0.22), transparent 70%), /* taste-skill-ignore: glow requested by the user */
    radial-gradient(45% 55% at 96% 92%, rgba(42, 157, 244, 0.18), transparent 70%); /* taste-skill-ignore: glow requested by the user */
}
.announce { max-width: none; background: rgba(17, 22, 28, 0.78); color: var(--ink); padding: 0.6rem var(--px); font-weight: 400; font-size: var(--step-body); line-height: 1.35; }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1rem; }
.nav-logo { display: block; flex: none; }
.nav-logo img { height: clamp(52px, 5.4vw, 76px); width: auto; mix-blend-mode: screen; }   /* the logo's black ground drops out over the photo */
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); font-weight: 400; }
.nav-links a.link { white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .nav-links a.link:hover { color: var(--lime); } }

.lang { display: inline-flex; background: var(--panel-2); }
.lang button { min-width: 3rem; min-height: 2.75rem; padding: 0 0.7rem; font-weight: 700; color: var(--ink); transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--night); }
.lang button:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .lang button[aria-pressed="false"]:hover { color: var(--lime); } }
html:not(.js) .lang { display: none; }

.hero-body { padding-top: clamp(1.5rem, min(5vw, 6vh), 5rem); padding-bottom: var(--section); }   /* height-aware so the first screen fits 1366×768 */
.hero-title { font-size: var(--step-display); line-height: 0.94; letter-spacing: -0.035em; font-weight: 700; }
.ht { display: block; }
.ht-es { font-size: 0.89em; }
@media (min-width: 1700px) { .ht-es { font-size: 0.96em; } }  /* past the 1600px cap the Spanish line has room */
.line-lime { color: var(--lime); }
.hero-sub { margin-top: clamp(1rem, min(2vw, 2.4vh), 2rem); font-size: var(--step-lead); font-weight: 400; max-width: none; }

.hero-lower { margin-top: clamp(1.75rem, min(4.5vw, 5vh), 4.5rem); align-items: start; }
.hero-pitch { grid-column: 1 / 8; grid-row: 1; }
.hero-pitch .lead { max-width: 40ch; margin-bottom: 1.6rem; }
.call-card { grid-column: 9 / 13; grid-row: 1; }
.cc-h { font-size: var(--step-lead); font-weight: 700; color: var(--lime); line-height: 1.2; }
.cc-phone { display: inline-block; margin-top: 0.4rem; font-size: var(--step-lead); font-weight: 700; text-decoration-color: currentColor; }
.cc-list { margin-top: 0.75rem; display: grid; gap: 0.2rem; }

/* masked headline */
.lines .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.lines [data-line] { display: block; }

/* =========================================================
   Chapter 2 · services (lime) — one header row, then the six services in a 3 × 2 grid
   ========================================================= */
/* the header row uses the same three columns as the grid below, so the intro lines up with the third column */
.svc-intro { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(2rem, 3.4vw, 4rem); align-items: start; padding-top: var(--section); padding-bottom: clamp(3rem, 5vw, 4.5rem); }
.svc-intro .head { grid-column: 1 / 3; max-width: 22ch; }
.svc-intro-side { grid-column: 3 / 4; padding-top: 0.35rem; }

.svc-body { padding-bottom: var(--section); }
.svc-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(2rem, 3.4vw, 4rem); row-gap: clamp(3rem, 4.2vw, 4.5rem); }
/* each service is one block: a near-black side line down its full height (lime on dark chapters) */
.svc { border-left: 3px solid var(--night); padding-left: 1.25rem; }
.ch-black .svc, .ch-panel .svc { border-left-color: var(--lime); }
.svc-h { font-size: clamp(1.25rem, 1.05rem + 0.4vw, 1.5rem); font-weight: 700; color: var(--black); line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 0.6rem; }
.svc p { max-width: 36ch; font-size: clamp(1.0625rem, 1rem + 0.1vw, 1.125rem); }

/* slim picture strips (how it works, contact) */
.strip { margin-top: clamp(3rem, 5vw, 4.5rem); }
.strip img { width: 100%; aspect-ratio: 4 / 1; object-fit: cover; border-radius: 16px; }

/* =========================================================
   Chapter 3 · how it works (black) — three posters, all open
   ========================================================= */
.how { padding-block: var(--section); }
.how-intro { align-items: end; }
.how-intro-a { grid-column: 1 / 9; }
.how-intro-a .chapter-line { color: var(--lime); }
.how-intro-b { grid-column: 9 / 13; }
.how-intro-b .lead { max-width: 30ch; }

.steps { margin-top: clamp(2.5rem, 4vw, 4rem); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { padding: clamp(2rem, 3.2vw, 3.25rem); display: flex; flex-direction: column; gap: 1rem; border-radius: 16px; border: 1px solid rgba(238, 242, 246, 0.09); } /* taste-skill-ignore: thin card border requested by the user */
.st-1 { background: var(--panel); color: var(--ink); }
.st-2 { background: var(--lime); color: var(--night); border-color: transparent; }
.st-3 { background: var(--panel-2); color: var(--ink); }
.step-n { font-size: 4rem; font-weight: 700; line-height: 0.9; letter-spacing: -0.04em; color: var(--lime); margin-bottom: 0.5rem; }
.st-2 .step-n { color: var(--night); }
.step-h { font-size: var(--step-lead); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.step p { max-width: 34ch; }

/* =========================================================
   Chapter 4 · why (lime rim, black inset panel, tooth-shaped picture)
   ========================================================= */
.why { padding: 20px; }
.why-panel { position: relative; background: var(--night); color: var(--ink); overflow: hidden; padding-top: clamp(3rem, 6vw, 6rem); padding-inline: max(clamp(1.5rem, 4vw, 3.5rem), calc((100% - var(--max)) / 2)); }
.why-left { grid-column: 1 / 9; grid-row: 1; }
.why-left .head { max-width: 17ch; }
.why-left .lead { margin-top: 1.5rem; }
.why-left .chapter-line { color: var(--lime); }
.why-fig { grid-column: 1 / 9; grid-row: 2; align-self: end; width: min(34vw, 32rem); aspect-ratio: 1 / 1.02; margin-top: clamp(2.5rem, 4vw, 4rem); margin-bottom: -7%; clip-path: url(#tooth); }
.why-fig img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.why-right { grid-column: 9 / 13; grid-row: 1 / 3; padding-bottom: clamp(3rem, 6vw, 6rem); }
.why-list { display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 2.5rem; }
.why-list li { border-left: 3px solid var(--lime); padding-left: 1.25rem; }
.why-h3 { font-size: var(--step-lead); font-weight: 700; line-height: 1.2; margin-bottom: 0.45rem; }
.why-list p { max-width: 40ch; }

/* =========================================================
   Chapter 5 · contact (one dark field: details on the left, one call card on the right)
   ========================================================= */
.contact { padding-block: var(--section); }
.contact-head { padding-bottom: clamp(2.5rem, 4vw, 3.5rem); }
.contact-body { align-items: start; row-gap: 3rem; }
.details { grid-column: 1 / 8; display: grid; gap: clamp(1.5rem, 2.2vw, 2rem); }
.row { display: grid; grid-template-columns: 9rem minmax(0, 1fr); column-gap: var(--g); align-items: baseline; }
.row-k { font-size: 1rem; line-height: 1.3; }
.row-v { font-size: var(--step-lead); line-height: 1.35; max-width: none; }
.row-v p { max-width: none; }
.row-v a.link { text-decoration-color: currentColor; text-decoration-thickness: 0.06em; }
.nobr { white-space: nowrap; }
.row-x { margin-top: 0.35rem; font-size: 1rem; }
.dir-link { font-weight: 700; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .dir-link:hover { color: var(--lime); } }
.row-day.is-today { color: var(--lime); font-weight: 700; }   /* today's hours: lime text, nothing more */
.row-n { padding-left: calc(9rem + var(--g)); font-size: 1rem; max-width: none; }
.ready-card { grid-column: 9 / 13; background: var(--lime); color: var(--night); border-radius: 16px; padding: clamp(1.75rem, 3vw, 2.75rem); display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.ready-h { font-size: var(--step-lead); font-weight: 700; line-height: 1.2; }
.ready-card .btn { margin-top: 0.5rem; }

/* =========================================================
   Chapter 6 · CTA (pale, the action tile beside a picture)
   ========================================================= */
.cta { padding-block: var(--section); }
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 12px; }
.tile { overflow: clip; border-radius: 16px; }
.tile-main { grid-column: 1 / 9; background: var(--lime); color: var(--night); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.4rem; padding: clamp(2rem, 4vw, 4rem); min-height: clamp(20rem, 26vw, 28rem); }
.tile-main .head { max-width: 20ch; }
.tile-main .lead { max-width: 34ch; }
.tile-photo { grid-column: 9 / 13; position: relative; }
.tile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; }

/* =========================================================
   Chapter 7 · footer (black, the number as the headline)
   ========================================================= */
.foot { padding-top: var(--section); padding-bottom: clamp(2.5rem, 4vw, 4rem); }
.foot-top { row-gap: clamp(2.5rem, 5vw, 5rem); align-items: end; }
.foot-notes { grid-column: 1 / 13; display: grid; gap: 0.35rem; align-content: start; }
.foot-logo { width: 160px; height: auto; margin-bottom: 1rem; }
.foot-phone-wrap { grid-column: 1 / 13; max-width: none; }
.foot-phone { display: inline-block; font-size: var(--step-head); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; color: var(--lime); text-decoration: none; white-space: nowrap; transition: color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.foot-phone:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { .foot-phone:hover { color: var(--ink); } }
.foot-meta { row-gap: 1.5rem; margin-top: clamp(3rem, 5vw, 5rem); align-items: start; }
.foot-links { grid-column: 1 / 8; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.foot-links .link { text-decoration-color: currentColor; }
/* legal text and picture credits: small print, still full ink */
.foot-small { grid-column: 9 / 13; font-size: 0.875rem; line-height: 1.55; color: var(--ink); }
.foot-small p { max-width: 70ch; }
.foot-small p + p { margin-top: 0.9rem; }
.credits a { color: var(--link-blue); text-underline-offset: 0.15em; }

/* =========================================================
   Tablet
   ========================================================= */
@media (max-width: 1100px) {
  .nav-hide-m { display: none; }
  .hero-pitch { grid-column: 1 / 7; }
  .call-card { grid-column: 7 / 13; }
  .how-intro-b, .why-right, .foot-small { grid-column: 7 / 13; }
  .how-intro-a, .why-left, .why-fig, .foot-links { grid-column: 1 / 7; }
  .details { grid-column: 1 / 8; }
  .ready-card { grid-column: 8 / 13; }
  .tile-main { grid-column: 1 / 8; }
  .tile-photo { grid-column: 8 / 13; }
}

@media (max-width: 860px) {
  .nav-hide-s { display: none; }
  .svc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* tablet: 2 × 3 */
  .svc-intro .head, .svc-intro-side, .how-intro-a, .how-intro-b { grid-column: 1 / -1; }
  .svc-intro-side, .how-intro-b { margin-top: 1.5rem; }
  .steps { grid-template-columns: 1fr; }
  .step { display: grid; grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.4fr); column-gap: var(--g); align-items: start; }
  .step-n { grid-column: 1; grid-row: 1 / span 3; margin: 0; }
  .step-h { grid-column: 2; grid-row: 1 / span 3; }
  .step p { grid-column: 3; }
  .tile-main, .tile-photo { grid-column: 1 / 13; }
  .tiles { row-gap: 10px; }
  .tile-main { min-height: 0; }
  .tile-photo { aspect-ratio: 16 / 9; }
  .why { padding: 10px; }
  .why-panel { display: flex; flex-direction: column; padding: 2rem 1.25rem 0; }
  .why-right { padding-bottom: 0; margin-top: 2.5rem; }
  .why-fig { order: 3; width: min(86vw, 26rem); align-self: center; margin-top: 3rem; margin-bottom: -18%; }
  .foot-links, .foot-small { grid-column: 1 / 13; }
  .details, .ready-card { grid-column: 1 / 13; }   /* phone and tablet: heading, details, then the card */
}

@media (max-width: 640px) {
  .hero-lower { display: flex; flex-direction: column; align-items: stretch; gap: 2.5rem; }
  .svc-list { grid-template-columns: 1fr; }   /* phone: one column */
  .strip img { aspect-ratio: 5 / 2; }
  .row { grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: 0.75rem; }
  .row-n { padding-left: calc(6.5rem + 0.75rem); }
  .step { display: flex; }
}

@media (max-width: 520px) {
  .hero-title { font-size: 7.55vw; }
  .ht-es { font-size: 0.875em; }
  .nav { gap: 0.75rem; }
  .btn { white-space: normal; text-align: center; min-height: 3.25rem; padding-block: 0.6rem; }
  .hero-pitch .btn, .tile-main .btn, .why-right .btn { width: 100%; }
  .tile-main { padding: 1.75rem 1.25rem; }
}

/* =========================================================
   Motion (transform and opacity only; hidden states only with script and motion allowed)
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-expo) forwards; animation-delay: calc(var(--i) * 110ms + 150ms); }
  /* pop-in: every component rises, grows and fades into place once as it enters the screen; siblings 75ms apart */
  .js [data-reveal] { opacity: 0; transform: translateY(24px) scale(0.96); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: calc(var(--i, 0) * 75ms); }
  .js [data-reveal="pop"] { transition-timing-function: var(--ease-out), cubic-bezier(0.34, 1.56, 0.64, 1); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .drift { animation: drift 22s var(--ease-soft) infinite alternate; transform-origin: 40% 60%; }
  .why-fig img { animation: drift 26s var(--ease-soft) infinite alternate; }
}
@keyframes line-up { to { transform: none; } }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.1) translate(-1.5%, 1%); } }
