/* Landing page — translated from "Landing Page.dc.html". Author against the tokens in tokens.css. */

body {
  margin: 0;
  background: var(--surface-100);
  font-family: var(--font-sans);
  color: var(--text-primary);
}

a {
  color: var(--text-link);
  text-decoration: none;
}
a:hover {
  color: var(--text-link-hover);
}
a:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus-flush);
}

/* Readable by screen readers and crawlers, not drawn. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface-page);
  overflow: hidden;
}

/* Slow drift across the surface greys. */
@keyframes om-drift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.drift {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    var(--surface-0) 0%,
    var(--surface-100) 18%,
    var(--canvas-200) 38%,
    var(--line-300) 56%,
    var(--canvas-200) 74%,
    var(--surface-100) 88%,
    var(--surface-0) 100%
  );
  background-size: 260% 260%;
  animation: om-drift 32s var(--ease-standard) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .drift { animation: none; }
}

/* Survey grid, scan line and traces — drawn by js/field.js. */
.field {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Mono uppercase label used in the footer. */
.label {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-primary);
}

.site-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-96) var(--space-40);
}
.site-main h1 {
  position: relative;
  display: flex;
  margin: 0;
}

/* Outline frame behind the mark — only visible while the intro wipes the plate in. */
.site-main h1::before {
  content: "";
  position: absolute;
  inset: 0;
  border: var(--border-mark) solid var(--ink-900);
}

/* LogoMark (components/brand/Logo.jsx) at size 208 — every value is the
   component's 64px geometry scaled by 208/64 and rounded the same way. */
.logo-mark {
  position: relative;
  width: 208px;
  height: 208px;
  box-sizing: border-box;
  background: var(--ink-900);
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 29px;
  gap: 13px;
  flex: none;
}
.logo-mark__type {
  font: 700 81px/0.9 var(--font-display);
  letter-spacing: -0.05em;
  color: var(--surface-100);
}
.logo-mark__rule {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  height: 10px;
  background: var(--accent-rule);
}

/* While js/logo.js cycles a glyph through digits, hold its slot at the final
   glyph's width so the line doesn't jitter. */
.logo-mark__glyph.is-scrambling {
  display: inline-block;
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
}

/* Reading head that sweeps the rule while idle. */
.logo-mark__rule::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 20%;
  background: var(--accent-100);
  transform: translateX(-100%);
}

/* Intro: the frame shows, the plate wipes in, 2M/RW decode (js/logo.js), the
   rule draws, then the reading head sweeps every 8s. js/logo.js adds
   .logo-intro once the display font is ready. Until then the plate is held
   back; if the script never runs, the hold simply expires after 3s. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .logo-mark {
    animation: logo-hold 3s;
  }
  .logo-intro .logo-mark {
    animation: logo-wipe 440ms var(--ease-standard) both;
  }
  .logo-intro .logo-mark__rule {
    transform-origin: left;
    animation: logo-rule-draw 420ms var(--ease-out) 860ms both;
  }
  .logo-intro .logo-mark__rule::after {
    animation: logo-scan 8s linear 1.4s infinite;
  }
}

@keyframes logo-hold {
  from, to { clip-path: inset(0 100% 0 0); }
}
@keyframes logo-wipe {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0); }
}
@keyframes logo-rule-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes logo-scan {
  0%        { transform: translateX(-100%); }
  14%, 100% { transform: translateX(500%); }
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-32);
  flex-wrap: wrap;
  padding: var(--space-18) var(--space-40);
}
.tagline {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.tagline__tab {
  display: block;
  width: 8px;
  height: 8px;
  background: var(--accent-rule);
}

@media (max-width: 480px) {
  .site-main,
  .site-footer {
    padding-left: var(--space-20);
    padding-right: var(--space-20);
  }
  .site-footer {
    gap: var(--space-12);
  }
}
