/* ═══════════════════════════════════════════════════════════════════════
   REPURPOSE STUDIO — shared design system
   Tokens lifted verbatim from the app's own public/style.css so the site and
   the product are visibly the same object. Do not invent new colours here;
   compose with these.

   Dark is the marketing default (the product's "Night Studio" direction), but
   both themes are complete and the toggle works in both directions.
   ═══════════════════════════════════════════════════════════════════════ */

:root,
:root[data-theme="dark"] {
  --void: #12110e;          /* page */
  --coal: #1a1915;          /* raised cards/panels */
  --coal-2: #211f1a;        /* inputs, insets */
  --bone: #f5f2e9;          /* primary text */
  --bone-dim: #cbc5b8;      /* secondary text */
  --ash: #99938a;           /* tertiary */
  --line: rgba(240, 235, 224, 0.16);
  --line-strong: rgba(240, 235, 224, 0.34);
  --fire: #ff5a14;          /* the one accent, for fills and large display type */
  --fire-ink: #ff6a2b;      /* the accent as SMALL TEXT: 6.2:1 on dark surfaces */
  --fire-soft: rgba(255, 90, 20, 0.14);
  --card-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
}

:root[data-theme="light"] {
  --void: #faf8f3;
  --coal: #ffffff;
  --coal-2: #f6f3ec;
  --bone: #191817;
  --bone-dim: #575349;
  /* was #8b8579, only 3.45:1 on the page and 3.67:1 on cards. It is the most
     reused small-text colour in the system (kickers, footer, form labels), so
     it has to clear 4.5:1. */
  --ash: #6b665c;
  --line: #e5e0d4;
  --line-strong: #c9c2b2;
  --fire: #e64500;
  /* #e64500 is only 3.79:1 on the page as small text. This is the readable
     variant for anything below large-display size. */
  --fire-ink: #c23a00;
  --fire-soft: rgba(230, 69, 0, 0.09);
  --card-shadow: 0 8px 28px -14px rgba(30, 25, 15, 0.25);
}

:root {
  --mono: "IBM Plex Mono", "Consolas", ui-monospace, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* spacing scale — use these, not arbitrary pixel values */
  --s1: 6px;  --s2: 10px; --s3: 16px; --s4: 24px;
  --s5: 36px; --s6: 56px; --s7: 88px; --s8: 132px;

  --r: 4px;          /* the product uses tight radii — keep it sharp */
  --r-lg: 8px;
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
::selection { background: var(--fire); color: #fff; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--bone);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- type ---- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.06; letter-spacing: -0.015em; }
h1 { font-size: clamp(44px, 7.2vw, 92px); }
h2 { font-size: clamp(32px, 4.4vw, 56px); }
h3 { font-size: clamp(21px, 2.2vw, 27px); line-height: 1.2; }
.accent { color: var(--fire); font-style: italic; }

.kicker {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 2.2px; text-transform: uppercase; color: var(--ash);
  margin-bottom: var(--s3);
}
.lede { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--bone-dim); max-width: 62ch; }
.muted { color: var(--bone-dim); }
.small { font-size: 14px; }
.mono { font-family: var(--mono); }

/* ---- layout ---- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s4); }
.section { padding: var(--s7) 0; position: relative; }
.section-tight { padding: var(--s6) 0; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.grid { display: grid; gap: var(--s4); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---- surfaces ---- */
.card {
  background: var(--coal);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s4);
  box-shadow: var(--card-shadow);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 1.1px; text-transform: uppercase;
  padding: 15px 26px; min-height: 48px;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: transparent; color: var(--bone); cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { border-color: var(--bone); transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--fire); outline-offset: 3px; }
/* White on the accent measured 3.12:1 in dark and 4.03:1 in light, both below
   the 4.5:1 needed for 12.5px uppercase text, on the most important button on
   every page. A near-black label on the same orange clears it comfortably in
   both themes and keeps the brand colour vivid. */
.btn-primary { background: var(--fire); border-color: var(--fire); color: #12110e; }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--fire); }

/* ---- badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--fire-ink);
  background: var(--fire-soft); border: 1px solid var(--fire-soft);
  padding: 6px 12px; border-radius: 100px;
}

/* ---- reveal-on-scroll: opt in with .reveal, activated by site.js ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Accessibility is not optional: every animation in this system must vanish
   for anyone who asked their OS to stop moving things. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--fire); color: #fff; padding: 12px 18px;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ═══════════════════════════════════════════════════════════════════════
   SHARED CHROME — header, nav, footer, theme toggle.
   Lives here (not in a page stylesheet) so every page is identical without
   one page's author having to wait on another's.
   ═══════════════════════════════════════════════════════════════════════ */

.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s3) var(--s4);
  background: color-mix(in srgb, var(--void) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-head-inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: var(--s4);
}
.wordmark {
  font-family: var(--serif); font-size: 21px; letter-spacing: -0.01em;
  color: var(--bone); margin-right: auto; white-space: nowrap;
}
.wordmark em { color: var(--fire); font-style: italic; }
.site-nav { display: flex; align-items: center; gap: var(--s4); }
.site-nav a {
  font-family: var(--mono); font-size: 12px; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--bone-dim);
  padding: 6px 0; position: relative; transition: color 0.25s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--bone); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--fire);
}
.theme-toggle {
  background: none; border: 1px solid var(--line); border-radius: var(--r);
  color: var(--bone-dim); cursor: pointer; font-size: 14px;
  width: 38px; height: 38px; display: grid; place-items: center;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--bone); }
.nav-burger { display: none; background: none; border: 0; color: var(--bone); cursor: pointer; font-size: 22px; padding: 6px; }

@media (max-width: 760px) {
  .nav-burger { display: block; }
  .site-nav {
    position: fixed; inset: 58px 0 auto 0; flex-direction: column;
    align-items: stretch; gap: 0; padding: var(--s2) var(--s4) var(--s4);
    background: var(--coal); border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform 0.35s var(--ease);
  }
  .site-nav.open { transform: none; }
  .site-nav a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
}

.site-foot {
  border-top: 1px solid var(--line); padding: var(--s6) 0 var(--s5);
  color: var(--bone-dim); font-size: 14px;
}
.site-foot-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: var(--s5); }
.site-foot h4 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--ash); margin-bottom: var(--s2); font-weight: 500;
}
.site-foot a { display: block; padding: 5px 0; color: var(--bone-dim); transition: color 0.2s var(--ease); }
.site-foot a:hover { color: var(--fire-ink); }
.site-foot-base { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.8px; color: var(--ash); }

/* Credit line. Styled so it reads as an attribution rather than a nav link,
   but is still obviously clickable. */
.site-credit a {
  color: var(--bone-dim);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.site-credit a:hover { color: var(--fire-ink); border-color: var(--fire-ink); }
.site-credit a:focus-visible { outline: 2px solid var(--fire); outline-offset: 3px; }
