/* RedRoom Legion Plugins
   The label is a dark room with one red light in it; each plugin brings its own colour into that room
   (the Liminal series: the amber of its knob arcs). Flat surfaces, one typeface, motion that settles.

   Tokens
   colour   --base #000, surfaces #181818 / #1F1F1F / #272727 / #313131, --ink, --muted, --dim, --legion (label red),
            --accent (set per page: legion red on the hub, amber on a Liminal page)
   type     Geist for everything; Geist Mono only where digits must line up (versions, sizes, specs)
   scale    12 14 16 18 20 24 30 36 48 60 (Tailwind steps, with their line heights)
   space    2 4 8 12 16 24 32 40 48 64 80 96
   radius   4 6 8 12 16 24, nested: inner = outer - gap
   motion   --ease cubic-bezier(.22,1,.36,1) 500ms for movement, 300ms for colour; press: scale(.97) 160ms */

@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --base: #000000;
  --s1: #181818;
  --s2: #1F1F1F;
  --s3: #272727;
  --s4: #313131;
  --ink: #F2F0EC;
  --muted: #A7A39C;
  --dim: #75716B;
  --line: #272727;
  --legion: #C4262E;        /* the red of the label's logo (#B12028), lifted a touch for buttons */
  --accent: var(--legion);
  --on-accent: #FFFFFF;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1152px;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
}
.theme-liminal { --accent: #D4A058; --on-accent: #1A1209; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--base); color: var(--ink); font: 400 16px/24px var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "ss01"; }
img, video, svg { max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; letter-spacing: -0.02em; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.skip { position: absolute; left: 16px; top: -64px; z-index: 100; background: var(--ink); color: var(--base); padding: 8px 12px;
  border-radius: 8px; font-weight: 600; text-decoration: none; transition: transform 300ms var(--ease); }
.skip:focus { transform: translateY(80px); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gl); padding-right: var(--gr); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }

/* text styles (named as in the landing-page system) */
.heading-1 { font-size: 60px; line-height: 60px; }
.heading-2 { font-size: 48px; line-height: 48px; }
.heading-3 { font-size: 36px; line-height: 40px; }
.heading-4 { font-size: 30px; line-height: 36px; }
.heading-5 { font-size: 24px; line-height: 32px; }
.heading-6 { font-size: 20px; line-height: 28px; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.body-3 { font-size: 16px; line-height: 24px; }
.body-6 { font-size: 14px; line-height: 20px; }
.caption-2 { font-size: 14px; line-height: 20px; color: var(--dim); }
.lede { font-size: 18px; line-height: 28px; color: var(--muted); max-width: 680px; }
@media (max-width: 720px) {
  .heading-1 { font-size: 36px; line-height: 40px; }
  .heading-2 { font-size: 30px; line-height: 36px; }
  .heading-3 { font-size: 24px; line-height: 32px; }
  .lede { font-size: 16px; line-height: 24px; }
}
.grad { background: linear-gradient(90deg, #FFFFFF, #9B9B9B); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border-radius: 999px; border: 0; font: 600 16px/24px var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease), background-color 300ms var(--ease), color 300ms var(--ease), box-shadow 300ms var(--ease); }
.btn:active { transform: scale(.97); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); }
.btn-quiet { background: var(--s2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--s4); }
.btn-quiet:hover { background: var(--s3); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; line-height: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--s4); text-underline-offset: 4px;
  transition: text-decoration-color 300ms var(--ease); }
.link:hover { text-decoration-color: var(--accent); }

/* floating navigation */
.nav { position: fixed; z-index: 50; top: calc(16px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 4px; padding: 6px;
  background: color-mix(in srgb, var(--s1) 72%, transparent); backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%); border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 8px 32px rgba(0,0,0,.5); }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 12px 2px 12px; text-decoration: none; border-radius: 999px; white-space: nowrap; }
.brand-mark { display: block; height: 32px; width: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.brand span { color: var(--dim); font-size: 14px; line-height: 20px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { padding: 8px 12px; border-radius: 999px; font-size: 14px; line-height: 20px; color: var(--muted); text-decoration: none;
  transition: color 300ms var(--ease), background-color 300ms var(--ease); white-space: nowrap; }
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--s3); }
.nav .btn { margin-left: 4px; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--s3); color: var(--ink); cursor: pointer;
  place-items: center; transition: transform 160ms var(--ease); }
.menu-btn:active { transform: scale(.94); }
.menu-btn .bars { position: relative; width: 16px; height: 12px; }
.menu-btn .bars i { position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: currentColor;
  transition: transform 500ms var(--ease), opacity 300ms var(--ease); }
.menu-btn .bars i:nth-child(1) { top: 0; } .menu-btn .bars i:nth-child(2) { top: 5px; } .menu-btn .bars i:nth-child(3) { top: 10px; }
.menu-open .menu-btn .bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-btn .bars i:nth-child(2) { opacity: 0; }
.menu-open .menu-btn .bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.86); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  padding: calc(96px + env(safe-area-inset-top, 0px)) var(--gr) 32px var(--gl); display: grid; align-content: start; gap: 8px;
  opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease), visibility 0s 300ms; }
.menu-open .sheet { opacity: 1; visibility: visible; transition: opacity 300ms var(--ease); }
.sheet a { font-size: 30px; line-height: 36px; font-weight: 600; text-decoration: none; padding: 8px 0; opacity: 0; transform: translateY(24px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.menu-open .sheet a { opacity: 1; transform: none; }
.sheet a:nth-child(2) { transition-delay: 60ms; } .sheet a:nth-child(3) { transition-delay: 120ms; }
.sheet a:nth-child(4) { transition-delay: 180ms; } .sheet a:nth-child(5) { transition-delay: 240ms; } .sheet a:nth-child(6) { transition-delay: 300ms; }
@media (max-width: 860px) {
  .nav { left: var(--gl); right: var(--gr); transform: none; width: auto; max-width: none; justify-content: space-between; }
  .nav-links, .nav .btn { display: none; }
  .menu-btn { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet a { transform: none; transition: opacity 300ms var(--ease); }
  .menu-btn .bars i { transition: none; }
}

/* page rhythm */
main { display: block; }
.hero { padding-top: calc(160px + env(safe-area-inset-top, 0px)); }
.section { padding-top: 96px; }
.section-head { display: grid; gap: 16px; max-width: 680px; margin-bottom: 48px; }
.section-head p { color: var(--muted); }
@media (max-width: 720px) { .hero { padding-top: calc(120px + env(safe-area-inset-top, 0px)); } .section { padding-top: 80px; } .section-head { margin-bottom: 32px; } }

/* scroll reveal: content is visible by default; script arms only what is below the fold */
.armed { opacity: 0; transform: translateY(32px); }
.shown { opacity: 1; transform: none; transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
@media (prefers-reduced-motion: reduce) { .armed { transform: none; } .shown { transition: opacity 300ms linear; } }

/* tagline reveal: words go from muted to full, in reading order */
.tagline { padding-block: 128px 32px; }
.tagline p { font-size: 48px; line-height: 56px; font-weight: 600; letter-spacing: -0.02em; max-width: 880px; text-wrap: balance; }
.tagline .w { color: rgba(242,240,236,.28); transition: color 600ms var(--ease); }
.tagline .w.on { color: var(--ink); }
@media (max-width: 720px) { .tagline { padding-block: 96px 16px; } .tagline p { font-size: 30px; line-height: 36px; } }
@media (prefers-reduced-motion: reduce) { .tagline .w { color: var(--ink); transition: none; } }

/* frames for screenshots */
.shot { display: block; border-radius: 16px; overflow: hidden; background: var(--s1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 32px 96px rgba(0,0,0,.7); }
.shot img { display: block; width: 100%; }

/* footer */
.foot { margin-top: 128px; border-top: 1px solid var(--line); padding-block: 64px calc(48px + env(safe-area-inset-bottom, 0px)); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot h2 { font-size: 20px; line-height: 28px; display: flex; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.foot-mark { height: 56px; width: auto; }
.foot p { color: var(--muted); margin-top: 8px; max-width: 420px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot ul a { color: var(--muted); text-decoration: none; font-size: 14px; line-height: 20px; transition: color 300ms var(--ease); }
.foot ul a:hover { color: var(--ink); }
.foot h3 { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--dim); margin-bottom: 12px; }
.fine { margin-top: 48px; color: var(--dim); font-size: 12px; line-height: 16px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-grid > :first-child { grid-column: 1 / -1; } }
