/* =========================================================
   cat wif sword · Holder Crates
   base.css: tokens, reset, typography, layout, buttons
   ========================================================= */

:root {
  /* night & stone */
  --night: #0c0e12;
  --night-2: #101318;
  --stone: #171b22;
  --stone-2: #1f242d;
  --stone-3: #282e39;
  --line: #2c333e;
  --line-2: #3b4351;

  /* mist & steel */
  --mist: #a3acb9;
  --fog: #c9d0d9;
  --steel: #e8ecf1;
  --white: #f7f5f0;

  /* golden hour & cat fur */
  --ember: #ff8a3d;
  --ember-deep: #c4581f;
  --ember-soft: #ffb57a;
  --gold: #f5c35c;
  --dusk: #e0663a;

  /* parchment */
  --parch: #efe5cf;
  --parch-2: #e3d5b6;
  --parch-line: #cbb88f;
  --ink: #1d1913;
  --ink-2: #4a4134;

  /* type */
  --font-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heraldic: "Grenze Gotisch", "Bricolage Grotesque", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* shape */
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;

  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 68px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--night);
  color: var(--fog);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ember-soft); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--gold); }
code { font-family: var(--font-mono); font-size: .9em; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- accessibility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--ember); color: var(--night);
  padding: .6rem 1rem; border-radius: var(--r-sm);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; }

.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ember-soft);
  margin-bottom: .9rem;
  display: flex; flex-wrap: wrap; gap: .5em; align-items: center;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: currentColor;
  display: inline-block;
}
.eyebrow-ink { color: var(--ember-deep); }

.section-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.025em;
  color: var(--white);
  text-wrap: balance;
}
.section-lede {
  margin-top: 1rem;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--mist);
  max-width: 62ch;
}

.fineprint {
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.55;
  color: var(--mist);
  letter-spacing: .01em;
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--steel);
  --btn-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.3rem;
  border-radius: 12px;
  border: 2px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.005em;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s var(--ease), background-color .2s, border-color .2s, box-shadow .2s, color .2s;
}
.btn:hover { color: var(--btn-fg); }
.btn:active { transform: translateY(2px); }

.btn-primary {
  --btn-bg: var(--ember);
  --btn-fg: #1a0e05;
  --btn-bd: #1a0e05;
  box-shadow: 0 4px 0 var(--ember-deep), 0 10px 30px -10px rgba(255, 138, 61, .55);
}
.btn-primary:hover { --btn-bg: #ff9a55; box-shadow: 0 5px 0 var(--ember-deep), 0 14px 34px -10px rgba(255, 138, 61, .7); transform: translateY(-1px); }
.btn-primary:active { box-shadow: 0 1px 0 var(--ember-deep); transform: translateY(3px); }

.btn-ghost { --btn-bg: rgba(255, 255, 255, .02); --btn-bd: var(--line-2); }
.btn-ghost:hover { --btn-bd: var(--fog); --btn-bg: rgba(255, 255, 255, .05); }

.btn-text { --btn-bd: transparent; color: var(--mist); text-decoration: underline; text-underline-offset: .2em; }
.btn-text:hover { color: var(--steel); }

.btn-sm { min-height: 44px; padding: .55rem 1rem; font-size: .95rem; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: .9rem 1.55rem; font-size: 1.06rem; }

.copy-btn {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ember-soft);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: .3rem .55rem;
  min-height: 32px;
  min-width: 52px;
  transition: border-color .2s, color .2s;
}
.copy-btn:hover { border-color: var(--ember-soft); }
.copy-btn.is-copied { color: var(--gold); border-color: var(--gold); }

/* ---------- reveal (enabled only when JS adds .js and motion allowed) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
