/* Dioptre - independent optician HTML template
   All colours, fonts and sizes are tokens in :root; change them there. */

:root {
  --bg: #f3f1ec;          /* porcelain */
  --bg-2: #e9e6df;        /* a step darker, for panels */
  --ink: #16181b;
  --grey: #6b6e72;
  --line: #d9d6ce;
  --accent: #7a2630;      /* oxblood */
  --on-accent: #f7f3ee;
  --radius: 0;
  --serif: "Zodiak", Georgia, serif;
  --sans: "Supreme", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --pad: clamp(20px, 4vw, 56px);
  --max: 1440px;
  --header: 76px;
  --soft: blur(14px) saturate(.6) brightness(1.04);   /* how a photo looks "without glasses" */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 12px; }

.label {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--grey);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
h2 { font-size: clamp(34px, 4.4vw, 64px); line-height: 1.04; }
h3 { font-size: 24px; line-height: 1.2; }
em { font-style: italic; }
.lead { font-size: clamp(18px, 1.4vw, 21px); line-height: 1.55; max-width: 36ch; }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--ink); color: var(--bg);
  border-radius: var(--radius);
  font: 500 15px/1 var(--sans); text-decoration: none;
  transition: background .3s var(--ease);
}
.btn:hover { background: var(--accent); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: 14px; }
.link {
  font: 500 15px/1.4 var(--sans); text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size .4s var(--ease), color .3s;
}
.link:hover { color: var(--accent); background-size: 0 1px; background-position: 100% 100%; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }

/* ---------- header and menu ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  height: var(--header); padding-inline: var(--pad);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.header.scrolled { border-bottom-color: var(--line); }
.logo { display: inline-flex; align-items: center; gap: 8px; font: 400 26px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; }
/* the mark: a lens with its optical centre */
.logo-mark { width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }
.nav-main { display: flex; gap: 28px; margin-left: auto; }
.nav-main a { font-size: 15px; text-decoration: none; color: var(--grey); transition: color .2s; }
.nav-main a:hover, .nav-main a[aria-current] { color: var(--ink); }
.menu-btn {
  display: none; margin-left: auto;
  min-height: 42px; padding: 0 18px;
  border: 1px solid var(--ink); border-radius: var(--radius); background: none; color: inherit;
  font: 500 14px/1 var(--sans); cursor: pointer;
}
.menu {
  position: fixed; inset: var(--header) 0 0; z-index: 49;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 32px var(--pad) 40px; background: var(--bg); overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { font: 400 clamp(32px, 8vw, 52px)/1.25 var(--serif); text-decoration: none; border-bottom: 1px solid var(--line); padding: 6px 0; }
.menu nav a[aria-current] { color: var(--accent); }
.menu-foot { display: flex; flex-direction: column; gap: 6px; color: var(--grey); font-size: 15px; }
.menu-foot a { text-decoration: none; }

@media (max-width: 1080px) {
  .nav-main { display: none; }
  .header-book { margin-left: auto; }
  .menu-btn { display: inline-flex; align-items: center; margin-left: 0; }
}
@media (max-width: 560px) { .header-book { display: none; } .menu-btn { margin-left: auto; } }

/* ---------- the lens: a soft photo with a sharp band over it ----------
   .lens holds two copies of one photo. .lens-soft is the eye without glasses, .lens-sharp is clipped to the band.
   --y is where the band starts (0% top, 78% bottom), --h its height. JS sets --y for scrolled lenses. */
@property --y { syntax: "<percentage>"; inherits: true; initial-value: 34%; }
.lens { --h: 22%; position: relative; overflow: hidden; background: var(--bg-2); border-radius: var(--radius); }
.lens img { width: 100%; height: 100%; object-fit: cover; }
.lens-soft { filter: var(--soft); transform: scale(1.06); }
.lens-sharp { position: absolute; inset: 0; transform: scale(1.06); clip-path: inset(var(--y) 0 calc(100% - var(--y) - var(--h)) 0); }
.lens-edge {
  position: absolute; left: 0; right: 0; top: var(--y); height: var(--h);
  border-block: 1px solid color-mix(in srgb, #fff 80%, transparent);
  pointer-events: none;
}
.rx {
  position: absolute; right: 12px; bottom: -1px; transform: translateY(100%);
  padding: 4px 7px; background: var(--ink); color: var(--bg);
  font: 500 11px/1 var(--mono); letter-spacing: .06em; white-space: nowrap;
}
.motion [data-lens="auto"] { animation: lens-sweep 7s ease-in-out infinite alternate; }
@keyframes lens-sweep { from { --y: 6%; } to { --y: 70%; } }
html:not(.js) .lens-soft, html:not(.motion) .lens-soft { filter: none; }

/* ---------- texts clear up on scroll: main.js wraps words in .w and GSAP scrubs their blur ---------- */
.motion [data-clear] .w { display: inline-block; filter: blur(10px); opacity: .15; will-change: filter, opacity; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- hero: full screen portrait, the name across the bottom, one lens band over all of it ---------- */
:root { --mark: 25vw; --drop: calc(var(--mark) * .45); }  /* --mark: set by main.js so the name fills the width */
.hero { --y: 40%; --h: 22%; position: relative; height: 100svh; min-height: 600px; margin-top: calc(-1 * var(--header)); overflow: hidden; background: #1c1512; color: var(--bg); }
.hero-layer { position: absolute; inset: 0; }
.hero-layer img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero-soft img { filter: var(--soft) brightness(.92); transform: scale(1.06); }
.hero-sharp img { transform: scale(1.06); }
.hero-sharp { clip-path: inset(var(--y) 0 calc(100% - var(--y) - var(--h)) 0); }
.hero-mark {
  position: absolute; left: 50%; bottom: calc(var(--drop) * -1); width: max-content; transform: translateX(-50%);
  font: 400 var(--mark)/1 var(--serif); letter-spacing: -.065em; white-space: nowrap; color: var(--bg);
}
/* the part of the name that drops below the photo continues on the page in ink: same size, same place */
.hero-under { position: relative; height: calc(var(--drop) + var(--mark) * .1); overflow: hidden; pointer-events: none; }
.hero-under .hero-mark { bottom: calc(var(--mark) * .1); color: var(--ink); }
.hero-soft .hero-mark { filter: blur(12px); opacity: .85; }
.hero-band { position: absolute; left: 0; right: 0; top: var(--y); height: var(--h); border-block: 1px solid color-mix(in srgb, #fff 70%, transparent); pointer-events: none; }
/* the label sits in the middle of the band's top edge, clear of the text (left) and the button (right); narrower screens have no room for it */
.hero-band .rx { right: auto; left: 50%; bottom: auto; top: -1px; transform: translate(-50%, -100%); }
@media (max-width: 1200px) { .hero-band .rx { display: none; } }
.hero-ui { position: absolute; inset: var(--header) 0 0; display: flex; flex-direction: column; justify-content: space-between; padding: 20px var(--pad) calc(var(--mark) * .45 + 28px); pointer-events: none; }
.hero-ui a { pointer-events: auto; }
.hero-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; border-top: 1px solid color-mix(in srgb, var(--bg) 35%, transparent); padding-top: 10px; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.hero-line { font: 400 clamp(20px, 1.7vw, 26px)/1.3 var(--serif); max-width: 22ch; }
.btn-light { background: var(--bg); color: var(--ink); }
.btn-light:hover { background: var(--accent); color: var(--on-accent); }
html:not(.motion) .hero-soft img, html:not(.motion) .hero-soft .hero-mark { filter: none; }
@media (max-width: 900px) {
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-meta li:nth-child(n+3) { display: none; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
}
/* the header sits over the dark hero until the page scrolls past it */
.header.on-dark { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--bg); }
.header.on-dark .nav-main a { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.header.on-dark .nav-main a:hover { color: var(--bg); }
.header.on-dark .btn { background: var(--bg); color: var(--ink); }
.header.on-dark .btn:hover { background: var(--accent); color: var(--on-accent); }
.header.on-dark .menu-btn { border-color: currentColor; }

/* ---------- eye chart statement ---------- */
.chart { padding-block: clamp(64px, 9vw, 140px); text-align: center; }
.chart > .label { margin-bottom: 40px; }
.chart-lines { display: flex; flex-direction: column; align-items: center; gap: .5em; }
.chart-lines li { position: relative; font-family: var(--serif); line-height: 1.1; max-width: 22ch; }
.chart-lines li:nth-child(1) { font-size: clamp(44px, 7vw, 108px); }
.chart-lines li:nth-child(2) { font-size: clamp(34px, 5.2vw, 78px); max-width: 18ch; }
.chart-lines li:nth-child(3) { font-size: clamp(26px, 3.6vw, 54px); }
.chart-lines li:nth-child(4) { font-size: clamp(21px, 2.6vw, 38px); max-width: 26ch; }
.chart-lines li:nth-child(n+5) { font-size: clamp(17px, 1.6vw, 22px); font-family: var(--sans); max-width: 44ch; color: var(--grey); }
.chart-mark { display: block; font: 500 11px/1 var(--mono); letter-spacing: .08em; color: var(--accent); margin-bottom: 8px; }

/* ---------- section heads ---------- */
.sec-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 16px 48px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head p { color: var(--grey); max-width: 46ch; }
@media (max-width: 900px) { .sec-head { grid-template-columns: 1fr; justify-items: start; } }

/* ---------- services ---------- */
.services { padding-block: clamp(48px, 6vw, 96px); }
.svc-list { border-top: 1px solid var(--ink); }
.svc-list li { border-bottom: 1px solid var(--line); }
.svc {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1.3fr) 150px; gap: 8px 32px; align-items: baseline;
  padding: 26px 0; text-decoration: none;
}
.svc-n { font: 500 12px/1 var(--mono); color: var(--grey); }
.svc-name { font: 400 clamp(24px, 2.4vw, 34px)/1.15 var(--serif); transition: color .3s; }
.svc-text { color: var(--grey); font-size: 16px; }
.svc-meta { display: flex; flex-direction: column; align-items: flex-end; font: 500 13px/1.6 var(--mono); }
.svc-meta span:last-child { color: var(--grey); }
/* a round lens with the photo, opened on hover */
.svc-ph {
  position: absolute; right: 190px; top: 50%; width: 132px; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  transform: translateY(-50%) scale(0); transition: transform .5s var(--ease); pointer-events: none;
}
.svc-ph img { width: 100%; height: 100%; object-fit: cover; filter: var(--soft); transition: filter .6s .15s var(--ease); }
.svc:hover .svc-name, .svc:focus-visible .svc-name { color: var(--accent); }
.svc:hover .svc-ph { transform: translateY(-50%) scale(1); }
.svc:hover .svc-ph img { filter: none; }
@media (max-width: 1080px) { .svc-ph { display: none; } }
@media (max-width: 900px) {
  .svc { grid-template-columns: 40px 1fr; }
  .svc-text, .svc-meta { grid-column: 2; }
  .svc-meta { flex-direction: row; gap: 16px; align-items: baseline; }
}

/* ---------- frames scanner: pinned, the track slides through a vertical lens ---------- */
.scan { position: relative; padding-top: clamp(48px, 6vw, 96px); }
.scan-stage { position: sticky; top: var(--header); height: calc(100svh - var(--header)); min-height: 560px; display: flex; flex-direction: column; overflow: clip; padding-bottom: 4svh; }
.scan-head { margin-bottom: clamp(24px, 3vw, 40px); }
.scan-track { display: flex; gap: clamp(16px, 2vw, 32px); align-items: flex-end; flex: 1; min-height: 0; padding-inline: 50vw var(--pad); will-change: transform; }
.scan-item { flex: 0 0 auto; height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 12px; }
.scan-ph { height: calc(100% - 32px); max-height: 92vw; aspect-ratio: 4 / 5; flex: none; }
.scan-item:nth-child(3n+2) .scan-ph { height: calc(84% - 32px); aspect-ratio: 3 / 4; }
.scan-item:nth-child(3n) .scan-ph { height: calc(70% - 32px); aspect-ratio: 1; }
.scan-item figcaption { width: 0; min-width: 100%; }
.scan-ph .lens-sharp { clip-path: inset(0 var(--r, 100%) 0 0); }
.scan-item figcaption { display: flex; justify-content: space-between; gap: 16px; font: 500 12px/1.4 var(--mono); letter-spacing: .04em; }
.scan-item figcaption span:last-child { color: var(--grey); }
.scan-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--accent); pointer-events: none; }
.scan-line .rx { right: auto; left: 8px; top: auto; bottom: 30%; transform: none; background: var(--accent); }
/* without the pinned scroll (no JS, reduced motion): a plain row you can swipe, all photos sharp */
html:not(.motion) .scan-stage { position: static; height: auto; min-height: 0; }
html:not(.motion) .scan-track { overflow-x: auto; padding-inline: var(--pad); height: 60svh; }
html:not(.motion) .scan-line { display: none; }
html:not(.motion) .scan-ph .lens-sharp { clip-path: none; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 112px); padding-block: clamp(64px, 9vw, 140px); }
.steps-photos { position: sticky; top: calc(var(--header) + 24px); align-self: start; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); }
.steps-photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: var(--soft); transform: scale(1.06); transition: opacity .6s var(--ease), filter 1.2s .2s var(--ease); }
.steps-photos img.on { opacity: 1; filter: none; }
.steps-photos img:first-child { opacity: 1; }
.steps-text { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.step-list { width: 100%; border-top: 1px solid var(--ink); margin-top: 16px; }
.step-list li { display: grid; grid-template-columns: 56px 1fr; gap: 6px 16px; padding: 28px 0 32px; border-bottom: 1px solid var(--line); color: var(--grey); transition: color .4s; }
.step-list li.on { color: var(--ink); }
.step-list p { grid-column: 2; max-width: 44ch; }
.step-n { font: 500 12px/2.2 var(--mono); color: var(--accent); }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .steps-photos { position: relative; top: 0; aspect-ratio: 4 / 3; }
  .steps-photos img { transition-delay: 0s; }
  .step-list li { color: var(--ink); }
}

/* ---------- makers and quote ---------- */
.makers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px clamp(32px, 6vw, 112px); padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--line); }
.maker-list { columns: 2; column-gap: 32px; margin-top: 20px; }
.maker-list li { font: 400 22px/1.9 var(--serif); }
.quote blockquote p { font: 400 clamp(26px, 2.8vw, 40px)/1.25 var(--serif); }
.quote blockquote p::before { content: "\201C"; color: var(--accent); }
.quote blockquote p::after { content: "\201D"; color: var(--accent); }
.quote figcaption { margin-top: 20px; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
@media (max-width: 900px) { .makers { grid-template-columns: 1fr; } }

/* ---------- visit ---------- */
.visit { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: center; padding-block: clamp(64px, 9vw, 140px); }
.visit-photo { aspect-ratio: 5 / 4; }
.visit-text { display: flex; flex-direction: column; gap: 26px; }
.visit-text h2 { font-size: clamp(32px, 3.6vw, 52px); max-width: 14ch; }
.visit-list { border-top: 1px solid var(--line); }
.visit-list div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.visit-list dt { font: 500 12px/1.9 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.visit-list a { text-decoration: none; }
.visit-list a:hover { color: var(--accent); }
@media (max-width: 900px) { .visit { grid-template-columns: 1fr; } }

/* ---------- inner pages: head with a meta row, a big title and an intro ---------- */
.page-head { padding-block: clamp(32px, 5vw, 72px) clamp(40px, 5vw, 80px); }
.page-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 10px; border-top: 1px solid var(--line); font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.page-meta a { text-decoration: none; color: var(--accent); }
.page-title { font-size: clamp(52px, 9vw, 150px); line-height: .95; letter-spacing: -.035em; margin-top: clamp(48px, 7vw, 120px); max-width: 13ch; }
.page-title em { color: var(--accent); }
.article-title { font-size: clamp(44px, 6.6vw, 112px); max-width: 16ch; }
.page-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; margin-top: clamp(28px, 3vw, 48px); }
.page-intro p { font-size: clamp(18px, 1.4vw, 21px); max-width: 46ch; }
@media (max-width: 700px) { .page-meta { grid-template-columns: 1fr 1fr; } .page-meta li:nth-child(n+3) { display: none; } }
/* a wide photo under the head, with a lens band that moves with the scroll */
.wrap-wide { width: calc(100% - 2 * var(--pad)); max-width: calc(var(--max) - 2 * var(--pad)); margin-inline: auto; }
.page-photo { aspect-ratio: 21 / 9; }
@media (max-width: 700px) { .page-photo { aspect-ratio: 4 / 3; } }
/* photos that come into focus: the sharp copy is drawn down over the soft one with the scroll */
.motion [data-clear-photo] { --y: 0%; --h: 0%; }

/* ---------- shared rows (lenses, makers, contacts, history) ---------- */
.rows { border-top: 1px solid var(--ink); }
.row { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px 32px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--line); }
.row h3 { font-size: clamp(22px, 2vw, 30px); }
.row p { color: var(--grey); }
.row-n { font: 500 12px/1 var(--mono); color: var(--accent); }
.row-price { font: 500 13px/1.6 var(--mono); white-space: nowrap; }
.rows-tight .row { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); padding: 18px 0; }
.rows-tight .row h3 { font-size: 22px; }
.row-maker { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); }
.row-year { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.row-year p { color: var(--ink); font-size: clamp(18px, 1.4vw, 21px); }
.year { font: 400 clamp(44px, 6vw, 96px)/1 var(--serif); letter-spacing: -.03em; color: var(--accent); }
@media (max-width: 800px) {
  .row, .row-maker { grid-template-columns: 40px 1fr; }
  .row p, .row-price, .row-maker p { grid-column: 2; }
  .rows-tight .row, .row-year { grid-template-columns: 1fr; }
}

/* ---------- eye exams ---------- */
.exams { display: flex; flex-direction: column; gap: clamp(64px, 9vw, 140px); padding-block: clamp(64px, 9vw, 140px); }
.exam { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 112px); align-items: center; }
.exam:nth-child(even) .exam-ph { order: 2; }
.exam-ph { aspect-ratio: 4 / 5; }
.exam-body { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.exam-n { font: 500 12px/1 var(--mono); color: var(--accent); }
.exam-body h2 { font-size: clamp(34px, 3.8vw, 56px); }
.exam-for { font: 500 13px/1.5 var(--mono); color: var(--grey); max-width: 44ch; }
.exam-body > p:not([class]) { max-width: 46ch; }
.checks { width: 100%; border-top: 1px solid var(--line); }
.checks li { padding: 10px 0 10px 26px; border-bottom: 1px solid var(--line); position: relative; font-size: 16px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 10px; margin-top: -5px; border: 1.5px solid var(--accent); border-radius: 50%; }
.exam-meta { display: flex; gap: 40px; }
.exam-meta dt, .visit-list dt { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.exam-meta dd { font: 400 26px/1.2 var(--serif); }
@media (max-width: 900px) { .exam { grid-template-columns: 1fr; } .exam:nth-child(even) .exam-ph { order: 0; } .exam-ph { aspect-ratio: 4 / 3; } }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 48px clamp(32px, 6vw, 112px); padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--line); }
.faq-head { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.faq-head p:last-child { color: var(--grey); }
.faq-list { border-top: 1px solid var(--ink); }
details { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; cursor: pointer; list-style: none; font: 400 clamp(20px, 1.8vw, 26px)/1.3 var(--serif); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 22px/1.2 var(--mono); color: var(--accent); transition: transform .4s var(--ease); }
details[open]:not(.closing) summary::after { transform: rotate(45deg); }
details p { padding-bottom: 24px; color: var(--grey); max-width: 60ch; }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; } }

/* ---------- closing call to action ---------- */
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; padding-block: clamp(64px, 9vw, 140px); border-top: 1px solid var(--line); }
.cta h2 { font-size: clamp(40px, 6vw, 96px); max-width: 18ch; letter-spacing: -.03em; }

/* ---------- prescription guide ---------- */
.rx-guide { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 48px clamp(32px, 6vw, 112px); padding-block: clamp(32px, 5vw, 64px) clamp(64px, 8vw, 120px); align-items: start; }
.rx-head { display: flex; flex-direction: column; gap: 18px; }
.rx-head p:last-child { color: var(--grey); }
.rx-slip { background: #fff; border: 1px solid var(--line); padding: clamp(18px, 3vw, 40px); box-shadow: 0 30px 60px -40px rgba(22, 24, 27, .35); }
.rx-row { display: grid; grid-template-columns: 44px repeat(5, minmax(0, 1fr)); align-items: center; border-bottom: 1px solid var(--line); font: 500 clamp(14px, 1.5vw, 20px)/1 var(--mono); }
.rx-row > * { padding: 16px 6px; text-align: center; }
.rx-eye { color: var(--grey); text-align: left; font-size: 12px; padding-left: 0; }
.rx-key { border: 0; background: none; color: var(--grey); font: inherit; font-size: 12px; letter-spacing: .08em; cursor: pointer; position: relative; transition: color .2s; }
.rx-key::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .3s var(--ease); }
.rx-key:hover, .rx-key[aria-selected="true"] { color: var(--ink); }
.rx-key[aria-selected="true"]::after { transform: scaleX(1); }
.rx-slip.has-pick .rx-val { color: color-mix(in srgb, var(--ink) 30%, transparent); transition: color .3s; }
.rx-slip .rx-val.on { color: var(--accent); }
.rx-panels { min-height: 120px; padding-top: 24px; }
.rx-name { font: 400 26px/1.2 var(--serif); margin-bottom: 8px; }
.rx-panel p:last-child { color: var(--grey); max-width: 52ch; }
@media (max-width: 900px) { .rx-guide { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .rx-row { grid-template-columns: 28px repeat(5, minmax(0, 1fr)); font-size: 13px; } .rx-row > * { padding-inline: 2px; } .rx-slip { padding-inline: 12px; } }

/* ---------- lens prices, coatings, contact lenses ---------- */
.price-list { padding-block: clamp(64px, 9vw, 140px) clamp(48px, 6vw, 96px); }
.tiles-sec { padding-block: clamp(48px, 6vw, 96px); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--ink); }
.tiles li { display: flex; flex-direction: column; gap: 12px; padding: 24px 24px 32px 0; border-right: 1px solid var(--line); }
.tiles li + li { padding-left: 24px; }
.tiles li:last-child { border-right: 0; }
.tiles p { color: var(--grey); font-size: 16px; }
.tile-n { font: 500 12px/1 var(--mono); color: var(--accent); }
@media (max-width: 900px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles li { padding: 24px 16px 28px 0; border-bottom: 1px solid var(--line); }
  .tiles li:nth-child(odd) { padding-left: 0; }
  .tiles li:nth-child(even) { padding-left: 16px; border-right: 0; }
}
.contacts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 112px); align-items: center; padding-block: clamp(64px, 9vw, 140px); }
.contacts-ph { aspect-ratio: 4 / 5; }
.contacts-text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.contacts-text .rows { width: 100%; }
@media (max-width: 900px) { .contacts { grid-template-columns: 1fr; } .contacts-ph { aspect-ratio: 4 / 3; } }

/* ---------- frames ---------- */
.frames { padding-bottom: clamp(64px, 9vw, 140px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(24px, 3vw, 40px); }
.chip {
  min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--ink);
  font: 500 14px/1 var(--sans); cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.frame-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) clamp(16px, 2vw, 32px); }
.frame[hidden] { display: none; }
.frame-ph { aspect-ratio: 4 / 5; }
.frame-size { position: absolute; left: 12px; top: 12px; padding: 4px 7px; background: var(--bg); font: 500 11px/1 var(--mono); letter-spacing: .04em; }
.frame figcaption { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin-top: 14px; }
.frame-name { font: 400 24px/1.2 var(--serif); }
.frame-maker { font: 500 12px/2 var(--mono); color: var(--grey); text-align: right; }
.frame-note { grid-column: 1 / -1; color: var(--grey); font-size: 15px; }
.frames-note { margin-top: 40px; font: 500 12px/1.5 var(--mono); color: var(--grey); }
@media (max-width: 1100px) { .frame-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .frame-grid { grid-template-columns: 1fr; } }
.makers-full { padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--line); }

/* ---------- the practice ---------- */
.statement { padding-block: clamp(80px, 11vw, 180px); }
.statement p { font: 400 clamp(32px, 4.4vw, 68px)/1.12 var(--serif); letter-spacing: -.02em; max-width: 24ch; }
.history { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 56px); padding-bottom: clamp(64px, 9vw, 140px); }
.team { padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--line); }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.person-ph { aspect-ratio: 4 / 5; margin-bottom: 18px; }
.person-role { font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 6px 0 10px; }
.person p:last-child { color: var(--grey); font-size: 16px; }
@media (max-width: 800px) { .team-grid { grid-template-columns: 1fr; } }

/* ---------- journal ---------- */
.posts { display: flex; flex-direction: column; padding-bottom: clamp(64px, 9vw, 140px); border-top: 1px solid var(--ink); }
.post { border-bottom: 1px solid var(--line); }
.post-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 88px); align-items: center; padding-block: clamp(28px, 4vw, 56px); text-decoration: none; }
.post-ph { aspect-ratio: 3 / 2; }
.post-text { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.post-text > p:not(.post-meta) { color: var(--grey); max-width: 46ch; }
.post-meta { display: flex; gap: 20px; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.post-title { font-size: clamp(30px, 3.4vw, 50px); line-height: 1.05; transition: color .3s; }
.post-link:hover .post-title { color: var(--accent); }
.post-link:hover .link { color: var(--accent); background-size: 0 1px; background-position: 100% 100%; }
@media (max-width: 800px) { .post-link { grid-template-columns: 1fr; } }
.article-body { max-width: calc(720px + 2 * var(--pad)); padding-block: clamp(56px, 7vw, 112px); display: flex; flex-direction: column; gap: 1.3em; font-size: clamp(18px, 1.3vw, 20px); line-height: 1.7; }
.article-body p:first-child { font: 400 clamp(24px, 2.2vw, 32px)/1.35 var(--serif); }
.next { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: clamp(56px, 7vw, 112px); border-top: 1px solid var(--line); }
.next-link { font: 400 clamp(36px, 5vw, 80px)/1.02 var(--serif); letter-spacing: -.025em; text-decoration: none; max-width: 18ch; transition: color .3s; }
.next-link:hover { color: var(--accent); }

/* ---------- booking form ---------- */
.book { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 48px clamp(32px, 6vw, 112px); padding-bottom: clamp(64px, 9vw, 140px); align-items: start; }
.book-side { display: flex; flex-direction: column; gap: 28px; position: sticky; top: calc(var(--header) + 24px); }
.book-steps li { display: grid; grid-template-columns: 40px 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); }
.book-steps li:first-child { border-top: 1px solid var(--ink); }
.book-steps span { font: 500 12px/1.9 var(--mono); color: var(--accent); }
.form { display: flex; flex-direction: column; gap: 32px; border-top: 1px solid var(--ink); padding-top: 28px; }
.field-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.field-group legend { padding: 0; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field span, .check span { font-size: 15px; }
.field span { font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none;
  color: var(--ink); font: 400 18px/1.4 var(--sans); resize: vertical; transition: border-color .2s;
}
.field input:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--grey) 70%, transparent); }
.field.bad input, .field.bad textarea { border-bottom-color: var(--accent); }
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 2px 0 0; border: 1px solid var(--ink); border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; }
.check input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .2s var(--ease); }
.check input:checked::after { transform: scale(1); }
.check.bad input { border-color: var(--accent); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.btn { border: 0; cursor: pointer; }
.form-note { color: var(--accent); font-size: 15px; }
@media (max-width: 900px) { .book { grid-template-columns: 1fr; } .book-side { position: static; } }
@media (max-width: 600px) { .fields { grid-template-columns: 1fr; } }

/* ---------- 404: the same lens over a big number, no photo ---------- */
.hero-404 .hero-mark { bottom: auto; top: 46%; transform: translate(-50%, -50%); }
.hero-404 .hero-ui { padding-bottom: 32px; }
.link-light { color: var(--bg); }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--bg); padding-top: clamp(56px, 7vw, 104px); }
.footer .label { color: color-mix(in srgb, var(--bg) 55%, transparent); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 48px; }
.footer-invite { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.footer-line { font: 400 clamp(28px, 3vw, 44px)/1.15 var(--serif); max-width: 18ch; }
.footer .btn { background: var(--bg); color: var(--ink); }
.footer .btn:hover { background: var(--accent); color: var(--on-accent); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; font-size: 15px; }
.footer-cols .label { margin-bottom: 12px; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { color: color-mix(in srgb, var(--accent) 50%, var(--bg)); }
.nav-foot { display: flex; flex-direction: column; gap: 4px; }
.footer-mark { font: 400 clamp(80px, 21vw, 340px)/.8 var(--serif); letter-spacing: -.04em; margin-top: clamp(48px, 7vw, 104px); padding-bottom: .2em; overflow: hidden; color: color-mix(in srgb, var(--bg) 14%, var(--ink)); }  /* padding: room for the tail of the p */
.footer-small { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 22px 28px; font-size: 13px; color: color-mix(in srgb, var(--bg) 55%, transparent); }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .footer-cols { grid-template-columns: 1fr 1fr; } }

/* ---------- back to top, copied mail ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bg) 30%, transparent);  /* still visible over the dark footer */
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s, transform .3s, visibility .3s, background .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); }
.copied-tip { position: absolute; transform: translate(-50%, -130%); padding: 4px 8px; background: var(--ink); color: var(--bg); font: 500 11px/1 var(--mono); pointer-events: none; z-index: 60; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
