/* LaminarByte, under construction. One screen, one moving idea: laminar flow around a byte. */

@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --ink: #0c2236;
  --ink-2: #344b5f;
  --ink-3: #536a7e;
  --rule: rgba(12, 34, 54, 0.12);
  --lb-ink: #0c2236;
  --lb-cell: #1488a6;
  --accent-text: #0e6f89;
  --focus: #1488a6;
  /* Read by flow.js. */
  --flow-line: rgba(12, 34, 54, 0.1);
  --flow-dot: rgba(20, 136, 166, 0.85);
  --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-ui: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #071521;
    --ink: #e7f0f6;
    --ink-2: #b4c6d4;
    --ink-3: #8ea3b4;
    --rule: rgba(231, 240, 246, 0.14);
    --lb-ink: #e7f0f6;
    --lb-cell: #3fbfe0;
    --accent-text: #6fd2ec;
    --focus: #3fbfe0;
    --flow-line: rgba(180, 214, 234, 0.11);
    --flow-dot: rgba(63, 191, 224, 0.9);
  }
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: color-mix(in srgb, var(--lb-cell) 28%, transparent);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

.flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* The flow is the picture; the words sit in still water. */
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.16) 36%, #000 62%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.16) 36%, #000 62%);
}

.page {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  max-width: 1240px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

/* ── The lockup ─────────────────────────────────────────────────────── */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 8px;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  border-radius: 8px;
}

.lockup-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
}

.lb-mark {
  width: 100%;
  height: 100%;
  color: var(--lb-ink);
  overflow: visible;
}

.lb-cell {
  fill: var(--lb-cell);
}

.wordmark {
  font-family: var(--font-ui);
  font-weight: 620;
  font-size: 1.3rem;
  letter-spacing: -0.012em;
  line-height: 1;
}

.wm-byte {
  color: var(--accent-text);
}

.top-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 540;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.top-nav a:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

/* ── The hero ───────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding-block: clamp(40px, 8vh, 96px);
}

.copy {
  max-width: 40rem;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  font-size: clamp(2.75rem, 1.4rem + 5vw, 5.75rem);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede {
  margin: 28px 0 0;
  max-width: 30ch;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 580;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, box-shadow 200ms ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 1px 2px rgba(7, 21, 33, 0.18), 0 8px 24px -12px rgba(7, 21, 33, 0.45);
}

.btn-primary:hover {
  box-shadow: 0 1px 2px rgba(7, 21, 33, 0.2), 0 14px 30px -14px rgba(7, 21, 33, 0.55);
}

.btn:active {
  transform: scale(0.98);
}

.btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform 220ms var(--ease-out);
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

.product-line {
  margin: 0;
  max-width: 24ch;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--ink-3);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 56px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--ink-3);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lb-cell);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--lb-cell) 45%, transparent);
  animation: breathe 2.8s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lb-cell) 40%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--lb-cell) 0%, transparent); }
}

.stage {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: min(100%, 360px);
  justify-self: center;
}

.stage-mark {
  display: inline-flex;
  width: 72%;
  height: 72%;
}

/* ── The footer ─────────────────────────────────────────────────────── */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-3);
}

.foot a {
  color: var(--ink-2);
  text-decoration: none;
}

.foot a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ── Arrival: one orchestrated entrance, from already-visible content ── */

@media (prefers-reduced-motion: no-preference) {
  .copy > *,
  .stage {
    animation: rise 900ms var(--ease-out) both;
  }
  .copy > :nth-child(2) { animation-delay: 70ms; }
  .copy > :nth-child(3) { animation-delay: 140ms; }
  .copy > :nth-child(4) { animation-delay: 210ms; }
  .stage { animation-name: settle; animation-duration: 1400ms; animation-delay: 120ms; }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none; }
}

@keyframes rise {
  from { opacity: 0.001; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes settle {
  from { opacity: 0.001; transform: scale(0.94); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ── Narrow screens: the mark leads, the copy follows ───────────────── */

@media (max-width: 860px) {
  .flow {
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 30%, rgba(0, 0, 0, 0.14) 44%, rgba(0, 0, 0, 0.14) 100%);
    mask-image: linear-gradient(180deg, #000 0, #000 30%, rgba(0, 0, 0, 0.14) 44%, rgba(0, 0, 0, 0.14) 100%);
  }
  .hero {
    grid-template-columns: 1fr;
    align-content: center;
    padding-block: 24px 40px;
  }
  .stage {
    order: -1;
    width: min(46vw, 200px);
    justify-self: start;
  }
  .lede { margin-top: 20px; }
  .actions { margin-top: 32px; }
  .status { margin-top: 40px; }
}

@media (max-width: 420px) {
  .top-nav a { padding-inline: 8px; }
  .foot { flex-direction: column; gap: 6px; }
}

/* The 404 page: one column. */
.hero-single {
  grid-template-columns: minmax(0, 1fr);
}
