/* CrunchyFX: temporary pre-launch site (main branch). Shared by index.html and 404.html. */

/* ------------------------------------------------------------------
   BRAND TOKENS: PLACEHOLDER VALUES
   Final colour values are still to come. Every value marked
   TODO(brand) is a stand-in: swap it here and both pages follow.
   Also update theme-color in each page's <head> and favicon.svg.
   ------------------------------------------------------------------ */
:root {
  --ink: #0b0b0f;        /* TODO(brand): near-black ink, page background */
  --ink-raised: #17171d; /* TODO(brand): raised ink for boxes and panels */
  --paper: #f3f2ee;      /* TODO(brand): off-white, primary text */
  --paper-dim: #a9a8a3;  /* TODO(brand): secondary text */
  --pink: #ff2d87;       /* TODO(brand): hot pink accent */
  --cyan: #19e3ff;       /* TODO(brand): cyan accent */

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 1rem;
}

/* Inter v4.1 variable fonts, self-hosted from public/fonts/ (SIL OFL 1.1,
   see fonts/Inter-LICENSE.txt). Never load fonts from Google Fonts or any CDN. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grit: a fixed film-grain layer (inline SVG noise, no external request). */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Header and footer ------------------------------------------------ */
.site-header,
.site-footer {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding: 1.25rem var(--gutter);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

.tag {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.site-footer {
  font-size: 0.875rem;
  color: var(--paper-dim);
}

.site-footer p {
  margin: 0;
}

/* Hero ------------------------------------------------------------- */
.hero {
  flex: 1;
  display: grid;
  align-content: center;
  gap: 3rem;
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding: 2rem var(--gutter) 3rem;
}

.headline {
  margin: 0;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.headline-big {
  display: block;
  font-size: clamp(3.25rem, 16vw, 6rem);
}

.headline-sub {
  display: block;
  margin-top: 0.4em;
  font-size: clamp(1.75rem, 8vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--pink);
}

.lede {
  max-width: 30ch;
  margin: 1.5rem 0 0;
  font-size: clamp(1.125rem, 4.5vw, 1.5rem);
  line-height: 1.35;
  color: var(--paper-dim);
}

.lede strong {
  font-weight: 600;
  color: var(--paper);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 2rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--cyan);
}

/* Collage: overlapping boxes, purely decorative ---------------------- */
.collage {
  position: relative;
  width: min(100%, 22rem);
  aspect-ratio: 1;
  margin-inline: auto;
}

.box {
  position: absolute;
  border-radius: 3px;
}

.box-pink {
  top: 6%;
  left: 2%;
  width: 56%;
  aspect-ratio: 4 / 5;
  background: var(--pink);
  transform: rotate(-5deg);
}

.box-grid {
  top: 30%;
  left: 26%;
  width: 62%;
  aspect-ratio: 1;
  padding: 8%;
  background: var(--ink-raised);
  border: 1px solid rgb(243 242 238 / 0.14);
  box-shadow: 0 2rem 4rem -1.5rem rgb(0 0 0 / 0.8);
  color: var(--paper);
}

.box-grid svg {
  display: block;
  width: 100%;
  height: 100%;
}

.box-cyan {
  top: 0;
  right: 2%;
  width: 46%;
  aspect-ratio: 1;
  border: 2px solid var(--cyan);
  transform: rotate(4deg);
}

.sticker {
  position: absolute;
  left: 0;
  bottom: 4%;
  padding: 0.35rem 0.6rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-4deg);
}

.stray {
  position: absolute;
  right: 0;
  bottom: 2%;
  width: 7%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--pink);
}

/* Wider screens ---------------------------------------------------- */
@media (min-width: 40rem) {
  :root {
    --gutter: 2rem;
  }
}

@media (min-width: 60rem) {
  :root {
    --gutter: 2.5rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
  }

  .headline-big {
    font-size: clamp(4.5rem, 8vw, 7rem);
  }

  .headline-sub {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
  }

  .collage {
    width: 100%;
    max-width: 30rem;
  }
}
