/* Patients First Dentures & Implants — template 1, "the dark room".
   One black field; the exhibits and the single action are the only light in it. */

:root {
  /* colour roles, all from the brand */
  --bg: #000000;
  --surface: #07090c;      /* near-black: wall labels, the announcement strip */
  --surface-lit: #10161d;  /* one tone step up: the hours row that is true right now */
  --field: #11161c;        /* alternate section field, so each section reads as its own block */
  --ink: #eef2f6;
  --muted: #a9b4c0;
  --accent: #7bd62b;       /* lime: the action, and the lamp when the door is open */
  --on-accent: #07090c;
  --blue: #2a9df4;         /* accent blue: the lamp when the door is shut */
  --link: #62b8ff;

  /* type: Work Sans, five steps */
  --font: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(1.875rem, 1.2rem + 2.6vw, 3.5rem);
  --step-display: clamp(1.75rem, 0.4rem + 5.4vw, 4.75rem);

  /* frame */
  --m: clamp(16px, 2.2vw, 32px);
  --gap: clamp(16px, 1.7vw, 24px);
  --section: clamp(120px, 13vw, 200px);

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 0, 0.2, 1);
  --t-press: 120ms;
  --t-hover: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

/* content is capped at 1600px and centred; backgrounds and full-bleed photographs still run edge to edge */
.wrap { padding-inline: max(var(--m), calc((100% - 1600px) / 2)); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- language: one at a time with script, both without ---------- */
.js[data-show="en"] body [lang="es"],
.js[data-show="es"] body [lang="en"] { display: none !important; }
html:not(.js) h1 > [lang], html:not(.js) h2 > [lang], html:not(.js) h3 > [lang],
html:not(.js) p > [lang] { display: block; }
html:not(.js) p > [lang="es"], html:not(.js) h1 > [lang="es"] { margin-top: 0.4em; }
html:not(.js) .nav [lang="es"], html:not(.js) .btn [lang="es"] { margin-left: 0.35em; }
html:not(.js) .lang-switch { display: none; }

/* ---------- type roles ---------- */
.display {
  font-size: var(--step-display);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.0;
  text-wrap: balance;
}
.head {
  font-size: var(--step-head);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}
.lead-title { font-size: var(--step-lead); font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; }
.sec-label { margin-top: 18px; font-size: var(--step-body); color: var(--muted); }
/* the Spanish half of a line written in both languages, set quieter */
.quiet { color: var(--muted); opacity: 0.72; }
html:not(.js) [lang="es"] { color: var(--muted); font-size: 0.9em; }
.sec-intro { margin-top: 28px; font-size: var(--step-lead); line-height: 1.38; max-width: 30ch; letter-spacing: -0.01em; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  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;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink); }
}

/* ---------- announcement and bar ---------- */
.announce { background: var(--surface); }
.announce p { padding-block: 10px; font-size: var(--step-small); color: var(--ink); }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 14px;
}
.brand { display: block; flex: none; }
.brand img { height: clamp(52px, 5vw, 72px); width: auto; }
.nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px 28px; margin-left: auto; font-size: var(--step-body); }
.nav .link { padding-block: 6px; }
.lang-switch { display: flex; gap: 2px; }
.lang-switch button {
  font: inherit;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 0.08em;
  transition: color var(--t-hover) ease, text-decoration-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.lang-switch button[aria-pressed="true"] { color: var(--ink); text-decoration-color: var(--ink); }
.lang-switch button:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .lang-switch button:hover { color: var(--ink); }
}

/* ---------- hero: South Florida at dusk behind a left-to-right scrim; copy left, call card right ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -2; background: var(--bg); }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 55%; }
/* the scrim: dark where the text sits, opening up to the lights on the right */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.78) 42%, rgba(0, 0, 0, 0.25) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 35%);
}
.hero-band { padding-top: clamp(48px, 6vw, 112px); padding-bottom: clamp(56px, 6.5vw, 120px); row-gap: 40px; align-items: center; }
.hero-copy, .wall-label { grid-column: 1 / -1; }
.hero-line { font-size: var(--step-body); color: var(--muted); }
.hero h1 { margin-top: 16px; max-width: 14em; font-weight: 400; transform-origin: 0 100%; }
.hero h1 :lang(es) { font-size: 0.92em; }
.hero-sub { margin-top: 28px; max-width: 46ch; }
.hero-copy .btn { margin-top: 32px; }

@media (min-width: 1101px) {
  .hero-copy { grid-column: 1 / 9; }
  .hero h1 { font-size: 4.6vw; }
  .hero-sub { font-size: var(--step-lead); line-height: 1.42; max-width: 34ch; letter-spacing: -0.01em; }
  .wall-label { grid-column: 9 / 13; }
  .wall-label .facts { grid-template-columns: 1fr; }
}
@media (min-width: 1601px) {
  .hero-copy { grid-column: 1 / 8; }
  .hero h1 { font-size: 3.75rem; }
  .wall-label { grid-column: 8 / 13; }
}
.hero-bg img { transition: filter 1600ms var(--ease-soft); }
/* the live room: the lights are up while the clinic is open, lower while it is shut */
[data-room="open"] .hero-bg img { filter: brightness(1.05) saturate(1.05); }
[data-room="shut"] .hero-bg img { filter: brightness(0.9) saturate(0.95); }

/* cards: rounded, a thin light border, a near-black ground */
.wall-label, .visit-card {
  background: rgba(17, 22, 28, 0.9);
  border: 1px solid rgba(238, 242, 246, 0.12);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.wall-label { padding: 24px 28px 16px; }
[data-lamp] { border-radius: 10px; }
.facts { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.facts .fact-hours { grid-column: 1 / -1; }
.facts li { padding-block: 9px; }
.facts .phone { font-size: var(--step-lead); text-decoration: none; letter-spacing: -0.01em; }
.facts .phone, .visit-facts .phone { transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .facts .phone:hover, .visit-facts .phone:hover { color: var(--accent); }
}

/* lamp: the hours row that is true right now, in Miami Lakes time */
[data-lamp] { display: flex; align-items: center; gap: 12px; transition: background-color 600ms ease, color 600ms ease; }
.lamp {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2a323b;
  transition: background-color 600ms ease, transform 600ms var(--ease-out);
}
.fact-hours { margin-inline: -12px; padding-inline: 12px !important; }
[data-lamp].is-open, [data-lamp].is-shut { background: var(--surface-lit); }
[data-lamp].is-open .lamp { background: var(--accent); }
[data-lamp].is-shut .lamp { background: var(--blue); }

/* ---------- services: header row across the width, then a 3 x 2 grid ---------- */
/* sections in order, each its own block: black / field / black / field, then the photographs */
.services { padding-block: var(--section); background: var(--field); }
.services-head { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.services-head .head, .services-head .sec-label { grid-column: 1 / 8; }
.services-head .head { max-width: 15em; }
.services-head .sec-intro { grid-column: 8 / 13; grid-row: 1 / 3; margin-top: 0.35em; max-width: 34ch; }
.svc {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(48px, 4.5vw, 72px) clamp(32px, 4vw, 64px);
  margin-top: clamp(64px, 6vw, 96px);
  align-items: start;
}
/* one style for every small title: lead size, regular weight */
.svc h3, .step h3, .why-item h3 { font-size: var(--step-lead); font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; }
.svc p, .step p, .why-item p { margin-top: 12px; max-width: 38ch; }
/* a lime side-line on each service and each promise */
.svc > li, .why-list > li { border-left: 3px solid var(--accent); padding-left: 22px; }

/* a soft lime glow behind each section's heading area: atmosphere, not a shape */
.services, .how, .why, .cta { position: relative; isolation: isolate; }
.services-head, .how-head, .why-head, .cta-copy { position: relative; }
.services-head::before, .how-head::before, .why-head::before, .cta-copy::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: -12%; top: -45%; width: min(820px, 90vw); height: 520px;
  background: radial-gradient(closest-side, rgba(123, 214, 43, 0.15), rgba(123, 214, 43, 0.05) 55%, rgba(123, 214, 43, 0) 100%);
}
.why-head::before { background: radial-gradient(closest-side, rgba(123, 214, 43, 0.13), rgba(42, 157, 244, 0.05) 60%, rgba(42, 157, 244, 0) 100%); }

/* exhibits: square corners, black around them, lit from within */
.exhibit { overflow: hidden; background: var(--surface); }
.exhibit img { width: 100%; height: 100%; object-fit: cover; }
/* one treatment for every picture: black and white, like the exhibits on black.
   Colour on the page belongs to the logo, the action and the lamp only. */
.exhibit img { filter: grayscale(1) contrast(1.06) brightness(0.92); transition: filter 500ms ease; }
@media (hover: hover) and (pointer: fine) {
  .exhibit:hover img { filter: grayscale(1) contrast(1.06) brightness(1.08); }
}

/* ---------- how it works: heading and one exhibit, then three equal columns ---------- */
.how { padding-block: var(--section); }
.how-head { grid-column: 1 / 7; align-self: end; }
.how-head .sec-intro { max-width: 32ch; }
.how-exhibit { grid-column: 7 / 13; aspect-ratio: 16 / 9; }
.steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px var(--gap);
  margin-top: 96px;
  align-items: start;
}

/* ---------- why: heading, then four equal columns of text ---------- */
.why { padding-block: var(--section); background: var(--field); }
.why-head { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.why-head .head, .why-head .sec-label { grid-column: 1 / 8; }
.why-head .sec-intro { grid-column: 8 / 13; grid-row: 1 / 3; align-self: end; margin-top: 0; max-width: 34ch; }
.why-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px var(--gap);
  margin-top: 96px;
  align-items: start;
}
.why-item img[src*="town-hall"] { object-position: 66% 50%; }

/* ---------- contact: the visit card on Miami Lakes ---------- */
.contact { position: relative; display: flex; }
.contact-photo { position: absolute; inset: 0; overflow: hidden; background: var(--surface); }
.contact-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; filter: grayscale(1) contrast(1.05) brightness(0.5); }
.contact-inner { position: relative; flex: 1; display: flex; justify-content: flex-end; align-items: flex-start; padding-block: clamp(64px, 7vw, 112px); }
.visit-card { width: min(460px, 100%); padding: 32px; }
.visit-facts { margin-top: 24px; display: grid; gap: 16px; }
.visit-facts dt { font-size: var(--step-small); color: var(--muted); }
.visit-facts dd { margin-top: 2px; }
.visit-facts .phone { font-size: var(--step-lead); text-decoration: none; letter-spacing: -0.01em; }
.hours { margin-top: 28px; }
.hours-title { font-size: var(--step-small); font-weight: 400; color: var(--muted); }
.hours-row { margin: 6px -12px 0; padding: 10px 12px; font-variant-numeric: tabular-nums; }
.hours-row .day { flex: 1; }
.hours-row .time { text-align: right; }
.note { margin-top: 14px; font-style: italic; color: var(--muted); font-size: var(--step-small); line-height: 1.5; }
.ready { margin-top: 32px; }
.ready-title { font-size: var(--step-lead); font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; }
.ready p { margin-top: 10px; }
.btn-wide { display: flex; width: 100%; margin-top: 24px; min-height: 56px; }

/* ---------- the plain closing sentence ---------- */
.cta { padding-block: var(--section); align-items: center; row-gap: 48px; }
.cta-copy { grid-column: 1 / 8; }
.cta-title { max-width: 13em; }
.cta p { margin-top: 24px; max-width: 34ch; font-size: var(--step-lead); line-height: 1.38; }
.cta .btn { margin-top: 32px; }
.cta-exhibit { grid-column: 8 / 13; aspect-ratio: 4 / 3; }
.cta-exhibit img { object-position: 82% 50%; }

/* ---------- footer: the name across the last photograph ---------- */
.foot-stage { position: relative; overflow: hidden; }
.foot-photo { position: absolute; inset: 0; background: var(--surface); }
.foot-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; filter: grayscale(1) contrast(1.05) brightness(0.45); }
.foot-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-top: clamp(40px, 5vw, 72px); }
.foot-mark { margin-top: clamp(64px, 8vw, 128px); }
.foot-links { display: grid; gap: 6px; }
.foot-contact { text-align: right; }
.foot-mark { position: relative; padding-bottom: 48px; }
.foot-name { font-size: inherit; font-weight: 400; line-height: 0; }
.foot-mark img { width: min(760px, 100%); mix-blend-mode: screen; transform-origin: 0 100%; }
.legal { margin-top: 12px; font-size: var(--step-small); }
.foot-fine { padding-block: 48px 56px; row-gap: 24px; }
.sms { grid-column: 1 / 7; font-size: var(--step-small); line-height: 1.6; max-width: 70ch; color: var(--muted); }
.credits { grid-column: 8 / 13; font-size: var(--step-small); line-height: 1.6; color: var(--muted); }
.credits a { color: var(--ink); text-underline-offset: 0.18em; }

/* ---------- motion ---------- */
/* one entrance for the whole page: each part pops into place as it enters the screen.
   script.js marks the parts with [data-pop] and a sibling index --i; nothing is hidden without .js */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-bg img { animation: settle 1800ms var(--ease-soft) both; }
  @keyframes settle { from { transform: scale(1.07); } to { transform: none; } }

  .js [data-pop] {
    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 .btn[data-pop], .js .lang-switch[data-pop] { transition-timing-function: var(--ease-out), cubic-bezier(0.34, 1.56, 0.64, 1); }
  .js [data-pop].is-in { opacity: 1; transform: none; }
  .js .btn[data-pop].is-in:active { transform: scale(0.97); transition-delay: 0ms; }
}

/* signature: the title is heavy — it gives a few percent as the first screen leaves;
   the name in the footer grows into place as the last photograph arrives */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero h1 > [lang] { display: block; animation: recede linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; transform-origin: 0 100%; }
    @keyframes recede { to { transform: scale(0.93); opacity: 0.55; } }
    .foot-mark img { animation: arrive linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    @keyframes arrive { from { transform: scale(0.94); } to { transform: none; } }
    .contact-photo img, .foot-photo img { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    @keyframes drift { from { transform: scale(1.08) translateY(-3%); } to { transform: scale(1.08) translateY(3%); } }
  }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .hero-band { align-items: start; }
  .services-head { display: block; }
  .services-head .sec-intro { margin-top: 28px; }
  .svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-head { grid-column: 1 / -1; }
  .why-head { display: block; }
  .why-head .sec-intro { margin-top: 28px; }
  .how-exhibit { grid-column: 1 / -1; margin-top: 56px; }
  .steps { margin-top: 64px; }
  .why-list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 64px; }
  .cta-copy { grid-column: 1 / 13; }
  .cta-exhibit { grid-column: 1 / 13; aspect-ratio: 16 / 9; }
  .sms { grid-column: 1 / 13; }
  .credits { grid-column: 1 / 13; }
}

/* ---------- phone: its own composition ---------- */
@media (max-width: 700px) {
  .bar { flex-wrap: wrap; gap: 4px 12px; padding-block: 12px 4px; }
  .lang-switch { order: 2; margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 0 20px; margin-left: 0; }
  .hero h1 { max-width: none; }
  .wall-label { padding: 24px 20px 14px; }
  .facts { display: block; }

  .services-head .head { max-width: none; }
  .svc { grid-template-columns: 1fr; gap: 40px; margin-top: 56px; }

  .steps { grid-template-columns: 1fr; gap: 48px; margin-top: 48px; }
  .why-list { grid-template-columns: 1fr; gap: 40px; margin-top: 48px; }
  .how-exhibit { margin-top: 40px; aspect-ratio: 4 / 3; }

  .contact { display: block; }
  .contact-photo { position: relative; height: 56svh; }
  .contact-inner { display: block; padding-block: 0 0; margin-top: -80px; }
  .visit-card { width: 100%; padding: 24px 20px; }

  .cta-exhibit { aspect-ratio: 4 / 3; }

  .foot-top { flex-direction: column; }
  .foot-contact { text-align: left; }
}
