/* StoneFaced Blox. Plain CSS, no build step. */

:root {
  --stone: #1d1c1a;    /* background */
  --basalt: #2c2a27;
  --tuf: #8a7f72;      /* decoration only: 4.3:1 on stone, not enough for small text */
  --sand: #e8e0d2;     /* text */
  --lichen: #9bc53d;   /* the one accent */

  --bg: var(--stone);
  --surface: var(--basalt);
  --text: var(--sand);
  --muted: #b3a897;
  --link: var(--lichen);
  --line: #3d3a35;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Arial Black", "Segoe UI Black", "Helvetica Neue", system-ui, sans-serif;

  /* Stone grain, generated (SVG turbulence), not a photo. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: var(--sand);
    --surface: #ddd3c2;
    --text: var(--stone);
    --muted: #5f574d;
    --link: #45620e;   /* dark lichen: 5.3:1 on sand */
    --line: #cbbfac;
    color-scheme: light;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 var(--font-body);
}

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

a { color: var(--link); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--lichen);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: .5rem 1rem; background: var(--lichen); color: var(--stone);
  font-weight: 700;
}
.skip:focus { top: 1rem; }

.wrap { width: min(68rem, 100% - 2.5rem); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 900; line-height: 1.1; margin: 0 0 .6em; }
h2 {
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--muted);
  display: flex; align-items: center; gap: .9rem;
  margin-bottom: 1.75rem;
}
h2 span { color: var(--link); }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
h3 { font-size: 1.25rem; letter-spacing: .01em; }

p { margin: 0 0 1em; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .7rem 1.2rem;
  border: 2px solid var(--lichen);
  border-radius: 4px;
  background: var(--lichen);
  color: var(--stone);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { background: #b0d65a; border-color: #b0d65a; }
.btn-ghost { background: transparent; color: var(--link); border-color: currentColor; }
.btn-ghost:hover { background: transparent; color: var(--text); }

/* Hero: always a dark stone slab, in both themes. */
.hero {
  position: relative;
  isolation: isolate;
  color: var(--sand);
  background:
    radial-gradient(ellipse 60% 70% at 72% 55%, #34312d 0%, rgba(44, 42, 39, 0) 70%),
    linear-gradient(180deg, #1d1c1a 0%, #171614 100%);
  border-bottom: 1px solid #3d3a35;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  background: var(--grain);
  opacity: .07;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.hero a:not(.btn) { color: var(--sand); }
.hero .btn-ghost { color: var(--lichen); }
.hero .btn-ghost:hover { color: var(--sand); }

.bar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none;
  font-family: var(--font-head); font-weight: 900;
  text-transform: uppercase; letter-spacing: .08em; font-size: .9rem;
}
.brand b { color: var(--lichen); font-weight: inherit; }
.bar ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.bar ul a { text-decoration: none; }
.bar ul a:hover { text-decoration: underline; }
@media (max-width: 40rem) { .bar ul { display: none; } }

.hero-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 0 2rem;
  padding-block: 1rem 3rem;
}
@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; padding-block: 2rem 4.5rem; }
}

.eyebrow {
  text-transform: uppercase; letter-spacing: .2em; font-size: .8rem;
  color: #b3a897; margin-bottom: .75rem;
}
h1 {
  font-size: clamp(2.6rem, 8vw, 5.25rem);
  text-transform: uppercase;
  letter-spacing: .02em;
  /* carved: dark lip on top, light catch underneath */
  text-shadow: 0 -1px 0 #000, 0 1px 0 rgba(232, 224, 210, .12);
  margin-bottom: .3em;
}
.tagline { font-size: clamp(1.15rem, 2.6vw, 1.5rem); color: #d6cdbd; margin-bottom: 1.75rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Moai stage: fixed square, so swapping the fallback for the canvas never shifts layout. */
.hero-art {
  position: relative;
  width: min(100%, 26rem);
  aspect-ratio: 1;
  margin-inline: auto;
  order: -1;
}
@media (max-width: 51.99rem) { .hero-art { width: min(70vw, 18rem); } }
@media (min-width: 52rem) { .hero-art { order: 0; } }

.hero-fallback {
  position: absolute; inset: 12%;
  width: 76%; height: 76%;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .5));
  transition: opacity .6s;
}
.hero-art canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity .6s;
}
.hero-art.gl-on canvas { opacity: 1; }
.hero-art.gl-on .hero-fallback { opacity: 0; }

/* Sections */
.section { padding-block: 4rem 1rem; }
.lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); max-width: 40em; }

.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--basalt); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-soon {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  position: relative;
  background: radial-gradient(circle at 50% 45%, #3a3732, #1d1c1a 75%);
  color: #b3a897;
  text-transform: uppercase; letter-spacing: .2em; font-size: .75rem;
}
.card-soon::after {
  content: ""; position: absolute; inset: 0;
  background: var(--grain); opacity: .08; mix-blend-mode: overlay;
}
.card-soon img { width: 4.5rem; height: 4.5rem; object-fit: contain; opacity: .85; }
.card-body { padding: 1.25rem 1.25rem 1.5rem; }
.card-body p { color: var(--muted); }

.split { display: grid; gap: 2rem 3rem; }
@media (min-width: 46rem) { .split { grid-template-columns: 1fr 1fr; } }
.split p { max-width: 34em; }

.mail {
  font-family: var(--font-head); font-weight: 900;
  font-size: clamp(1.3rem, 4.5vw, 2.25rem);
  word-break: break-word;
}

.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.social a {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .25rem; color: var(--text); text-decoration: none;
}
.social a:hover { color: var(--link); }

.foot {
  margin-top: 5rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.foot p { margin: 0 0 .4em; }
.foot a { color: inherit; }

/* Sub-pages (legal, press) */
.page { padding-block: 3rem 1rem; max-width: 46rem; }
.page h1 { font-size: clamp(2rem, 6vw, 3rem); text-shadow: none; }
.page h2 { margin-top: 2.5rem; }
.page dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 0 0 1.5rem; }
.page dt { font-weight: 700; }
.page dd { margin: 0; }
@media (max-width: 34rem) { .page dl { grid-template-columns: 1fr; } .page dd { margin-bottom: .6rem; } }
.todo {
  background: #f2c94c; color: #1d1c1a;
  padding: .05em .35em; border-radius: 3px; font-weight: 700;
}
.subbar { background: var(--stone); color: var(--sand); }
.subbar .brand { color: var(--sand); }
.downloads { padding-left: 1.2rem; }
.downloads li { margin-bottom: .4rem; }
