:root {
  --bg: #1B1714;
  --bg-2: #221d19;
  --surface: #221d19;
  --surface-2: #2a2420;
  --fg: #ECE6DC;
  --muted: #847C71;
  --dim: #5A534A;
  --border: rgba(236, 230, 220, 0.07);
  --border-strong: rgba(236, 230, 220, 0.14);
  --accent: #FF4F00;
  --accent-strong: #E54600;
  --accent-soft: rgba(255, 79, 0, 0.08);
  --accent-line: rgba(255, 79, 0, 0.3);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --display: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  line-height: 1.55;
}

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--accent); }

/* top strip */
.top-strip {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0 24px;
  min-height: 46px;
  gap: 18px;
}

.strip-cell {
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.strip-cell.spacer { flex: 1; }

.strip-cell.brand {
  color: var(--fg);
  font-weight: 700;
  letter-spacing: 0.32em;
  font-size: 0.85rem;
}
.strip-cell.brand a { color: inherit; }
.strip-cell.brand a:hover { color: var(--accent); }

.strip-cell.tagline { color: var(--muted); }
.strip-cell.stacked { gap: 8px; }
.strip-cell.stacked .mono-tiny::after { content: '·'; margin-left: 8px; color: var(--dim); }

.strip-cell.status .dot {
  width: 6px;
  height: 6px;
  background: var(--muted);
  flex-shrink: 0;
  border-radius: 50%;
}
.strip-cell.status.live { color: var(--fg); }
.strip-cell.status.live .dot {
  background: var(--accent);
  animation: blink 1.2s step-end infinite;
  box-shadow: 0 0 8px rgba(255, 79, 0, 0.6);
}
.strip-cell.status.err { color: var(--accent); }
.strip-cell.status.err .dot { background: var(--accent); }

@keyframes blink { 50% { opacity: 0.25; } }

.port-btn { color: var(--muted); padding: 14px 0; }
.port-btn:hover { color: var(--accent); text-decoration: none; }
.port-btn .arrow { font-size: 0.9rem; margin-left: 2px; }

/* layout */
.grid {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 32px;
}
.grid.single { max-width: 640px; }

@media (max-width: 720px) {
  .grid { padding: 0 18px; }
}

/* sectioned blocks */
.block {
  position: relative;
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
}
.block:last-of-type { border-bottom: none; }

.block h2 {
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 18px;
  line-height: 1.25;
}

.block-sub {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--fg);
  margin-bottom: 22px;
  line-height: 1.6;
  max-width: 64ch;
}
.block-sub.muted { color: var(--muted); }
.block-sub code {
  font-family: var(--mono);
  background: var(--surface-2);
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.85em;
  color: var(--fg);
}

/* hero wordmark (legacy single-page hero) */
.block.hero { padding-top: 88px; padding-bottom: 64px; border-bottom: 1px solid var(--border-strong); }
.block.hero::before { display: none; }

/* key-value list */

/* steps */

/* tags */

/* code blocks */
.code-block {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px 16px;
  font-size: 0.72rem;
  color: var(--fg);
  cursor: pointer;
  word-break: break-all;
  margin-bottom: 8px;
  border-radius: 6px;
  transition: border-color 0.15s;
}
.code-block:last-child { margin-bottom: 0; }
.code-block:hover { border-color: var(--accent-line); }
.code-block code {
  font-family: var(--mono);
  font-size: 0.75rem;
}
.code-block .copied {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 0.55rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  opacity: 0;
  transition: opacity 0.2s;
}
.code-block .copied.show { opacity: 1; }

/* CTA buttons */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cta:hover {
  background: var(--surface-2);
  color: var(--accent);
  border-color: var(--accent-line);
  text-decoration: none;
}
.cta-primary {
  border-color: var(--accent);
  color: var(--bg);
  background: var(--accent);
}
.cta-primary:hover {
  background: var(--accent-strong);
  color: var(--bg);
  border-color: var(--accent-strong);
  filter: brightness(1.05);
}
.cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.batch-actions {
  margin-top: 20px;
}
.batch-actions .cta {
  min-width: 220px;
}

/* passphrase row (homepage redeem) */

/* drop zone */
.drop-zone {
  border: 2px dashed var(--border-strong);
  padding: 48px 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 200px;
  justify-content: center;
  background: var(--surface);
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.drop-icon {
  font-size: 2rem;
  color: var(--accent);
  font-weight: 300;
  line-height: 1;
}
.drop-label {
  font-size: 0.92rem;
  color: var(--fg);
}
.drop-label strong {
  color: var(--accent);
  font-weight: 600;
}
.drop-hint {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
input[type=file] { display: none; }

/* status / progress */

.transport {
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: var(--mono);
  margin-bottom: 12px;
  min-height: 0.62rem;
}

.filename {
  font-size: 0.85rem;
  color: var(--fg);
  font-family: var(--mono);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px 14px;
  word-break: break-all;
  margin-bottom: 8px;
  border-radius: 6px;
}

.size-info {
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  font-family: var(--mono);
}

.progress-wrap { width: 100%; margin: 12px 0; }
.progress-bar {
  background: var(--surface-2);
  border: 1px solid var(--border);
  height: 12px;
  overflow: hidden;
  position: relative;
  border-radius: 4px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.15s linear;
  box-shadow: 0 0 10px rgba(255, 79, 0, 0.5);
}
.progress-text {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  font-family: var(--mono);
}
.speed-info {
  font-size: 0.62rem;
  color: var(--dim);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  font-family: var(--mono);
}

.checkmark {
  font-family: var(--mono);
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 4px;
  line-height: 1;
}

/* Connecting dots */
.dots {
  display: flex;
  gap: 5px;
  margin: 14px 0;
}
.dots span {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 1.2s step-end infinite;
}
.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }

.hidden { display: none !important; }

/* receive passphrase box */
.recv-line { display: flex; gap: 10px; margin-top: 12px; }
.recv-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  color: var(--fg);
  font: 600 16px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 2px;
  outline: none;
  min-width: 0;
  flex: 1;
}
.recv-input::placeholder { color: var(--dim); }
.recv-input:focus { border-color: var(--accent); }
.recv-go {
  font: 600 13px/1 var(--mono);
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  flex-shrink: 0;
}
.recv-go:hover { background: var(--accent); color: var(--bg); }
.recv-err {
  font: 500 12px/1.4 var(--mono);
  color: var(--accent);
  margin-top: 8px;
}
.recv-err:empty { display: none; }

/* phrase display */
.phrase-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  margin-bottom: 12px;
  border-radius: 8px;
}
.phrase-display .phrase-words {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-align: center;
  cursor: pointer;
  user-select: all;
}
.phrase-display .phrase-hint {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: var(--mono);
}

/* QR canvas, kept light so phones scan it cleanly */
.qr-wrap {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}
.qr-wrap canvas {
  background: var(--fg);
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}

/* flow animation */

/* SVG nodes for the hero diagram */

@media (prefers-reduced-motion: reduce) {
  .strip-cell.status.live .dot { animation: none; }
  .dots span { animation: none; opacity: 0.6; }
}

/* landing page */

/* Section frame: shared container around each section's content */

/* Section head: number, title, hairline rule */

/* hero */

@media (max-width: 540px) { .hero-actions .cta { flex: 1; justify-content: center; } }

/* explain (how it works) */

/* commands (use it) */

/* host (self-host) */

/* bottom strip */
.bottom-strip {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 64px;
  padding: 18px 32px;
  gap: 24px;
}
.bottom-strip .strip-cell { padding: 0; }
.bottom-strip .spacer { flex: 1; }
.bottom-strip a { color: var(--fg); }
.bottom-strip a:hover { color: var(--accent); }

@media (max-width: 720px) {
  .top-strip { font-size: 0.6rem; padding: 0 16px; gap: 12px; }
  .top-strip .stacked, .top-strip .tagline { display: none; }
  .bottom-strip { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 18px; }
  .bottom-strip .spacer { display: none; }
}

/* ===== minimal landing ===== */

.hero-cta .cta {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: none;
  font-family: var(--sans);
  font-weight: 600;
  padding: 16px 36px;
  border-radius: 999px;
}
.hero-cta .cta .arrow {
  margin-left: 4px;
  transition: transform 0.15s;
  display: inline-block;
}
.hero-cta .cta:hover .arrow { transform: translateX(3px); }

/* override the inherited .hero-phrase styles for the cleaner landing */

