/*
 * EMET · tokens, fonts, base and the first screen. Sections below the fold live in page.css.
 * Built on kits/portal-ledger (DNA from autofomo.app): the brand flood is the paper, white is the ink,
 * Cardo 700 for headings (never italic, accent words take ink-75), Inter 700 for every figure,
 * white cards only for instruments, one parchment band.
 *
 * Brand: burnt umber, river clay at night. White text on it is 15:1. The warm glow (--glow) is the parchment
 * light in the golem's mouth: the shader ink, the life bars of living words, the slot marks.
 * --accent is FOMO's blue: the place where the action happens (the "Thesis" tag).
 */
/* fonts: self-hosted (Cardo 700 only, no italic at all; Inter 400–700). Hebrew subset for the seal. */
@font-face { font-family: "Cardo"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/cardo-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cardo"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/cardo-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Cardo"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/cardo-hebrew-700-normal.woff2) format("woff2");
  unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
:root {
  /* ---- brand: the only hue ---- */
  --brand: #3a2016;             /* the flood: burnt umber, river clay at night. White on it: 15:1 */
  --brand-rgb: 58 32 22;        /* same colour as r g b, for rgba(var(--brand-rgb) / a) */
  --brand-deep: #241009;        /* text on a light brand tint */
  --brand-2: #b0673e;           /* split bar, middle share: fired clay */
  --brand-3: #e6c7a2;           /* split bar, last share: dry clay */
  --accent: #4353ff;            /* FOMO's blue: the "Thesis" tag, where the action happens */
  --glow: #ffe9a8;              /* the parchment glow: shader ink, life bars, slot marks */

  /* ---- ink on the flood ---- */
  --ink: #ffffff;
  --ink-92: rgba(255, 255, 255, 0.92);
  --ink-75: rgba(255, 255, 255, 0.75);
  --ink-55: rgba(255, 255, 255, 0.55);
  --hairline: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.16);

  /* ---- white cards and the parchment ---- */
  --surface: #ffffff;
  --paper: #f4f1ea;
  --paper-rule: rgba(15, 29, 32, 0.07);
  --wax: #9b2b22;
  --wax-deep: #6e1c16;
  --dark: #0f1d20;
  --dark-80: rgba(15, 29, 32, 0.8);
  --dark-60: rgba(15, 29, 32, 0.6);
  --dark-muted: rgba(15, 29, 32, 0.62);   /* small grey text on white: 4.5:1 and up */
  --slate-hairline: rgba(15, 29, 32, 0.08);
  --slate-fill: rgba(15, 29, 32, 0.05);
  --up: #0f7a4f;
  --down: #b4322a;

  --vignette:
    radial-gradient(120% 70% at 20% 55%, rgba(var(--brand-rgb) / 0.55) 0%, rgba(var(--brand-rgb) / 0.25) 45%, rgba(var(--brand-rgb) / 0) 75%),
    radial-gradient(90% 60% at 50% 110%, rgba(var(--brand-rgb) / 0.5) 0%, rgba(var(--brand-rgb) / 0) 70%);
  --font-display: "Cardo", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --shadow-composer: 0 10px 30px -18px rgba(0, 0, 0, 0.45);
  --shadow-float: 0 24px 60px -20px rgba(0, 0, 0, 0.4), 0 6px 20px -12px rgba(0, 0, 0, 0.25);
  --container: 86rem;
  --gutter: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
html { background: var(--brand); color: var(--ink); -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font-sans); font-size: 16px; line-height: 1.5; background: var(--brand); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 10px; }
[id] { scroll-margin-top: 64px; }
[hidden] { display: none !important; }   /* component display rules must not resurrect hidden nodes */
html:not(.is-filled) [data-c] { visibility: hidden; }   /* no flash of empty copy before content.js pours in */

/* the round doodle logo (the golem's head on cream): header, bar, colophon, the wheel hub */
.logo { flex: none; display: block; border-radius: 999px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }

/* ---------- the portal: first screen only ---------- */
.portal { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; background: var(--brand); }
.portal__field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.portal__vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--vignette); }

.masthead, .hero { position: relative; z-index: 2; width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.22em; }
.wordmark .logo { width: 36px; height: 36px; }
.wordmark--sm .logo { width: 26px; height: 26px; }
.nav { display: flex; gap: 28px; font-size: 13px; color: var(--ink-75); }
.nav a { transition: color 200ms ease-out; }
.nav a:hover { color: var(--ink); }
.ghost { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--glass); font-size: 14px; line-height: 20px; white-space: nowrap; transition: background-color 200ms ease-out, border-color 200ms ease-out; }
.ghost:hover { background: var(--glass-hover); border-color: rgba(255, 255, 255, 0.4); }
.ghost--solid { background: var(--ink); color: var(--brand); border-color: var(--ink); font-weight: 500; }
.ghost--solid:hover { background: var(--ink-92); }

.hero { flex: 1; display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr) minmax(0, 340px); gap: 32px; align-items: center; padding-bottom: 40px; }
.hero__copy { grid-column: 1; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--glass); font-size: 11px; font-weight: 500; letter-spacing: 0.02em; }
.badge__tag { padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--brand); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.badge--met .badge__tag { background: var(--glow); }
h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.75rem, 6vw, 5.5rem); line-height: 0.98; letter-spacing: -0.02em; overflow-wrap: anywhere; }
h1 em { font-style: normal; color: var(--ink-75); }
.lead { margin: 24px 0 0; max-width: 33rem; font-size: 15px; font-weight: 500; line-height: 1.6; }

/* the action card: what the visitor does, drawn as the post they will write */
.post { display: flex; align-items: center; gap: 14px; margin-top: 32px; max-width: 40rem; padding: 12px 12px 12px 18px; border-radius: 22px; background: var(--surface); color: var(--dark); box-shadow: var(--shadow-composer); transition: transform 200ms ease-out, box-shadow 200ms ease-out; }
.post:hover { transform: translateY(-1px); box-shadow: var(--shadow-float); }
.post__body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.post__head { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; white-space: nowrap; }
.post__avatar { width: 22px; height: 22px; flex: none; border-radius: 999px; background: radial-gradient(circle at 35% 30%, var(--brand-3), var(--brand-2) 60%, var(--brand) 100%); }
.post__head strong { font-weight: 600; }
.post__tag { padding: 1px 7px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; }
.post__where { overflow: hidden; text-overflow: ellipsis; color: var(--dark-muted); }
.post__text { font-size: 15px; font-weight: 500; color: var(--dark); }
.post__go { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 11px 16px; border-radius: 14px; background: var(--brand); color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap; }
.post__go svg { width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { display: inline-flex; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--hairline); background: rgba(var(--brand-rgb) / 0.55); font-size: 12px; font-weight: 500; white-space: nowrap; transition: background-color 200ms ease-out; }
.chip:hover { background: var(--glass-hover); }

/* the live card in the first screen */
.ledger { grid-column: 3; align-self: center; padding: 18px; border-radius: 18px; background: var(--surface); color: var(--dark); box-shadow: var(--shadow-float); }
.ledger__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.ledger h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 24px; white-space: nowrap; }
.ledger__state { font-size: 11px; color: var(--dark-muted); text-align: right; white-space: nowrap; }
.ledger__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin: 14px 0; padding: 12px 0; border-block: 1px solid var(--slate-hairline); }
.stat dt { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dark-muted); }
.stat dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ledger__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ledger__more { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--slate-hairline); font-size: 12px; font-weight: 500; color: var(--brand); }
.call { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 6px; border-radius: 10px; font-size: 13px; }
.call:hover { background: var(--slate-fill); }
.call__who { min-width: 0; }
.call__who strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call__who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--dark-60); }
.call__num { text-align: right; font-variant-numeric: tabular-nums; }
.call__num strong { font-weight: 700; }
.call__num span { display: block; font-size: 11px; color: var(--dark-muted); }
.call--note .call__who strong { font-family: var(--font-display); font-size: 15px; }
.call--empty { display: block; color: var(--dark-60); }

/* the tape: the gates running on the market, bottom of the first screen */
.tape { position: relative; z-index: 2; border-top: 1px solid var(--hairline); background: rgba(var(--brand-rgb) / 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow: hidden; }
.tape__track { display: flex; width: max-content; animation: tape 90s linear infinite; }
.tape:hover .tape__track { animation-play-state: paused; }
.tape__item { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-right: 1px solid var(--hairline); font-size: 12px; white-space: nowrap; color: var(--ink-75); }
.tape__item b { color: var(--ink); font-weight: 600; }
.tape__item i { font-style: normal; font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--ink); }
.tape__item--ok::before, .tape__item--stop::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--ink); }
.tape__item--stop::before { background: transparent; border: 1px solid var(--ink-75); }
.tape__item--head { color: var(--ink); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; font-size: 10.5px; }
@keyframes tape { to { transform: translateX(-50%); } }

/* sticky bar after the first screen */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; transform: translateY(-100%); transition: transform 300ms ease-out; background: rgba(var(--brand-rgb) / 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.bar.is-on { transform: none; }
.bar__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: var(--container); margin-inline: auto; padding: 10px var(--gutter); }
.bar .ghost { padding: 6px 14px; font-size: 13px; }

@media (max-width: 1100px) {
  .nav { gap: 18px; }
}
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .nav { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 0; margin-top: -40px; }
  .hero__copy, .ledger { grid-column: 1; }
  /* phones: the painting gets its own block under the masthead instead of hiding behind the copy */
  .masthead { order: 0; }
  .portal__field { position: relative; inset: auto; order: 1; height: min(92vw, 400px); margin-top: -8px; -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
  .portal__vignette { display: none; }
  .hero { order: 2; }
  .tape { order: 3; }
  .hero__copy { text-align: center; }
  .badge, .chips { justify-content: center; }
  .lead { margin-inline: auto; }
  .post { margin-inline: auto; text-align: left; }
  h1 { font-size: clamp(2.6rem, 11vw, 4rem); }
}
@media (max-width: 560px) {
  .post { flex-direction: column; align-items: stretch; padding: 14px; }
  .post__go { justify-content: center; }
}
@media (max-width: 420px) {
  .badge { font-size: 10px; }
  .ledger__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .tape { overflow-x: auto; }
}
