:root {
  --indigo: #10152b;
  --indigo-2: #161d3a;
  --indigo-3: #212a52;
  --chalk: #efe6d2;
  --chalk-dim: #c9c2b0;
  --lilac: #a9a6d4;
  --lemon: #f1d95c;
  --line: rgba(239, 230, 210, 0.14);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 5vw, 56px);
}

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 80% at 70% 0%, var(--indigo-2) 0%, var(--indigo) 60%);
  background-color: var(--indigo);
  color: var(--chalk);
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

/* Ukara-cloth backdrop: a faint grid of marks, filled in by glyphs.js */
.cloth {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.045;
  background-size: 240px 240px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  pointer-events: none;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--gutter);
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-mark { width: 26px; height: 26px; }
.brand-mark path, .card-glyph path, .card-glyph circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--chalk-dim);
  border-bottom: 1px solid transparent;
}
.top-link:hover { color: var(--chalk); border-bottom-color: var(--chalk); }

main { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  min-height: min(78vh, 760px);
  padding: clamp(24px, 6vh, 64px) 0 clamp(48px, 10vh, 96px);
}

.eyebrow, .section-label {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lilac);
  margin: 0 0 20px;
}

h1 {
  font-weight: 300;
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  text-wrap: balance;
  font-variation-settings: "opsz" 144;
}

.lede {
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--chalk-dim);
  max-width: 34ch;
  margin: 0 0 36px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-solid { background: var(--chalk); color: var(--indigo); }
.btn-solid:hover { background: var(--lemon); }
.btn-ghost { border: 1px solid var(--line); color: var(--chalk); }
.btn-ghost:hover { border-color: var(--chalk); }

/* The drawing panel */
.panel {
  margin: 0;
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 480px;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(239,230,210,0.045) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(239,230,210,0.045) 39px 40px),
    var(--indigo-3);
  box-shadow: inset 0 0 80px rgba(0,0,0,0.35);
}

.glyph { width: 100%; height: 100%; padding: 14%; display: block; }
.glyph path, .glyph circle, .glyph rect {
  fill: none;
  stroke: var(--chalk);
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.glyph .dot { fill: var(--chalk); stroke: none; }

.glyph.drawing path, .glyph.drawing circle, .glyph.drawing rect {
  animation: draw 1.6s cubic-bezier(.6,.05,.3,1) both;
}
.glyph.drawing .dot { animation: dot 0.5s ease-out both; }
.glyph.erasing { animation: fade 0.6s ease-in both; }

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dot { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }
@keyframes fade { to { opacity: 0; } }

.glyph .dot { transform-box: fill-box; transform-origin: center; }

.panel figcaption {
  position: absolute;
  left: 16px;
  bottom: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--chalk-dim);
  opacity: 0.7;
}

/* From the lab */
.lab { padding: 24px 0 72px; border-top: 1px solid var(--line); padding-top: 48px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(22, 29, 58, 0.6);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.card-live:hover { border-color: var(--chalk); transform: translateY(-2px); }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  margin-bottom: auto;
}

.status { padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; }
.status-live { color: var(--indigo); background: var(--lemon); border-color: var(--lemon); }

.card h3 {
  font-weight: 400;
  font-size: 34px;
  letter-spacing: -0.01em;
  margin: 48px 0 6px;
}
.card p { margin: 0 0 18px; color: var(--chalk-dim); }
.card-link { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; }

.card-locked { color: var(--chalk-dim); }
.card-glyph { width: 64px; height: 64px; margin: 40px 0 14px; opacity: 0.45; }
.card-glyph .dot { fill: currentColor; stroke: none; }
.card-locked .hush { margin: 0; font-style: italic; opacity: 0.7; }

/* Why */
.why {
  border-top: 1px solid var(--line);
  padding: 48px 0 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px;
}
.why p { margin: 0; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.4; max-width: 30ch; }

.foot {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--chalk-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.foot p { margin: 0; }
.foot a { text-decoration: none; border-bottom: 1px solid var(--line); }
.foot a:hover { color: var(--chalk); border-bottom-color: var(--chalk); }
.foot .fine { opacity: 0.6; flex-basis: 100%; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .panel { justify-self: stretch; max-width: none; order: -1; max-height: 70vw; aspect-ratio: auto; height: 70vw; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .card h3 { margin-top: 28px; }
  .card-glyph { margin-top: 24px; }
  .why { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glyph.drawing path, .glyph.drawing circle, .glyph.drawing rect, .glyph.drawing .dot, .glyph.erasing { animation: none; }
}
