/* Stillforge — styles
   Palette and type per brand/BRAND.md. Ember is rationed. */

:root {
  --iron: #0E1012;
  --steel: #16191D;
  --slate: #22262B;
  --line: #2C3137;
  --ash: #8B939C;
  --bone: #F1EEE8;
  --ember: #E4602A;
  --heat: #FFB45E;

  --font-head: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(80px, 12vw, 150px);
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--iron);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); font-weight: 600; letter-spacing: -0.02em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.narrow { max-width: 760px; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--bone); color: var(--iron);
  padding: 8px 12px; border-radius: 4px; z-index: 100;
}
.skip:focus { left: 8px; }

/* Type scale */
.h-hero {
  font-size: clamp(2.75rem, 8.5vw, 6.5rem);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.035em;
  max-width: 14ch;
}
.h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 28ch;
}
.h2-wide { max-width: 24ch; }
.grid-2 .h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); max-width: none; }
.h3 {
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
  margin: 0 0 20px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px; height: 2px;
  background: var(--ember);
  vertical-align: middle;
  margin-right: 10px;
  position: relative; top: -1px;
}
.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.5;
  color: var(--ash);
  max-width: 56ch;
  margin: 32px 0 40px;
}
.sub {
  color: var(--ash);
  font-size: 1.0625rem;
  max-width: 62ch;
  margin-top: 20px;
}
.sub-wide { max-width: 70ch; }
.copy p { color: var(--ash); font-size: 1.0625rem; }
.copy p:last-child { margin-bottom: 0; }
.pull {
  color: var(--bone) !important;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.35rem !important;
  letter-spacing: -0.01em;
  line-height: 1.3;
  border-left: 2px solid var(--ember);
  padding-left: 18px;
  margin-top: 28px !important;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--bone);
  color: var(--iron);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 16px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--bone);
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--ember); border-color: var(--ember); color: var(--bone); }
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--bone);
  border-color: var(--line);
}
.btn-ghost:hover { background: transparent; border-color: var(--bone); color: var(--bone); }
.btn-sm { padding: 10px 14px; font-size: 14px; }
.btn-lg { padding: 20px 28px; font-size: 16px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--iron) 72%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--bone); }
.mark { width: 30px; height: 30px; display: block; }
.wordmark {
  font-family: var(--font-head);
  font-size: 21px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.w-still { font-weight: 500; }
.w-forge { font-weight: 700; }
.links { display: flex; gap: 28px; }
.links a {
  font-size: 14.5px;
  color: var(--ash);
  transition: color .15s ease;
}
.links a:hover { color: var(--bone); }

/* Hero */
.hero {
  position: relative;
  padding: clamp(80px, 13vw, 170px) 0 clamp(60px, 8vw, 110px);
  overflow: hidden;
}
.hero .eyebrow { margin-bottom: 28px; }
.heat-word {
  position: relative;
  display: inline-block;
  color: var(--bone);
}
.heat-word::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0.04em;
  height: 0.07em;
  background: linear-gradient(90deg, var(--ember), var(--heat), var(--ember));
  background-size: 200% 100%;
  animation: heat-shift 4s linear infinite;
  border-radius: 2px;
}
@keyframes heat-shift { to { background-position: -200% 0; } }

/* Forge bed: still lines, one carries heat */
.forge-bed {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  padding-bottom: 0;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.forge-bed span {
  display: block;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.forge-bed span::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -30%;
  width: 30%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--ember) 40%, var(--heat) 60%, transparent);
  filter: blur(0.5px);
  opacity: 0;
}
.forge-bed span:nth-child(3)::after {
  opacity: 1;
  animation: heat-travel 7s cubic-bezier(.4,0,.2,1) infinite;
}
.forge-bed span:nth-child(5)::after {
  opacity: .5;
  animation: heat-travel 11s cubic-bezier(.4,0,.2,1) infinite 3s;
}
@keyframes heat-travel {
  0% { left: -30%; }
  100% { left: 130%; }
}

/* Principle strip */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--steel);
}
.strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.strip-inner > div {
  padding: 22px 20px 22px 0;
  font-size: 14.5px;
  color: var(--ash);
  display: flex; align-items: baseline; gap: 12px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.strip-inner > div:first-child { border-left: 0; padding-left: 0; }
.strip-n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ember);
}

/* Sections */
.section { padding: var(--section) 0; }
.section-alt { background: var(--steel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: clamp(44px, 6vw, 72px); }
.section-statement { text-align: left; }
.section-statement .h2 { font-size: clamp(2.25rem, 5vw, 4rem); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.grid-2 .copy { padding-top: 56px; }

/* Steps */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.step {
  background: var(--steel);
  padding: 32px 28px 36px;
}
.step p { color: var(--ash); margin: 0; font-size: 1rem; }
.step-top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 36px;
}
.step-n { color: var(--ash); }
.step-dur { color: var(--ember); }

/* Pattern cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: var(--iron);
  padding: 28px 24px 30px;
  min-height: 200px;
  display: flex; flex-direction: column;
  transition: background .18s ease;
}
.card:hover { background: var(--steel); }
.card h3 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.card p { color: var(--ash); font-size: 15px; margin: 0; }
.card-cta {
  background: var(--steel);
  position: relative;
}
.card-cta h3 { color: var(--bone); }
.card-cta .arrow {
  margin-top: auto;
  color: var(--ember);
  font-size: 22px;
  transition: transform .18s ease;
}
.card-cta:hover { background: var(--slate); }
.card-cta:hover .arrow { transform: translateX(6px); }

/* Spec sheet (Temper) */
.spec {
  border: 1px solid var(--line);
  background: var(--iron);
  font-size: 15px;
}
.spec-head {
  display: flex; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
}
.spec-head span:first-child { color: var(--ember); font-weight: 500; }
.spec-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.spec-row:last-child { border-bottom: 0; }
.spec-k {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone);
  padding-top: 2px;
}
.spec-v { color: var(--ash); }

/* Compare table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); }
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 760px;
}
.compare th, .compare td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare thead th {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
  background: var(--steel);
}
.compare tbody th {
  font-weight: 500;
  color: var(--bone);
  width: 22%;
}
.compare td { color: var(--ash); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare .is-us { background: color-mix(in srgb, var(--ember) 7%, var(--iron)); color: var(--bone); }
.compare thead .is-us { color: var(--ember); background: color-mix(in srgb, var(--ember) 12%, var(--steel)); }

/* Partner box */
.partner-box {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(36px, 5vw, 64px);
  border: 1px solid var(--line);
  background: var(--steel);
  position: relative;
  scroll-margin-top: 90px;
}
.partner-box::before {
  content: "";
  position: absolute; top: -1px; left: -1px; right: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--ember), var(--heat), var(--ember));
}
.partner-box .sub { max-width: 52ch; }
.partner-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.partner-cta .btn { width: 100%; white-space: normal; text-align: center; }
.fine {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ash);
  margin: 0;
  letter-spacing: 0.02em;
}

/* Manifesto */
.manifesto p {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--bone);
  margin-bottom: 1.1em;
}
.manifesto em { font-style: italic; color: var(--ash); }
.manifesto .tagline {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
  margin-top: 40px;
}

/* FAQ */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 44px 22px 0;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  color: var(--ash);
  font-size: 20px;
  transition: transform .2s ease, color .2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--ember); }
.faq details p { color: var(--ash); margin: 0 0 24px; max-width: 64ch; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  background: var(--steel);
  padding: 56px 0 28px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 40px;
}
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
  margin: 18px 0 0;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 14.5px; }
.footer-links a { color: var(--ash); transition: color .15s ease; }
.footer-links a:hover { color: var(--bone); }
.footer-links a:first-child { color: var(--bone); }
.footer-legal {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 48px; padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ash);
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .forge-bed span::after, .heat-word::after { animation: none; }
}

/* Responsive */
@media (max-width: 980px) {
  .links { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .strip-inner { grid-template-columns: repeat(2, 1fr); }
  .strip-inner > div { padding: 18px 20px; border-top: 1px solid var(--line); }
  .strip-inner > div:nth-child(-n+2) { border-top: 0; }
  .strip-inner > div:nth-child(odd) { border-left: 0; padding-left: 0; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 .copy { padding-top: 0; }
  .steps { grid-template-columns: 1fr; }
  .partner-box { grid-template-columns: 1fr; }
  .h2 { max-width: none; }
  .forge-bed { height: 80px; gap: 14px; }
  .hero { padding-bottom: 120px; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .strip-inner { grid-template-columns: 1fr; }
  .strip-inner > div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .strip-inner > div:first-child { border-top: 0; }
  .spec-row { grid-template-columns: 1fr; gap: 6px; }
  .cta-row .btn { width: 100%; white-space: normal; }
}
