/* ==========================================================================
   Pallikaranai opening, design 1: "Into focus"
   An eye-test room on a white wall: chart black, the red 20/20 line,
   marigold for the sunglasses offer. Bricolage condensed for chart letters,
   Atkinson Hyperlegible (made for low-vision readers) for everything else.
   ========================================================================== */

@font-face {
	font-family: "Bricolage Grotesque";
	src: url("../fonts/bricolage.woff2") format("woff2");
	font-weight: 200 800;
	font-stretch: 75% 100%;
	font-display: swap;
}
@font-face {
	font-family: "Atkinson Hyperlegible Next";
	src: url("../fonts/atkinson-next.woff2") format("woff2");
	font-weight: 200 800;
	font-display: swap;
}

:root {
	--ink: #16203a;
	--ink-2: #4a5470;
	--wall: #ffffff;
	--wall-2: #f1f3f7;
	--line: #dde2ea;
	--red: #d3261c;
	--sun: #f0a030;
	--sun-deep: #7a4100;
	--display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
	--gutter: clamp(16px, 4vw, 48px);
	--top-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--top-h); }
body { margin: 0; background: var(--wall); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 48px; padding: .7em 1.3em; border-radius: 999px; border: 2px solid var(--ink);
	font: 700 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; background: none;
	transition: background-color .2s, color .2s;
}
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--red); border-color: var(--red); }
.btn--line:hover { background: var(--ink); color: #fff; }
.link { border: 0; background: none; padding: 0; text-decoration: underline; cursor: pointer; font-weight: 700; }

/* Top bar ---------------------------------------------------------------- */
.top {
	position: fixed; inset: 0 0 auto; z-index: 50; height: var(--top-h);
	display: flex; align-items: center; gap: 1rem; padding: 0 var(--gutter);
	background: rgb(255 255 255 / 88%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid rgb(22 32 58 / 8%);
}
.top__brand img { width: auto; height: 34px; }
.top__nav { display: none; margin-left: auto; gap: 1.75rem; font-weight: 700; }
.top__nav a { text-decoration: none; }
.top__nav a:hover { color: var(--red); }
.top__call { margin-left: auto; font-weight: 700; text-decoration: none; white-space: nowrap; padding: .45em .9em; border-radius: 999px; background: var(--ink); color: #fff; font-size: .95rem; }
.top__call span { display: none; }
@media (min-width: 860px) {
	.top__nav { display: flex; }
	.top__call { margin-left: 1.5rem; }
	.top__call span { display: inline; }
}

/* 1. Focus --------------------------------------------------------------- */
.focus { height: 320vh; position: relative; }
.focus__stick {
	position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
	display: grid; place-items: center; padding: calc(var(--top-h) + 1rem) var(--gutter) 9rem;
}
.focus__chart { position: relative; width: 100%; max-width: 1200px; cursor: none; }
.chart { text-align: center; font-family: var(--display); color: var(--ink); }
.chart--sharp { position: absolute; inset: 0; clip-path: circle(var(--r, 0px) at var(--lx, 50%) var(--ly, 50%)); }
.chart--blur { filter: blur(var(--blur, 14px)); transition: filter .35s cubic-bezier(.2, .8, .2, 1); }
.chart__l1 { font: 500 clamp(1.1rem, 3.4vw, 2.2rem)/1.2 var(--body); color: var(--ink-2); }
.chart__l2 {
	font-weight: 800; font-stretch: 75%; text-transform: uppercase; letter-spacing: .02em;
	font-size: min(11.2vw, 10rem); line-height: .95; white-space: nowrap; margin: .12em 0 .2em;
}
.chart__l3 {
	display: inline-block; font-weight: 700; font-stretch: 85%; text-transform: uppercase; letter-spacing: .08em;
	font-size: clamp(1.25rem, 5.2vw, 3.6rem); line-height: 1.1; padding-bottom: .22em;
	border-bottom: 3px solid var(--red); /* the 20/20 line on a real chart */
}
.chart__l4 { margin-top: .9em; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: clamp(.72rem, 1.9vw, 1.1rem); }

.lens {
	position: absolute; left: 0; top: 0; width: 200px; height: 200px; margin: -100px 0 0 -100px;
	border-radius: 50%; pointer-events: none; opacity: 0;
	transform: translate(var(--lx, 50%), var(--ly, 50%));
	border: 9px solid var(--ink);
	box-shadow: 0 0 0 2px #fff, 0 18px 40px -10px rgb(22 32 58 / 45%), inset 0 0 0 2px rgb(255 255 255 / 60%);
	transition: opacity .3s;
}
.lens__tick { position: absolute; inset: -9px; border-radius: 50%; background: conic-gradient(from -4deg, var(--red) 0 8deg, transparent 8deg); -webkit-mask: radial-gradient(circle, transparent 92px, #000 93px); mask: radial-gradient(circle, transparent 92px, #000 93px); }
.is-lens .lens { opacity: 1; }

.dial { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); text-align: center; width: max-content; max-width: calc(100% - 2 * var(--gutter)); transition: opacity .4s; }
.dial__q { font-weight: 700; margin-bottom: .6rem; min-height: 1.6em; }
.dial__steps { list-style: none; padding: 0; display: flex; justify-content: center; gap: .5rem; }
.dial__steps li {
	width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center;
	border: 2px solid var(--line); font: 700 1rem var(--display); color: var(--ink-2);
	transition: background-color .25s, border-color .25s, color .25s, transform .25s;
}
.dial__steps li.is-on { background: var(--ink); border-color: var(--ink); color: #fff; transform: scale(1.12); }
.dial__steps li.is-past { border-color: var(--ink); color: var(--ink); }
.dial__power { margin-top: .5rem; font: 600 .9rem var(--display); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.focus__hint { position: absolute; top: calc(var(--top-h) + 1rem); left: 0; right: 0; text-align: center; font-size: .9rem; color: var(--ink-2); transition: opacity .4s; }
.is-sharp .dial__q { color: var(--red); }

/* 2. Countdown ----------------------------------------------------------- */
.count { padding: clamp(4rem, 12vw, 9rem) var(--gutter); background: var(--wall-2); }
.count__inner { max-width: 760px; margin: 0 auto; text-align: center; }
.count__title { font: 700 clamp(1.5rem, 4vw, 2.4rem)/1.15 var(--display); margin-bottom: 2.5rem; text-wrap: balance; }
.snellen { list-style: none; padding: 0; display: grid; gap: .3em; font-family: var(--display); font-variant-numeric: tabular-nums; }
.snellen__row { display: flex; justify-content: center; align-items: baseline; gap: .3em; line-height: 1; }
.snellen__n { font-weight: 800; font-stretch: 75%; }
.snellen__u { font-family: var(--body); font-weight: 600; color: var(--ink-2); font-size: .32em; }
.snellen__row--1 { font-size: clamp(5rem, 24vw, 11rem); }
.snellen__row--2 { font-size: clamp(3rem, 13vw, 6rem); }
.snellen__row--3 { font-size: clamp(2rem, 8vw, 3.6rem); padding-bottom: .25em; border-bottom: 3px solid var(--red); justify-self: center; }
.snellen__row--4 { font-size: clamp(1.4rem, 5vw, 2.2rem); }
.count__open { display: none; font: 700 clamp(2rem, 7vw, 4rem)/1.1 var(--display); }
[data-opening="open"] .snellen, [data-opening="done"] .snellen { display: none; }
[data-opening="open"] .count__open { display: block; }
.count__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }

/* 3. Glare --------------------------------------------------------------- */
.glare { height: 260vh; position: relative; background: #fff; }
.glare__stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; cursor: none; }
.glare__photo { position: absolute; inset: 0; background-size: cover; background-position: center 40%; }
.glare__photo--bright { filter: brightness(1.7) contrast(.55) saturate(.45); }
.glare__photo--bright::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 72% 18%, #fff 0, rgb(255 255 255 / 85%) 14%, rgb(255 250 235 / 0%) 55%); }
.glare__photo--tint {
	filter: brightness(.82) contrast(1.15) saturate(1.25) sepia(.18);
	--mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 140'%3E%3Cpath d='M8 34 Q8 22 20 22 L172 22 Q186 22 186 36 L186 70 Q186 118 138 120 L62 120 Q14 118 10 72 Z M214 36 Q214 22 228 22 L380 22 Q392 22 392 34 L390 72 Q386 118 338 120 L262 120 Q214 118 214 70 Z'/%3E%3C/svg%3E");
	-webkit-mask: var(--mask) no-repeat; mask: var(--mask) no-repeat;
	-webkit-mask-size: var(--gw, 400px) auto; mask-size: var(--gw, 400px) auto;
	-webkit-mask-position: var(--gx, 0) var(--gy, 0); mask-position: var(--gx, 0) var(--gy, 0);
}
.glare__frame { position: absolute; left: 0; top: 0; width: var(--gw, 400px); height: auto; transform: translate(var(--gx, 0), var(--gy, 0)); filter: drop-shadow(0 14px 22px rgb(0 0 0 / 30%)); }
.is-full .glare__photo--tint { -webkit-mask: none; mask: none; }
.is-full .glare__frame { opacity: 0; transition: opacity .3s; }
.glare__copy {
	position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(2rem, 8vh, 5rem);
	color: var(--ink); max-width: 760px; transition: color .4s;
}
.glare__kicker { font: 700 clamp(1.1rem, 3vw, 1.6rem)/1.2 var(--display); margin-bottom: .4rem; }
.glare__title { font: 800 clamp(2.6rem, 10vw, 7rem)/.92 var(--display); font-stretch: 80%; letter-spacing: -.01em; }
.glare__big { color: var(--sun-deep); transition: color .4s; }
.glare__lede { margin-top: 1rem; font-size: clamp(1rem, 2.4vw, 1.25rem); max-width: 34ch; font-weight: 600; }
.is-full .glare__copy { color: #fff; text-shadow: 0 2px 18px rgb(0 0 0 / 35%); }
.is-full .glare__big { color: var(--sun); }
.glare__hint { position: absolute; top: calc(var(--top-h) + 1rem); left: var(--gutter); font-weight: 700; font-size: .9rem; background: rgb(255 255 255 / 85%); padding: .3em .8em; border-radius: 999px; transition: opacity .3s; }
.glare__hint:empty { display: none; }
.is-full .glare__hint { opacity: 0; }

/* 4. Reel ---------------------------------------------------------------- */
.reel { position: relative; height: 360vh; }
.reel__stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 2rem; padding-top: var(--top-h); }
.reel__head { padding: 0 var(--gutter); max-width: 900px; }
.reel__title { font: 800 clamp(2rem, 6vw, 4rem)/1 var(--display); font-stretch: 85%; }
.reel__note { margin-top: .6rem; color: var(--ink-2); max-width: 52ch; }
.reel__track { list-style: none; display: flex; gap: clamp(1rem, 3vw, 2rem); padding: 0 var(--gutter); width: max-content; will-change: transform; }
.card { width: min(78vw, 520px); }
.card img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 18px; filter: blur(var(--cb, 0px)) saturate(var(--cs, 1)); transform: scale(var(--cz, 1)); transition: filter .15s linear; }
.card h3 { margin-top: 1rem; font: 700 clamp(1.25rem, 3vw, 1.6rem)/1.2 var(--display); }
.card p { color: var(--ink-2); max-width: 40ch; }

/* 5. Gift ---------------------------------------------------------------- */
.gift { padding: clamp(4rem, 12vw, 9rem) var(--gutter); background: var(--ink); color: #fff; }
.gift__grid { max-width: 1160px; margin: 0 auto; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .gift__grid { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.gift__title { font: 800 clamp(2.2rem, 6vw, 4rem)/1 var(--display); font-stretch: 85%; text-wrap: balance; }
.gift__lede { margin: 1rem 0 2rem; color: #c9d0e0; max-width: 44ch; }

.invite-form { display: grid; gap: 1.1rem; }
.invite-form__field { display: grid; gap: .35rem; border: 0; padding: 0; margin: 0; }
.invite-form label, .invite-form legend { font-weight: 700; padding: 0; }
.invite-form input[type="text"], .invite-form input[type="tel"] {
	width: 100%; min-height: 52px; padding: .7em 1em; border-radius: 12px; border: 2px solid #3a4666;
	background: #1f2a48; color: #fff; font: 500 1.1rem var(--body);
}
.invite-form input:focus { border-color: var(--sun); outline: none; }
.invite-form__chips { display: flex; gap: .5rem; margin-top: .35rem; }
.invite-form__chips label { position: relative; }
.invite-form__chips input { position: absolute; opacity: 0; inset: 0; }
.invite-form__chips span { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 50%; border: 2px solid #3a4666; cursor: pointer; font: 700 1.05rem var(--display); }
.invite-form__chips input:checked + span { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.invite-form__chips input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }
.invite-form__error { color: #ffb4ae; font-weight: 700; }
.invite-form__submit { min-height: 56px; border: 0; border-radius: 999px; background: var(--sun); color: var(--ink); font: 800 1.15rem var(--display); cursor: pointer; transition: transform .15s, background-color .2s; }
.invite-form__submit:hover { background: #ffb851; }
.invite-form__submit:active { transform: scale(.98); }
.is-sending .invite-form__submit { opacity: .7; cursor: progress; }
.invite-form__fine { font-size: .85rem; color: #9aa4bd; }
.is-registered .gift__form { display: none; }

.rx { perspective: 1200px; }
.rx__slip {
	position: relative; background: #fff; color: var(--ink); border-radius: 6px; padding: 2rem 1.75rem 1.5rem;
	box-shadow: 0 30px 60px -20px rgb(0 0 0 / 55%);
	transform: rotate(-2deg); filter: blur(7px); opacity: .55; transition: filter .9s cubic-bezier(.2, .8, .2, 1), opacity .9s, transform .9s cubic-bezier(.2, .8, .2, 1);
	background-image: repeating-linear-gradient(transparent 0 38px, #eef1f6 38px 39px);
}
.rx__slip::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; background: radial-gradient(circle at 8px 10px, transparent 6px, #fff 6.5px) 0 0 / 16px 10px repeat-x; }
.is-registered .rx__slip { filter: none; opacity: 1; transform: rotate(-1deg); }
.rx__head { display: flex; align-items: baseline; gap: .6rem; font: 700 1.1rem var(--display); border-bottom: 2px solid var(--ink); padding-bottom: .6rem; margin-bottom: 1rem; }
.rx__mark { font: 800 2.4rem/1 var(--display); color: var(--red); font-style: italic; }
.rx__rows { display: grid; gap: .55rem; }
.rx__rows div { display: grid; grid-template-columns: 6rem 1fr; }
.rx__rows dt { color: var(--ink-2); font-size: .9rem; }
.rx__rows dd { font-weight: 700; font-family: var(--display); }
.rx__code { margin-top: 1.4rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border: 2px dashed var(--red); border-radius: 8px; padding: .8rem 1rem; }
.rx__code span { font-size: .9rem; color: var(--ink-2); }
.rx__code strong { font: 800 clamp(1.6rem, 5vw, 2.2rem)/1 var(--display); letter-spacing: .06em; color: var(--red); }
.rx__sig { margin-top: 1rem; font-size: .85rem; color: var(--ink-2); }
.rx__done { display: none; margin-top: 1.5rem; color: #c9d0e0; }
.rx__done .link { color: #fff; }
.is-registered .rx__done { display: block; }

/* 6. Visit --------------------------------------------------------------- */
.visit { padding: clamp(4rem, 10vw, 7rem) var(--gutter); }
.visit__grid { max-width: 1160px; margin: 0 auto; display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .visit__grid { grid-template-columns: 1fr 1.2fr; gap: 4rem; } }
.visit__title { font: 800 clamp(2rem, 5vw, 3.2rem)/1.05 var(--display); font-stretch: 85%; margin-bottom: .75rem; }
.visit__links { list-style: none; padding: 0; margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.visit__map iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: 18px; display: block; }

.foot { padding: 2rem var(--gutter) 2.5rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); text-align: center; }

/* No JavaScript: no pinning, everything shown sharp and still. */
@media (scripting: none) {
	.focus, .glare, .reel { height: auto; }
	.focus__stick, .glare__stick, .reel__stick { position: relative; height: auto; min-height: 100svh; }
	.chart--blur { filter: none; }
	.chart--sharp, .lens, .dial, .focus__hint, .glare__frame, .glare__hint { display: none; }
	.glare__photo--tint { -webkit-mask: none; mask: none; }
	.glare__copy { color: #fff; }
	.reel__track { width: auto; flex-direction: column; }
	.card { width: auto; max-width: 640px; }
	.rx__slip { transition: none; }
}
