/* 000.fun — teaser site styles. No frameworks, no build step.
 * Type system: Fredoka (display, echoes the rounded logo), Geist (body, UI),
 * Geist Mono (labels and numbers). */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  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: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: "Geist Mono";
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: "Geist Mono";
  src: url("../fonts/geist-mono-symbols.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
}

:root {
  --black: #000;
  --ink: #0a0a0a;
  --fg: #fafafa;
  --muted: #a1a1a1;
  --dim: #767676;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.3);
  --paper: #f3f3f1;
  --paper-card: #e7e7e3;
  --paper-ink: #0a0a0a;
  --paper-muted: #555;
  --paper-line: rgba(0, 0, 0, 0.14);
  --display: "Fredoka", ui-rounded, "Geist", ui-sans-serif, system-ui, sans-serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: 16px;
  --max: 1280px;
  --header-h: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 640px) {
  :root { --gutter: 32px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 48px; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--black);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--black);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: var(--fg);
  color: var(--black);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
}

.btn-ghost:hover {
  border-color: var(--fg);
}

.btn-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.btn .icon-arrow {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease-out);
}

.btn:hover .icon-arrow {
  transform: translate(2px, -2px);
}

.paper .btn-primary {
  background: var(--paper-ink);
  color: var(--paper);
}

.paper .btn-ghost {
  border-color: rgba(0, 0, 0, 0.28);
  color: var(--paper-ink);
}

.paper .btn-ghost:hover {
  border-color: var(--paper-ink);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}

.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.78);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: auto;
  aspect-ratio: 814 / 779;
  color: var(--fg);
}

.brand-name {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-out infinite;
}

.status .status-dot {
  color: var(--fg);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (max-width: 479px) {
  .status { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--header-h);
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse 70% 60% at 50% 46%, #0e0e0e 0%, #000 72%);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 28px;
  padding-bottom: 28px;
  text-align: center;
}

.eyebrow {
  margin-bottom: 28px;
  color: var(--muted);
}

.logo-button {
  appearance: none;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hero-logo {
  width: min(64vw, 40vh, 380px);
  width: min(64vw, 40svh, 380px);
  height: auto;
  aspect-ratio: 814 / 779;
  overflow: visible;
  color: var(--fg);
}

.hero-logo .glyph {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.hero-title {
  margin-top: clamp(28px, 4.5vh, 48px);
  font-family: var(--display);
  font-size: clamp(42px, 7.4vw, 104px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.fun {
  display: inline-block;
  padding: 0 0.14em 0.04em;
  border-radius: 0.14em;
  background: var(--fg);
  color: var(--black);
  transform: rotate(-3deg);
  transition: transform 0.4s var(--ease-spring);
}

.hero-title:hover .fun {
  transform: rotate(3deg) scale(1.06);
}

.hero-sub {
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 20px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.cta-row-left {
  justify-content: flex-start;
}

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  padding: 30px 0 24px;
  border-block: 1px solid var(--line);
  background: var(--black);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 0.32em;
  padding-right: 0.32em;
  font-family: var(--display);
  font-size: clamp(56px, 10vw, 150px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.marquee-group .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
}

.marquee-zero {
  width: 0.56em;
  height: 0.86em;
  color: var(--fg);
}

.ticker {
  display: flex;
  gap: 18px;
  width: max-content;
  margin-top: 24px;
  color: var(--muted);
  animation: marquee-reverse 36s linear infinite;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes marquee-reverse {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(88px, 12vw, 168px) 0;
}

.paper {
  background: var(--paper);
  color: var(--paper-ink);
}

.section-head {
  display: grid;
  gap: 18px;
  max-width: 780px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.label {
  color: var(--muted);
}

.paper .label {
  color: var(--paper-muted);
}

.section-title {
  font-family: var(--display);
  font-size: clamp(38px, 6vw, 80px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-note {
  max-width: 540px;
  color: var(--muted);
  font-size: 17px;
}

.paper .section-note {
  color: var(--paper-muted);
}

/* ---------- Stats ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-card-network { grid-column: 1 / -1; }
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 168px;
  padding: 22px;
  border-radius: 4px;
  background: var(--paper-card);
}

@media (min-width: 720px) {
  .stat-card { min-height: 200px; }
}

@media (min-width: 1100px) {
  .stat-card { min-height: 240px; }
}

.stat-label {
  display: grid;
  gap: 4px;
  color: var(--paper-muted);
  line-height: 1.5;
}

/* Big numbers share the display face with every other headline. */
.stat-value,
.stat-network {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-value {
  font-size: clamp(56px, 6.4vw, 96px);
  font-variant-numeric: tabular-nums;
}

/* Network status: a full-width black bar under the three numbers. */
.stat-card-network {
  min-height: 0;
  background: var(--black);
  color: var(--fg);
}

.stat-card-network .stat-label {
  color: var(--muted);
}

.stat-network-main {
  display: grid;
  gap: 28px;
}

.stat-network {
  font-size: clamp(44px, 5.6vw, 84px);
}

@media (min-width: 720px) {
  .stat-card-network {
    flex-direction: row;
    align-items: flex-end;
  }
}

.pending {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--fg);
  font-size: 13px;
  white-space: nowrap;
}

@media (min-width: 720px) {
  .pending { align-self: auto; margin-bottom: 6px; }
}

.odo {
  display: inline-flex;
}

.odo-digit {
  display: inline-block;
  height: 1em;
  overflow: hidden;
}

.odo-strip {
  display: flex;
  flex-direction: column;
}

.odo-strip > span {
  display: block;
  height: 1em;
  line-height: 1;
}

/* ---------- Classified ---------- */

.file-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 900px) {
  .file-grid { grid-template-columns: repeat(3, 1fr); }
}

.file-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 360px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
  cursor: default;
  transition: border-color 0.3s;
}

.file-card:hover,
.file-card:focus-visible,
.file-card.is-open {
  border-color: var(--line-strong);
}

.file-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.file-art {
  width: 100%;
  height: auto;
  aspect-ratio: 240 / 160;
  color: var(--fg);
  opacity: 0.55;
  transition: opacity 0.4s, transform 0.8s var(--ease-out);
}

.file-art path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.file-card:hover .file-art,
.file-card:focus-visible .file-art,
.file-card.is-open .file-art {
  opacity: 1;
  transform: scale(1.04);
}

.file-title {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.bar {
  display: block;
  height: 22px;
  border-radius: 2px;
  background: var(--fg);
}

.bar-a { width: 84%; }
.bar-b { width: 52%; }
.bar-c { width: 70%; }
.bar-d { width: 38%; }
.bar-e { width: 62%; }
.bar-f { width: 76%; }

.file-card:hover .bar,
.file-card:focus-visible .bar,
.file-card.is-open .bar {
  animation: glitch 0.36s steps(2, jump-none) infinite;
}

.file-card:hover .bar:nth-child(odd),
.file-card:focus-visible .bar:nth-child(odd),
.file-card.is-open .bar:nth-child(odd) {
  animation-delay: -0.18s;
}

@keyframes glitch {
  0% { transform: translateX(0); opacity: 1; }
  50% { transform: translateX(4px); opacity: 0.55; }
  100% { transform: translateX(-3px); opacity: 1; }
}

.file-meta {
  color: var(--dim);
}

.stamp {
  position: absolute;
  top: 46%;
  left: 50%;
  padding: 8px 14px;
  border: 2px solid var(--fg);
  background: var(--black);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-8deg) scale(1.4);
  transition: opacity 0.15s, transform 0.35s var(--ease-spring);
}

.file-card:hover .stamp,
.file-card:focus-visible .stamp,
.file-card.is-open .stamp {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-8deg) scale(1);
}

.loader {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  color: var(--muted);
}

.loader-bar {
  position: relative;
  height: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
}

.loader-fill {
  position: absolute;
  inset: 2px auto 2px 2px;
  width: 0;
  max-width: calc(100% - 4px);
  background: repeating-linear-gradient(90deg, var(--fg) 0 6px, transparent 6px 9px);
}

.loader-pct {
  min-width: 4ch;
  color: var(--fg);
  text-align: right;
}

.loader.is-rollover .loader-pct {
  animation: flash 0.5s steps(2, jump-none) 2;
}

@keyframes flash {
  50% { opacity: 0.2; }
}

/* ---------- Final CTA ---------- */

.final-inner {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .final-inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 72px;
  }
}

.final-mark {
  appearance: none;
  display: grid;
  place-items: center;
  width: min(100%, 440px);
  aspect-ratio: 1;
  padding: 18%;
  border: 0;
  border-radius: 28px;
  background: var(--black);
  color: var(--fg);
  cursor: pointer;
  transition: transform 0.5s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}

.final-mark svg {
  width: 100%;
  height: auto;
  aspect-ratio: 814 / 779;
}

.final-mark:hover {
  transform: rotate(-3deg) scale(1.02);
}

.final-mark:active {
  transform: rotate(-3deg) scale(0.97);
}

.final-mark:focus-visible {
  outline-color: var(--paper-ink);
}

.final-copy {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.final-title {
  font-family: var(--display);
  font-size: clamp(44px, 7vw, 104px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.final-copy .cta-row {
  margin-top: 14px;
}

.psst {
  margin-top: 12px;
  color: var(--paper-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 56px 0 24px;
  border-top: 1px solid var(--line);
  background: var(--black);
}

.footer-inner {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 40px;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

.footer-mark {
  width: 44px;
  height: auto;
  aspect-ratio: 814 / 779;
  color: var(--fg);
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-legal {
  color: var(--dim);
}

.footer-safety {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--dim);
}

/* ---------- Easter egg ---------- */

.burst-canvas {
  position: fixed;
  inset: 0;
  z-index: 60;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 70;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--black);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast:empty {
  display: none;
}

/* ---------- Scroll reveal ---------- */

.reveal-ready [data-reveal] {
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal-ready [data-reveal].is-hidden {
  opacity: 0;
  transform: translateY(28px);
}

/* ---------- Motion off (user toggle or system preference) ---------- */

.motion-off .marquee-track,
.motion-off .ticker,
.motion-off .status-dot,
.motion-off .file-card .bar {
  animation-play-state: paused;
}

.motion-off .file-card .bar {
  animation: none;
}

.motion-off [data-reveal] {
  transition: none;
}

/* Visitors whose system asks to reduce motion get the static version,
   even if the script never runs. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .marquee-track,
  .ticker,
  .status-dot,
  .file-card .bar {
    animation: none;
  }
}

/* ---------- 404 ---------- */

.notfound {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 20px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px var(--gutter);
  text-align: center;
}

.notfound-mark {
  width: 96px;
  margin-bottom: 12px;
  color: var(--fg);
}

.notfound-mark svg {
  width: 100%;
  height: auto;
  aspect-ratio: 814 / 779;
}

.notfound .btn {
  margin-top: 12px;
}
