/* Ophthalmology Hub: the front page and the shared look of the at-home checks.
   White page, graphite ink, one amber accent. The Amsler grid itself is the picture. */
@font-face {
  font-family: 'Figtree';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/figtree-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/figtree-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/figtree-latin-700-normal.woff2') format('woff2');
}

:root {
  --color-page: #ffffff;
  --color-mist: #f3f4f6;
  --color-graphite: #23272e;
  --color-muted: #5b626c;
  --color-line: #d5d8dd;
  --color-on-dark-muted: #c3c7cd;
  --color-amber: #f2a900;
  --color-amber-press: #e09d00;
  --font-sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --target-min: 48px;
  --radius-tile: 28px;
  --radius-pill: 999px;
  --page-max: 68rem;
  --gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-graphite);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.5;
}
:focus-visible {
  outline: 3px solid var(--color-graphite);
  outline-offset: 3px;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip {
  position: absolute;
  inset-inline-start: 8px;
  top: -100px;
  z-index: 1;
  padding: 12px 16px;
  background: var(--color-page);
  font-weight: 600;
  border-radius: 12px;
}
.skip:focus {
  top: 8px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--target-min);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.mark {
  width: 28px;
  height: 28px;
  flex: none;
}
.top-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  color: var(--color-muted);
  font-weight: 600;
  text-decoration: none;
}
.top-link:hover {
  color: var(--color-graphite);
  text-decoration: underline;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 28px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms;
}
.button-main {
  background: var(--color-amber);
  color: var(--color-graphite);
}
.button-main:hover {
  background: var(--color-amber-press);
}
.button-dark {
  background: var(--color-graphite);
  color: #fff;
}
.button-dark:hover {
  background: #000;
}
.button-plain {
  background: var(--color-page);
  border-color: var(--color-graphite);
  color: var(--color-graphite);
}
.button-plain:hover {
  background: var(--color-mist);
}
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  font-weight: 600;
}

/* Amsler grid drawing, shared by the front page and the check */
.button-light {
  background: #fff;
  color: var(--color-graphite);
}
.button-outline-light {
  border-color: #fff;
  color: #fff;
}
.button-outline-light:hover {
  background: #33383f;
}
.button-light:hover {
  background: var(--color-mist);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.top-nav {
  display: flex;
  gap: 20px;
  white-space: nowrap;
}

/* Feature panels: one product each, centred, full width, like a product line-up. */
.wrap-wide {
  width: calc(100% - 2 * 12px);
  max-width: 84rem;
  margin-inline: auto;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
  padding: 56px var(--gutter) 0;
  border-radius: var(--radius-tile);
  text-align: center;
  overflow: hidden;
}
.feature h2 {
  max-width: 16ch;
  font-size: clamp(2.125rem, 6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.tagline {
  max-width: 34rem;
  margin-top: 16px;
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.4;
  text-wrap: pretty;
}
.feature-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.feature-light {
  background: var(--color-mist);
}
.feature-light .tagline {
  color: var(--color-muted);
}
.feature-dark {
  background: var(--color-graphite);
  color: #fff;
}
.feature-dark .tagline {
  color: var(--color-on-dark-muted);
}
.feature-dark :focus-visible {
  outline-color: #fff;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding-inline: 20px;
  border: 2px solid #5b626c;
  border-radius: var(--radius-pill);
  color: #fff;
  font-weight: 600;
}

/* A drawing of the quiz screen, built from the quiz's own parts. */
.quiz-shot {
  width: min(100%, 26rem);
  margin-top: 48px;
  padding: 22px 20px 28px;
  background: #fff;
  border-radius: 28px 28px 0 0;
  text-align: start;
}
.shot-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shot-timer {
  font-size: 1.5rem;
  font-weight: 700;
}
.shot-minutes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.shot-minutes i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-line);
}
.shot-minutes i.on {
  background: var(--color-graphite);
}
.shot-nav {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.shot-nav span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid #8a9099;
  border-radius: 50%;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-muted);
}
.shot-nav .done {
  background: var(--color-graphite);
  border-color: var(--color-graphite);
  color: #fff;
}
.shot-nav .now {
  border: 3px solid var(--color-graphite);
  color: var(--color-graphite);
  box-shadow: 0 0 0 4px #fff4d6;
}
.shot-stem {
  display: grid;
  gap: 8px;
  margin-block: 22px 16px;
}
.shot-stem i,
.shot-option i {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: var(--color-line);
}
.shot-stem i.short {
  width: 60%;
}
.shot-option {
  margin-top: 10px;
  padding: 16px;
  border-radius: 14px;
  background: var(--color-mist);
}
.shot-option i {
  width: 70%;
}
.shot-option.chosen {
  background: #fff;
  box-shadow: inset 0 0 0 2.5px var(--color-graphite);
}
.shot-option.chosen i {
  background: var(--color-graphite);
}

.rings {
  width: min(100%, 32rem);
  height: auto;
  margin-block: 48px 56px;
}

/* The two doors: For Everyone and For Professionals (DEC-039). */
.intro {
  padding-block: 40px 8px;
  text-align: center;
}
.intro h1 {
  font-size: clamp(2.375rem, 7vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.intro-lead {
  max-width: 32rem;
  margin: 16px auto 0;
  color: var(--color-muted);
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.4;
  text-wrap: pretty;
}
.doors {
  display: grid;
  gap: 12px;
  margin-top: 36px;
  text-align: start;
}
.door {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 12rem;
  padding: 28px 24px 24px;
  border-radius: var(--radius-tile);
  text-decoration: none;
  transition: transform 180ms ease-out;
}
.door:hover {
  transform: translateY(-2px);
}
.door:active {
  transform: translateY(0);
}
.door-dark {
  background: var(--color-graphite);
  color: #fff;
}
.door-dark:focus-visible {
  outline-color: var(--color-amber);
}
.door-light {
  background: var(--color-mist);
}
.door-art {
  width: 7.5rem;
  height: auto;
  margin-bottom: 24px;
}
.door-name {
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.door-text {
  max-width: 24rem;
  margin-top: 8px;
  padding-inline-end: 56px;
  font-size: 1.0625rem;
}
.door-dark .door-text {
  color: var(--color-on-dark-muted);
}
.door-light .door-text {
  color: var(--color-muted);
}
.door-go {
  position: absolute;
  inset-inline-end: 20px;
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.door-dark .door-go {
  background: var(--color-amber);
  color: var(--color-graphite);
}
.door-light .door-go {
  background: var(--color-graphite);
  color: #fff;
}
.door-go svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The two parts */
html.home {
  scroll-behavior: smooth;
}
.part {
  padding-top: 48px;
  scroll-margin-top: 12px;
}
.part-head {
  padding-block: 40px 8px;
  text-align: center;
}
.part-head h2 {
  font-size: clamp(2.125rem, 6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.eyebrow {
  margin-bottom: 10px;
  color: var(--color-amber);
  font-weight: 700;
  font-size: 1.0625rem;
}
.eyebrow-dark {
  color: var(--color-muted);
}
.feature-title {
  max-width: 18ch;
  font-size: clamp(1.875rem, 5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.part-next {
  margin-top: 28px;
  color: var(--color-muted);
  font-weight: 600;
  text-align: center;
  text-wrap: pretty;
}
.top-quiz {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding-inline: 20px;
  border-radius: var(--radius-pill);
  background: var(--color-amber);
  color: var(--color-graphite);
  font-weight: 700;
  text-decoration: none;
}
.top-quiz:hover {
  background: var(--color-amber-press);
}

.tiles {
  display: grid;
  gap: 12px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  text-align: start;
}
.tile {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--color-mist);
  border-radius: var(--radius-tile);
}
.tile-art {
  display: block;
  width: 100%;
  max-width: 14rem;
  height: auto;
  margin-bottom: 20px;
}
.tile h3 {
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.tile p {
  margin-block: 8px 20px;
  color: var(--color-muted);
}
.tile-button {
  align-self: flex-start;
  margin-top: auto;
}
.tile .status {
  margin-top: auto;
  padding-top: 20px;
  color: var(--color-graphite);
  font-weight: 600;
}

.levels {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 8px;
  max-width: 22rem;
  min-height: 110px;
}
.lv {
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.9375rem;
}
.lv1 {
  background: var(--color-graphite);
  color: #fff;
}

/* Footer */
.foot {
  margin-top: 72px;
  display: grid;
  gap: 4px;
  padding-block: 24px max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 1rem;
}

@media (min-width: 760px) {
  .wrap-wide {
    width: calc(100% - 2 * 20px);
  }
  .feature {
    padding-top: 80px;
  }
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .tile {
    padding: 40px 36px;
  }
  .tile-wide {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 36px;
  }
  .tile-wide .tile-art {
    flex: 0 0 40%;
    margin-bottom: 0;
  }
  .tile-body {
    display: flex;
    flex-direction: column;
  }
  .doors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .door {
    min-height: 15rem;
    padding: 40px 36px 32px;
  }
  .intro {
    padding-top: 64px;
  }
}
/* On a phone the two doors stand in for the section links; the quiz link always stays. */
@media (max-width: 640px) {
  .top-link-section {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.home {
    scroll-behavior: auto;
  }
  .button,
  .door {
    transition: none;
  }
  .door:hover {
    transform: none;
  }
}
