/* Optician's office for websites: clinical paper, ink, and the eye chart's red and green. */

@font-face {
  font-family: 'Atkinson Next';
  src: url('/assets/fonts/atkinson-next.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Mono';
  src: url('/assets/fonts/atkinson-mono.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f3f5f4;
  --white: #ffffff;
  --ink: #1b2230;
  --ink-soft: #4a5262;
  --line: #d3d9d6;
  --red: #b3132b;
  --red-wash: #f8e4e7;
  --green: #0f6b4f;
  --green-wash: #e0f0e9;
  --amber: #8a5a00;
  --amber-wash: #f6ecd6;

  --sans: 'Atkinson Next', system-ui, sans-serif;
  --mono: 'Atkinson Mono', ui-monospace, monospace;

  --measure: 68ch;
  --page: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
code, pre { font-family: var(--mono); }

:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header and footer ---------- */

.site-header {
  max-width: var(--page);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.wordmark {
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  margin: 0;
}
.site-header nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: 16px; }
.site-header nav a:hover { text-decoration: underline; }

.site-footer {
  max-width: var(--page);
  margin: 96px auto 0;
  padding: 32px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 48px;
  font-size: 16px;
  color: var(--ink-soft);
}
.site-footer p { max-width: 44ch; }
.site-footer nav { display: flex; flex-direction: column; gap: 6px; }
.site-footer nav a { color: var(--ink-soft); }
.site-footer .fine { grid-column: 1 / -1; font-size: 14px; max-width: none; }
@media (max-width: 640px) { .site-footer { grid-template-columns: 1fr; } }

main { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
main > section { margin-top: 96px; }
main > section:first-child { margin-top: 24px; }
.lede { font-size: 20px; max-width: var(--measure); color: var(--ink-soft); }

/* ---------- buttons and forms ---------- */

button, .button {
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  background: var(--ink);
  color: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 13px 22px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.2;
}
button:hover, .button:hover { background: #2c3546; border-color: #2c3546; color: var(--white); }
button.quiet, .button.quiet { background: transparent; color: var(--ink); }
button.quiet:hover, .button.quiet:hover { background: var(--white); color: var(--ink); }

input[type='text'], input[type='email'] {
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 100%;
  min-width: 0;
}
input[aria-invalid='true'] { border-color: var(--red); }
label { font-weight: 700; display: block; margin-bottom: 6px; }
.form-note { font-size: 15px; color: var(--ink-soft); margin: 10px 0 0; }
.form-error { color: var(--red); font-weight: 700; margin: 10px 0 0; }
.hp { position: absolute; left: -9999px; }

.scan-form { max-width: 560px; }
.scan-row { display: flex; gap: 8px; }
.scan-row button { flex: none; }
@media (max-width: 520px) {
  .scan-row { flex-direction: column; }
  .scan-row button { width: 100%; }
}

/* ---------- hero: the eye chart ---------- */

.hero { display: grid; justify-items: center; gap: 40px; }
.chart {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  width: min(100%, 720px);
  padding: clamp(32px, 6vw, 56px) 20px 32px;
  text-align: center;
}
.chart-lines { margin: 0; font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: 0.14em; }
.chart-lines span { display: block; margin-bottom: 0.32em; }
.chart-lines .l1 { font-size: clamp(64px, 15vw, 150px); letter-spacing: 0.2em; margin-right: -0.2em; }
.chart-lines .l2 { font-size: clamp(40px, 9vw, 92px); margin-right: -0.14em; }
.chart-lines .l3 { font-size: clamp(26px, 5.8vw, 58px); margin-right: -0.14em; }

.chart-fade { margin: 18px 0 0; text-transform: uppercase; font-weight: 700; letter-spacing: 0.16em; }
.chart-fade span { display: block; margin: 0 auto 0.9em; max-width: 30em; }
.chart-fade .l4 { font-size: clamp(13px, 2.2vw, 20px); filter: blur(0.9px); }
.chart-fade .l5 { font-size: clamp(11px, 1.6vw, 15px); filter: blur(1.8px); }
.chart-fade .l6 { font-size: clamp(10px, 1.2vw, 12px); filter: blur(2.6px); }

/* The one orchestrated moment: the small print starts sharp, then goes out of focus. */
@media (prefers-reduced-motion: no-preference) {
  .chart-fade span { animation: unfocus 1.6s ease-in 0.5s both; }
  .chart-fade .l5 { animation-delay: 0.8s; }
  .chart-fade .l6 { animation-delay: 1.1s; }
  @keyframes unfocus { from { filter: blur(0); } }
}

.chart-key {
  margin: 28px auto 0;
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 17px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.hero-form { width: min(100%, 560px); }

/* ---------- two views ---------- */

.views-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
@media (max-width: 760px) { .views-pair { grid-template-columns: 1fr; } }
.views-pair figure { margin: 0; }
.views-pair figcaption { font-weight: 700; margin-bottom: 10px; }

.mock-site {
  background: #fbf3e8;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px;
  min-height: 220px;
  font-family: Georgia, serif;
  color: #3b2a1a;
}
.mock-brand { font-size: 15px; letter-spacing: 0.1em; margin-bottom: 18px; }
.mock-head { font-size: 26px; line-height: 1.2; margin-bottom: 12px; }
.mock-text { font-size: 16px; }
.mock-btn { display: inline-block; background: #3b2a1a; color: #fbf3e8; padding: 8px 14px; font-family: var(--sans); font-size: 15px; margin: 0; }

.mock-raw {
  background: var(--ink);
  color: #c9d1dc;
  border-radius: 4px;
  padding: 28px;
  margin: 0;
  min-height: 220px;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: auto;
}
.view-note { margin-top: 12px; color: var(--red); font-weight: 700; }
.views-links { margin-top: 24px; }

/* ---------- what we check ---------- */

.check-list { margin: 32px 0 0; border-top: 2px solid var(--ink); }
.check-list > div {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2fr;
  gap: 8px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.check-list dt { font-weight: 700; }
.check-list dd { margin: 0; color: var(--ink-soft); max-width: var(--measure); }
@media (max-width: 640px) { .check-list > div { grid-template-columns: 1fr; } }

/* ---------- how it works (a real sequence, so it is numbered) ---------- */

.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 16px; }
.steps li::before { content: counter(step); display: block; font-size: 48px; font-weight: 800; line-height: 1; margin-bottom: 12px; }
.steps p { color: var(--ink-soft); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.plan { padding: 32px; }
.plan + .plan { border-left: 1px solid var(--line); }
.plan-main { box-shadow: inset 0 4px 0 var(--green); }
.plan-price { font-size: 44px; font-weight: 800; line-height: 1; margin-bottom: 20px; }
.plan-price span { font-size: 17px; font-weight: 400; color: var(--ink-soft); }
.plan ul { padding-left: 1.2em; margin: 0 0 24px; }
.plan li { margin-bottom: 6px; }
.plan-note { font-size: 15px; color: var(--ink-soft); margin: 12px 0 0; }
.platforms { margin-top: 20px; color: var(--ink-soft); }
@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- FAQ ---------- */

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 2px solid var(--ink); }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 18px 40px 18px 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font-size: 26px; font-weight: 400; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--ink-soft); max-width: var(--measure); }

.closing { text-align: left; }

/* ---------- scanning ---------- */

.pending { text-align: center; padding: 48px 0; }
.pending h1 { overflow-wrap: anywhere; }
.pending-status { color: var(--ink-soft); }
.pending-steps { text-align: left; display: inline-block; color: var(--ink-soft); margin: 16px 0 0; }
.focus-chart { margin-bottom: 32px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; overflow: hidden; }
.focus-chart span { display: block; line-height: 1.2; overflow-wrap: anywhere; }
.focus-chart span:nth-child(1) { font-size: clamp(28px, 6vw, 56px); }
.focus-chart span:nth-child(2) { font-size: clamp(18px, 3.4vw, 32px); filter: blur(1.5px); }
.focus-chart span:nth-child(3) { font-size: clamp(12px, 2vw, 18px); filter: blur(3px); }
@media (prefers-reduced-motion: no-preference) {
  .focus-chart span { animation: refocus 2.4s ease-in-out infinite alternate; }
  @keyframes refocus { to { filter: blur(0); } }
}

.failed { max-width: 640px; }

/* ---------- results ---------- */

.result-site { font-size: 20px; font-weight: 700; margin-bottom: 2px; overflow-wrap: anywhere; }
.result-platform { color: var(--ink-soft); margin-bottom: 20px; }

.score {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 8px solid var(--ink);
  border-radius: 4px;
  padding: 24px 28px;
}
.score-num { font-size: clamp(64px, 12vw, 104px); font-weight: 800; line-height: 0.9; margin: 0; white-space: nowrap; }
.score-num small { font-size: 0.3em; font-weight: 700; color: var(--ink-soft); }
.score-label { font-size: 20px; margin-bottom: 4px; }
.score-verdict { margin: 0; color: var(--ink-soft); }
.score-critical, .score-poor { border-left-color: var(--red); }
.score-critical .score-num, .score-poor .score-num { color: var(--red); }
.score-fair { border-left-color: var(--amber); }
.score-fair .score-num { color: var(--amber); }
.score-good { border-left-color: var(--green); }
.score-good .score-num { color: var(--green); }
@media (max-width: 520px) { .score { flex-direction: column; align-items: flex-start; gap: 12px; } }

.notice { background: var(--green-wash); border-left: 4px solid var(--green); padding: 12px 16px; margin-top: 16px; }

.seen-bar {
  height: 22px;
  border-radius: 3px;
  overflow: hidden;
  background: repeating-linear-gradient(-45deg, var(--red) 0 6px, #d25366 6px 12px);
}
.seen { height: 100%; background: var(--green); }
.seen-key { display: flex; gap: 24px; font-size: 15px; color: var(--ink-soft); margin: 8px 0 24px; flex-wrap: wrap; }
.seen-key span::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border-radius: 2px; }
.key-seen::before { background: var(--green); }
.key-missed::before { background: repeating-linear-gradient(-45deg, var(--red) 0 3px, #d25366 3px 6px); }

.summary { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.summary li {
  display: grid;
  grid-template-columns: 32px minmax(180px, 1fr) 2fr;
  gap: 4px 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.summary li > span:last-child { color: var(--ink-soft); }
.row-icon {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-weight: 800; font-size: 15px; align-self: center;
}
.row-pass .row-icon { background: var(--green-wash); color: var(--green); }
.row-fail .row-icon { background: var(--red-wash); color: var(--red); }
.row-check .row-icon { background: var(--amber-wash); color: var(--amber); }
@media (max-width: 640px) {
  .summary li { grid-template-columns: 32px 1fr; }
  .summary li > span:last-child { grid-column: 2; }
}

.issue, .fix {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px 28px;
  margin-top: 16px;
  max-width: 860px;
}
.issue h3, .fix h3 { display: flex; gap: 12px; align-items: baseline; }
.issue-n {
  flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--white);
  display: inline-grid; place-items: center; font-size: 15px;
}
.priority { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.issue-high .priority { color: var(--red); }
.issue-medium .priority { color: var(--amber); }
.issue-low .priority { color: var(--ink-soft); }
.evidence-label { font-weight: 700; margin-top: 16px; }
blockquote { margin: 0 0 10px; padding: 10px 16px; border-left: 4px solid var(--red); background: var(--red-wash); }

.gate { position: relative; margin-top: 16px; max-width: 860px; }
.gate-blur { list-style: none; padding: 0; margin: 0; filter: blur(5px); user-select: none; pointer-events: none; }
.gate-blur li { background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: 20px 28px; margin-bottom: 12px; font-weight: 700; font-size: 21px; }
.gate-form {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 28px;
  margin-top: 16px;
  max-width: 520px;
}
.gate-form input[type='email'] { margin-bottom: 14px; }
.gate-form .check { font-weight: 400; font-size: 16px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.gate-form .check input { margin-top: 5px; }

.offer {
  margin-top: 48px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-top: 8px solid var(--green);
  border-radius: 4px;
  padding: 32px;
  max-width: 860px;
}
.offer ul { padding-left: 1.2em; margin-bottom: 24px; }
.offer-note { margin: 14px 0 0; font-size: 16px; }

.breakdown { margin-top: 48px; max-width: 860px; }
.breakdown summary { cursor: pointer; font-weight: 700; }
table { border-collapse: collapse; width: 100%; margin-top: 12px; font-size: 16px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { border-bottom: 2px solid var(--ink); }
.table-wrap { overflow-x: auto; }

/* ---------- Fix Pack ---------- */

.sample-banner { background: var(--amber-wash); border-left: 4px solid var(--amber); padding: 12px 16px; margin-top: 24px; }
.report-actions { margin-top: 16px; }
.fix-why { color: var(--ink-soft); }
.fix-body { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.fix-body pre {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
  overflow-x: auto;
  font-size: 15px;
  line-height: 1.5;
}
.fix-body code { font-size: 0.9em; background: var(--paper); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
.fix-body pre code { background: none; padding: 0; overflow-wrap: normal; }
.fix-body ol, .fix-body ul { padding-left: 1.3em; }
.fix-body li { margin-bottom: 6px; }

.checklist ul { list-style: none; padding: 0; max-width: 860px; border-top: 2px solid var(--ink); margin: 0; }
.checklist li { border-bottom: 1px solid var(--line); padding: 14px 0; }
.checklist label { font-weight: 400; display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.checklist input { margin-top: 6px; }

.recheck .compare { font-size: 20px; }

/* ---------- legal and admin ---------- */

.prose { max-width: var(--measure); margin-top: 24px; }
.prose h2 { font-size: 24px; margin-top: 1.6em; }
.fine { font-size: 14px; color: var(--ink-soft); }
.admin { max-width: none; }
.admin h2 { font-size: 24px; margin-top: 40px; }

/* ---------- consent banner ---------- */

.consent {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 20px;
  z-index: 20;
  font-size: 16px;
}
.consent div { display: flex; gap: 8px; flex-wrap: wrap; }
.consent button { font-size: 16px; padding: 10px 16px; }

/* ---------- print (Save as PDF) ---------- */

@media print {
  body { background: #fff; font-size: 12pt; }
  .site-header nav, .site-footer nav, .report-actions, .recheck, .again, .consent, .skip { display: none; }
  .fix, .issue, .score { break-inside: avoid; border-color: #999; }
  a { color: inherit; }
  main > section { margin-top: 32px; }
}
