/* Halden Optometry
   COLOR THEORY
   Harmony: monochromatic plus one accent. A grayscale ladder from paper (#F4F4F1) to ink (#141416) carries the whole page,
   the way an eye chart does: precision, contrast, nothing to distract. One signal orange (#FF4A1C) is the only color and is
   used only where a decision is made (book, result, the two orange frame tiles). Light base, not near-black.
   60% paper       #F4F4F1 / #E8E8E4   backgrounds
   30% ink/gray    #141416 text and dark tiles, #5C5C5A secondary text, #D3D3CF rules
   10% orange      #FF4A1C actions, always with ink text on it
   Contrast (WCAG): ink #141416 on #F4F4F1 16.70 (AAA), on #E8E8E4 14.98 (AAA), paper on ink 16.70 (AAA);
                    gray #5C5C5A on #F4F4F1 6.08 (AA), on #E8E8E4 5.46 (AA); dimmed chart rows #767672 on white 4.7 (AA); ink on orange #FF4A1C 5.47 (AA, buttons);
                    orange on paper 3.05 (large text and graphics only). Photo shoot: grayscale exam portraits. */
:root {
  --paper: #F4F4F1;
  --paper-2: #E8E8E4;
  --ink: #141416;
  --gray: #5C5C5A;
  --mid: #767672;
  --line: #D3D3CF;
  --accent: #FF4A1C;
  --display: "Archivo", system-ui, sans-serif;
  --body: "Schibsted Grotesk", system-ui, sans-serif;
  --pad: clamp(1.1rem, 4vw, 4.5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--body); font-feature-settings: "kern" 1; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; filter: grayscale(1) contrast(1.05); }
a { color: inherit; }
p, h1, h2, h3, ul, ol, dl, figure, figcaption { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -.03em; font-variation-settings: "wdth" 100; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: 1.25rem; letter-spacing: -.02em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 60; }
.skip:focus { left: .5rem; }
.hp { position: absolute; left: -9999px; }
section { scroll-margin-top: 70px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: .85rem 1.5rem; font: 700 1rem var(--body); text-decoration: none; border: 2px solid var(--ink); cursor: pointer; border-radius: 0; background: transparent; color: var(--ink); transition: background .2s, color .2s, transform .2s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); border-color: var(--accent); }
.btn--accent:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn--wide { width: 100%; }

/* Header */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 66px; padding: 0 var(--pad); background: rgba(244, 244, 241, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font: 800 1.3rem/1 var(--display); font-variation-settings: "wdth" 110; letter-spacing: -.03em; text-decoration: none; }
.brand span { font: 400 .8rem var(--body); letter-spacing: .02em; margin-left: .5rem; color: var(--gray); }
.menu { display: flex; align-items: center; gap: 1.7rem; font-weight: 600; font-size: .95rem; }
.menu a { text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.menu a:hover { border-color: var(--accent); }
.menu__cta { background: var(--ink); color: var(--paper); padding: .55rem 1rem !important; border: 0 !important; }
.menu__cta:hover { background: var(--accent); color: var(--ink); }
.burger { display: none; background: none; border: 2px solid var(--ink); padding: .5rem .9rem; font: 700 .95rem var(--body); color: var(--ink); cursor: pointer; }

/* Hero with chart */
.hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(2rem, 5vw, 4rem) var(--pad) clamp(3rem, 6vw, 5rem); align-items: start; }
.hero__where { font-size: .95rem; color: var(--gray); }
.hero h1 { margin-top: 1.4rem; font-size: clamp(3rem, 7vw, 6.4rem); font-weight: 800; letter-spacing: -.05em; font-variation-settings: "wdth" 90; line-height: .95; max-width: 9ch; }
.hero__lead { margin-top: 1.6rem; font-size: clamp(1.1rem, 1.5vw, 1.25rem); color: var(--gray); max-width: 36ch; line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.chart { background: #fff; border: 2px solid var(--ink); padding: clamp(1.2rem, 2.5vw, 2rem); display: grid; gap: 1.2rem; }
.chart__head h2 { font-size: 1.35rem; font-variation-settings: "wdth" 100; }
.chart__head p { margin-top: .4rem; font-size: .95rem; color: var(--gray); }
.chart__rows { display: grid; gap: .35rem; justify-items: center; padding: .6rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.row { display: flex; gap: calc(var(--size) * 1.1em); align-items: baseline; background: none; border: 0; cursor: pointer; padding: .2rem .8rem; border-radius: 4px; font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 125; color: var(--ink); font-size: calc(var(--size) * clamp(3.6rem, 7vw, 6rem)); line-height: 1; letter-spacing: .04em; transition: background .15s, color .15s; }
.row:hover { background: var(--paper-2); }
.row.is-chosen { color: var(--accent); }
.row.is-below { color: var(--mid); }
.row:focus-visible { outline-offset: 0; }
.chart__verdict { font: 700 clamp(1.15rem, 1.8vw, 1.45rem)/1.3 var(--display); letter-spacing: -.02em; }
.chart__fine { margin-top: .6rem; font-size: .88rem; color: var(--gray); max-width: 60ch; }
.chart__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.chart__actions .btn { min-height: 46px; padding: .6rem 1.1rem; font-size: .95rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise .7s var(--ease) both; }
  .hero__copy > *:nth-child(2) { animation-delay: .06s; }
  .hero__copy > *:nth-child(3) { animation-delay: .12s; }
  .hero__copy > *:nth-child(4) { animation-delay: .18s; }
  .row { animation: rise .5s var(--ease) both; animation-delay: calc(.15s + var(--i, 0) * .07s); }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* Exams */
.exams { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(3rem, 7vw, 6rem) var(--pad); background: var(--paper-2); align-items: start; }
.exams__lead { margin-top: 1rem; color: var(--gray); max-width: 56ch; }
.examlist { list-style: none; padding: 0; margin-top: 2rem; display: grid; }
.examlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; padding: 1.3rem 0; border-top: 1px solid var(--ink); }
.examlist h3 { font-size: 1.35rem; }
.examlist li > div > p { margin-top: .5rem; color: var(--gray); font-size: .98rem; max-width: 52ch; }
.examlist dl { display: grid; grid-template-columns: auto auto; gap: 1.5rem; align-content: start; text-align: right; }
.examlist dt { font-size: .8rem; color: var(--gray); }
.examlist dd { margin: 0; font: 700 1.25rem/1.2 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.02em; }
.exams__photo { position: sticky; top: 90px; }
.exams__photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.exams__photo figcaption { margin-top: .7rem; font-size: .9rem; color: var(--gray); }

/* Frames */
.frames { padding: clamp(3rem, 7vw, 6rem) var(--pad); }
.frames__head { max-width: 62ch; }
.frames__head p { margin-top: 1rem; color: var(--gray); font-size: 1.1rem; }
.wall { list-style: none; padding: 0; margin: 2.2rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.tile { aspect-ratio: 1.35; padding: 1.4rem; display: grid; align-content: end; gap: .3rem; background: var(--paper-2); border: 1px solid var(--line); }
.tile--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tile--accent { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.tile__shape { font: 800 clamp(2rem, 3.6vw, 3.4rem)/1 var(--display); letter-spacing: -.04em; font-variation-settings: "wdth" 110; }
.tile__meta { font-size: .95rem; margin-top: .3rem; }
.tile--ink .tile__meta { color: #C9C9C4; }
.tile__price { font-weight: 700; font-size: .95rem; }
.frames__note { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(1.5rem, 4vw, 4rem); margin-top: 3rem; align-items: center; }
.frames__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.frames__text h3 { font-size: 1.6rem; }
.frames__text p { margin-top: 1rem; color: var(--gray); }

/* Contacts */
.contacts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(3rem, 7vw, 6rem) var(--pad); background: var(--ink); color: var(--paper); align-items: center; }
.contacts__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.fitlist { list-style: none; padding: 0; margin-top: 1.8rem; display: grid; counter-reset: fit; }
.fitlist li { position: relative; padding: .9rem 0 .9rem 3.2rem; border-top: 1px solid rgba(244, 244, 241, .25); counter-increment: fit; color: #C9C9C4; }
.fitlist li::before { content: counter(fit); position: absolute; left: 0; top: .8rem; width: 34px; height: 34px; display: grid; place-items: center; background: var(--accent); color: var(--ink); font: 800 1rem var(--display); }
.fitlist b { color: var(--paper); }
.contacts__fine { margin-top: 1.2rem; color: #C9C9C4; font-size: .95rem; }
.contacts .btn--dark { margin-top: 1.4rem; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.contacts .btn--dark:hover { background: var(--accent); border-color: var(--accent); }

/* Book */
.book { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(3rem, 7vw, 6rem) var(--pad); }
.book__info p { margin-top: 1rem; color: var(--gray); max-width: 40ch; }
.info { margin-top: 1.8rem; display: grid; }
.info div { padding: .9rem 0; border-top: 1px solid var(--ink); display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; }
.info dt { font-weight: 700; }
.info dd { margin: 0; line-height: 1.6; }
.form { display: grid; gap: 1.1rem; background: #fff; border: 2px solid var(--ink); padding: clamp(1.4rem, 3vw, 2.4rem); }
.form__row { display: grid; gap: .4rem; }
.form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form__row--2 > div { display: grid; gap: .4rem; }
label { font-weight: 700; font-size: .92rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 0; padding: .75rem .9rem; min-height: 48px; }
input::placeholder, textarea::placeholder { color: #6E6E6B; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent); outline-offset: 0; }
textarea { resize: vertical; }
.form__privacy { font-size: .9rem; color: var(--gray); }
.form__done { background: #fff; border: 2px solid var(--ink); padding: 1.6rem; }
.form__done p { margin-top: .6rem; }

.foot { padding: 2.5rem var(--pad) 3rem; display: grid; gap: .4rem; font-size: .9rem; color: var(--gray); border-top: 1px solid var(--line); }

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exams { grid-template-columns: 1fr; }
  .exams__photo { position: static; max-width: 420px; }
}
@media (max-width: 820px) {
  .menu { position: fixed; inset: 66px 0 auto 0; display: grid; padding: .6rem var(--pad) 1.2rem; background: var(--paper); border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .25s var(--ease); }
  .menu.is-open { transform: none; opacity: 1; visibility: visible; }
  .menu a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .menu__cta { margin-top: .6rem; text-align: center; }
  .burger { display: inline-block; }
  .frames__note, .contacts, .book { grid-template-columns: 1fr; }
  .examlist li { grid-template-columns: 1fr; gap: .8rem; }
  .examlist dl { text-align: left; justify-content: start; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wall { grid-template-columns: 1fr; }
  .tile { aspect-ratio: auto; min-height: 140px; }
  .form__row--2 { grid-template-columns: 1fr; }
  .row { font-size: calc(var(--size) * 3.6rem); padding: .2rem .4rem; }
  .info div { grid-template-columns: 1fr; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
