/* ocuscreen.app — site styles. Layered on top of tokens.css. */

/* ---------------------------------------------------------------- base */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0 0 var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-primary-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-primary-darker);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

strong {
  font-weight: 600;
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------------------------------------------------------ layout */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.band {
  padding-block: clamp(3.5rem, 8vw, var(--space-3xl));
  border-top: 1px solid var(--color-border);
}

.band--plain {
  border-top: 0;
}

.band__head {
  max-width: 46rem;
  margin-bottom: var(--space-xl);
}

.band__head h2 {
  font-size: var(--fs-h2);
}

.band__head p {
  margin-top: var(--space-md);
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  max-width: var(--measure);
}

.eyebrow {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-text);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip:focus {
  left: 0;
}

/* ------------------------------------------------------------ header */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 250, 248, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-text);
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
}

.brand__mark {
  width: 30px;
  height: 20px;
  color: var(--color-primary);
  flex: none;
}

.nav {
  display: none;
  gap: var(--space-lg);
}

.nav a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--color-primary-deep);
}

@media (min-width: 62rem) {
  .nav {
    display: flex;
  }
}

/* -------------------------------------------------------------- links */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.15rem;
  background: var(--color-primary-deep);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--color-primary-darker);
  color: #fff;
}

.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.9375rem;
}

.btn--store {
  padding: 0.7rem 1.4rem 0.7rem 0.8rem;
}

.btn--store:hover {
  transform: translateY(-1px);
}

.btn__icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  flex: none;
}

.btn__label {
  display: grid;
  text-align: left;
  line-height: 1.15;
}

.btn__label small {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.btn__label span {
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.textlink {
  font-weight: 550;
}

/* --------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(120% 90% at 50% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 65%),
    var(--color-bg);
}

.hero__inner {
  position: relative;
  z-index: 1;
}

/* Faint linework of the same eye used in the brand mark: room atmosphere,
   not illustration. Hidden where it would crowd the headline. */
.hero__iris {
  display: none;
}

@media (min-width: 68rem) {
  .hero__iris {
    display: block;
    position: absolute;
    top: 50%;
    right: -6rem;
    width: 34rem;
    transform: translateY(-50%);
    color: var(--color-primary);
    opacity: 0.09;
    pointer-events: none;
    z-index: 0;
  }
}

.chart {
  position: relative;
  margin: 0;
}

.chart__row {
  display: block;
  position: relative;
  padding-block: 0.12em 0.18em;
  letter-spacing: -0.035em;
  line-height: 1;
  text-wrap: nowrap;
}

/* Full-bleed hairlines: the ruled rows of a chart on the far wall. */
.chart__row + .chart__row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  border-top: 1px solid var(--color-rule);
}

.chart__row:nth-child(1) {
  font-size: var(--fs-row-1);
}

.chart__row:nth-child(2) {
  font-size: var(--fs-row-2);
}

.chart__row:nth-child(3) {
  font-size: var(--fs-row-3);
  color: var(--color-primary-deep);
}

.hero__lead {
  margin-top: var(--space-xl);
  max-width: 36rem;
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-lg);
}

.hero__fineprint {
  margin: 0;
  max-width: 18rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------- notice */

.notice {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  max-width: 52rem;
}

.band--notice .notice {
  margin-top: 0;
  margin-inline: auto;
}

.notice p {
  font-size: 1.0625rem;
}

.notice__statement {
  font-weight: 550;
}

.notice__aside {
  margin-top: var(--space-md);
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* ------------------------------------------------------------- checks */

.group {
  display: grid;
  gap: var(--space-md) var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.group + .group {
  margin-top: var(--space-xl);
}

.group__label {
  font-size: var(--fs-h3);
  letter-spacing: -0.015em;
}

.group__label span {
  display: block;
  margin-top: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.checklist {
  display: grid;
  gap: 0;
}

.checklist dt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.checklist dd {
  margin: 0.15rem 0 0;
  color: var(--color-text-muted);
  max-width: 42rem;
}

.checklist dd + dt {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.notes {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.note-row {
  display: grid;
  gap: var(--space-2xs) var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.note-row__label {
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
}

@media (min-width: 48rem) {
  .group {
    grid-template-columns: 15rem 1fr;
  }

  .note-row {
    grid-template-columns: 15rem 1fr;
  }
}

/* ---------------------------------------------------------- highlight */

.highlight {
  margin-top: var(--space-xl);
  padding: var(--space-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.highlight__badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.highlight__title {
  margin-top: var(--space-md);
  max-width: 34rem;
  font-size: clamp(1.375rem, 2.6vw, 1.75rem);
}

.highlight__body {
  margin-top: var(--space-md);
  max-width: 42rem;
  font-size: var(--fs-lead);
}

.highlight__body + p {
  margin-top: var(--space-sm);
  max-width: 42rem;
  color: var(--color-text-muted);
}

/* -------------------------------------------------------------- steps */

.steps {
  display: grid;
  gap: var(--space-lg);
  counter-reset: step;
}

.step {
  padding-top: var(--space-md);
  border-top: 2px solid var(--color-text);
}

.step__no {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  color: var(--color-primary-deep);
}

.step h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-xs);
}

.step p {
  color: var(--color-text-muted);
}

.bands {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-md);
  padding: 0;
}

.bands li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  flex: none;
}

.dot--green {
  background: var(--color-success);
}

.dot--orange {
  background: var(--color-caution);
}

.dot--red {
  background: var(--color-danger);
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl) var(--space-2xl);
  }
}

@media (min-width: 68rem) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
  }
}

/* ---------------------------------------------------------- languages */

.langs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: var(--space-xs) var(--space-md);
}

.langs li {
  padding-block: var(--space-xs);
  border-top: 1px solid var(--color-border);
  font-size: 1rem;
}

/* ------------------------------------------------------------ privacy */

.privacy {
  display: grid;
  gap: var(--space-lg) var(--space-2xl);
  align-items: start;
}

.privacy__points {
  display: grid;
  gap: var(--space-md);
}

.privacy__points li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.privacy__points li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.privacy__points svg {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.28rem;
  flex: none;
  color: var(--color-primary);
}

@media (min-width: 56rem) {
  .privacy {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------------------------------------------------------------- faq */

.faq {
  display: grid;
  gap: var(--space-lg) var(--space-2xl);
}

.faq h3 {
  font-size: 1.0625rem;
  margin-bottom: var(--space-xs);
}

.faq p {
  color: var(--color-text-muted);
  max-width: 34rem;
}

.faq__item {
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

@media (min-width: 56rem) {
  .faq {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ------------------------------------------------------------- footer */

.footer {
  padding-block: var(--space-2xl);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer__grid {
  display: grid;
  gap: var(--space-lg) var(--space-2xl);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  font-size: 0.9375rem;
}

.footer__meta {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

@media (min-width: 56rem) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }

  .footer__links {
    justify-content: flex-end;
  }
}

/* --------------------------------------------------------- policy page */

.doc {
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem);
}

.doc__layout {
  display: grid;
  gap: var(--space-xl) var(--space-2xl);
  align-items: start;
}

.doc__head {
  max-width: 46rem;
  margin-bottom: var(--space-xl);
}

.doc__head h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  letter-spacing: -0.03em;
}

.doc__updated {
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.toc {
  display: none;
}

.toc__title {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.toc ol {
  display: grid;
  gap: var(--space-xs);
  counter-reset: toc;
}

.toc a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.toc a:hover {
  color: var(--color-primary-deep);
}

@media (min-width: 62rem) {
  .doc__layout {
    grid-template-columns: 14rem minmax(0, 1fr);
  }

  .toc {
    display: block;
    position: sticky;
    top: 5.5rem;
    padding-left: var(--space-md);
    border-left: 1px solid var(--color-border);
  }
}

.prose {
  max-width: 38rem;
  font-size: 1.0625rem;
}

.prose h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  font-size: 1.5rem;
  scroll-margin-top: 6rem;
}

.prose h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-2xs);
  font-size: 1.125rem;
}

.prose > p:first-child {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
}

.prose ul {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.prose ul li {
  position: relative;
  padding-left: 1.1rem;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
}

.prose .notice {
  margin-top: var(--space-lg);
  max-width: none;
}

.prose .notice + p {
  margin-top: var(--space-md);
}

/* -------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  .chart__row,
  .hero__lead,
  .hero__cta {
    animation: settle 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  /* Read down the chart, one row at a time. */
  .chart__row:nth-child(1) { animation-delay: 0.04s; }
  .chart__row:nth-child(2) { animation-delay: 0.16s; }
  .chart__row:nth-child(3) { animation-delay: 0.28s; }
  .hero__lead { animation-delay: 0.4s; }
  .hero__cta { animation-delay: 0.48s; }

  .hero__iris {
    animation: focus-in 1.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes focus-in {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(1.06);
  }
  to {
    opacity: 0.09;
    transform: translateY(-50%) scale(1);
  }
}

@media print {
  .masthead,
  .hero__iris,
  .toc {
    display: none;
  }

  body {
    background: #fff;
  }
}
