/* AUTOFOMO · Mixley packaging (kits/dither-portal): lagoon flood as paper, white ink,
 * a Venetian painting under the dither shader in the first screen, Cardo display over Inter UI.
 * This file: tokens, base and the first screen. Sections below the fold live in page.css. */
:root {
  --brand: #0b5563;
  --brand-rgb: 11 85 99;
  --brand-deep: #083f4a;
  --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);
  --surface: #ffffff;
  --paper: #f4f1ea;
  --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;
  --wax: #9b2b22;
  --fomo-blue: #4353ff;
  --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 */

/* ---------- 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; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85); }
.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; }
h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(2.75rem, 6vw, 5.5rem); line-height: 0.98; letter-spacing: -0.02em; overflow-wrap: anywhere; }
h1 em { font-style: italic; color: var(--ink-92); }
.lead { margin: 24px 0 0; max-width: 33rem; font-size: 15px; font-weight: 500; line-height: 1.6; }

.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%, #7fb3bd, var(--brand) 70%); }
.post__head strong { font-weight: 600; }
.post__tag { padding: 1px 7px; border-radius: 6px; background: var(--fomo-blue); color: #fff; font-size: 11px; font-weight: 600; }
.post__where { overflow: hidden; text-overflow: ellipsis; color: var(--dark-muted); }
.post__text { font-size: 14px; color: var(--dark-60); }
.post__text code { margin-right: 4px; padding: 1px 6px; border-radius: 6px; background: var(--slate-fill); color: var(--dark); font-family: var(--font-mono); font-size: 12.5px; }
.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; align-items: baseline; justify-content: space-between; gap: 12px; }
.ledger h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 24px; white-space: nowrap; }
.ledger__state { font-size: 11px; color: var(--dark-muted); text-align: right; }
.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: 15px; font-weight: 500; 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 span { display: block; font-size: 11px; color: var(--dark-muted); }
.call--won .call__num strong { color: var(--up); }
.call--lost .call__num strong { color: var(--down); }
.call--skipped .call__num strong { color: var(--dark-muted); font-weight: 400; }
.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; 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; }
}
