/* Entropic Labs site. Hand-written from the Stitch export (stitch_entropic_labs/),
   with no external fonts, scripts or icon sets so the site makes no third-party
   requests. Colours are the Stitch design tokens. */

:root {
  color-scheme: dark;
  --surface: #10131a;
  --surface-lowest: #0b0e14;
  --surface-low: #191c22;
  --surface-container: #1d2026;
  --surface-high: #272a31;
  --surface-highest: #32353c;
  --on-surface: #e0e2eb;
  --on-surface-variant: #cbc3d7;
  --outline: #958ea0;
  --outline-variant: #494454;
  --primary: #d0bcff;
  --primary-dim: #e9ddff;
  --on-primary: #3c0091;
  --secondary: #4cd7f6;
  --tertiary: #ffb869;

  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;

  --gutter: 1rem;
  --r-sm: 0.25rem;
  --r-md: 0.5rem;
  --r-pill: 0.75rem;
  --bar: 4rem;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface-lowest);
  color: var(--on-surface);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--surface-high); color: var(--primary); }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-sm); }

h1, h2, p { margin: 0; }

.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Type scale from DESIGN.md */
.headline-lg { font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.01em; }
.headline-md { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }
.headline-sm { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.title-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-lg { font-size: 16px; line-height: 26px; }
.body-sm { font-size: 12px; line-height: 18px; }
.code-lg { font-family: var(--mono); font-size: 14px; line-height: 22px; font-weight: 500; }
.code-md { font-family: var(--mono); font-size: 12px; line-height: 18px; font-weight: 500; }
.label-md { font-family: var(--mono); font-size: 11px; line-height: 16px; font-weight: 600; }
.label-sm { font-family: var(--mono); font-size: 10px; line-height: 14px; font-weight: 600; }
.caps { text-transform: uppercase; letter-spacing: 0.12em; }

.c-variant { color: var(--on-surface-variant); }
.c-outline { color: var(--outline); }
.c-primary { color: var(--primary); }
.c-secondary { color: var(--secondary); }
.c-tertiary { color: var(--tertiary); }

/* Bars */
.topbar, .tabbar {
  position: fixed; left: 0; right: 0; z-index: 50;
  background: rgba(11, 14, 20, 0.85);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.topbar { top: 0; padding-top: env(safe-area-inset-top, 0px); box-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.tabbar { bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -2px 12px rgba(0,0,0,0.5); }

.topbar-inner, .tabbar-inner { height: var(--bar); max-width: 40rem; margin: 0 auto; padding-inline: var(--gutter); display: flex; align-items: center; }
.topbar-inner { justify-content: space-between; }
.tabbar-inner { justify-content: space-around; max-width: 28rem; }

.wordmark { display: inline-flex; align-items: center; gap: 0.625rem; min-height: 44px; color: var(--on-surface); letter-spacing: -0.01em; }
.wordmark:hover { color: var(--primary); }
.wordmark img { width: 28px; height: 28px; border-radius: 50%; }
.topbar-section { color: rgba(203, 195, 215, 0.7); }

.tab {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding-inline: 0.75rem;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--on-surface-variant); border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--on-surface); }
.tab[aria-current="page"] { color: var(--on-surface); border-bottom-color: var(--primary); }

/* Page */
main {
  max-width: 40rem; margin: 0 auto;
  padding: calc(var(--bar) + env(safe-area-inset-top, 0px)) var(--gutter) calc(var(--bar) + 3rem + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 1.5rem;
}
section { display: flex; flex-direction: column; gap: 1rem; }

.card { background: var(--surface-low); border-radius: var(--r-md); padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.well { background: var(--surface-container); border-radius: var(--r-sm); padding: 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.row-start { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.inline { display: inline-flex; align-items: center; gap: 0.375rem; }

.pip { width: 6px; height: 6px; border-radius: 50%; background: var(--secondary); display: inline-block; flex: none; }
.pip.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.pill { padding: 0.25rem 0.5rem; border-radius: var(--r-pill); background: var(--surface-highest); white-space: nowrap; }
.pill.quiet { background: var(--surface-container); color: var(--outline); }

.morse { display: flex; align-items: center; gap: 4px; height: 22px; margin-top: 0.25rem; }
.morse .dit, .morse .dah { display: block; height: 4px; border-radius: 2px; background: currentColor; flex: none; }
.morse .dit { width: 4px; }
.morse .dah { width: 14px; }
.morse i { display: block; width: 6px; flex: none; }

.link { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 44px; color: var(--primary); }
.link:hover { color: var(--primary-dim); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  min-height: 44px; padding: 0.5rem 0.75rem; border: 0; border-radius: var(--r-md);
  background: var(--primary); color: var(--on-primary);
  font-family: var(--mono); font-size: 11px; font-weight: 600; cursor: pointer;
}
.button:active { opacity: 0.9; }

.mailbox { background: var(--surface-highest); border-radius: var(--r-sm); padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.mailbox .addr { user-select: all; overflow-wrap: anywhere; }
@media (min-width: 30rem) { .mailbox { flex-direction: row; align-items: center; justify-content: space-between; } }

.badges { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; color: var(--outline); }

/* Privacy page */
.crumbs { color: rgba(203, 195, 215, 0.6); letter-spacing: 0.04em; }
.crumbs .here { color: var(--primary); }
.doc-head { background: var(--surface-low); border-radius: var(--r-md); padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.tile { width: 2rem; height: 2rem; border-radius: var(--r-sm); background: var(--surface-container); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.tile.sm { width: 1.5rem; height: 1.5rem; font-size: 16px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
@media (max-width: 22rem) { .facts { grid-template-columns: 1fr; } }
.fact { background: var(--surface-container); border-radius: var(--r-sm); padding: 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.policy { display: flex; flex-direction: column; gap: 1rem; }
.policy .card { gap: 0.5rem; }
.policy h2 { display: flex; align-items: center; gap: 0.5rem; }
.policy p { color: var(--on-surface-variant); line-height: 22px; }

.key { width: 2.5rem; height: 2.5rem; border: 0; border-radius: var(--r-sm); background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; transition: transform 80ms; flex: none; }
.key:active { transform: scale(0.95); }

/* Footer */
footer { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1rem; }
footer nav { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.75rem; }
footer nav a { min-height: 44px; display: inline-flex; align-items: center; }
footer nav a:hover { color: var(--on-surface); }
.dot-sep { color: rgba(149, 142, 160, 0.4); }

@media (prefers-reduced-motion: reduce) { .pip.pulse { animation: none; } .key { transition: none; } }
