/* ================================================================
   THE FORGE — MacArthur Media
   Soot, charcoal, incandescent ember. Industrial heat, not jewelry.
   ================================================================ */

:root {
  --bg: #0b0b0d;
  --bg-2: #101114;
  --bg-3: #16171b;
  --line: rgba(245, 240, 235, 0.1);
  --line-soft: rgba(245, 240, 235, 0.06);
  --ink: #efeae3;
  --ink-dim: #a8a49e;
  --ink-faint: #6d6a66;
  --ember: #ff6b1a;
  --ember-hot: #ffc46b;
  --ember-deep: #c2410c;
  --white-hot: #fff6ec;

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;

  --text-hero: clamp(3rem, 9.5vw, 8.5rem);
  --text-2xl: clamp(2.2rem, 5.4vw, 4.4rem);
  --text-xl: clamp(1.4rem, 2.4vw, 2rem);
  --text-lg: 1.25rem;
  --text-base: 1.0625rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;

  --space-section: clamp(6rem, 12vw, 11rem);
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --maxw: 84rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 180ms var(--ease-out);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ember); color: var(--bg); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- atmosphere ---------- */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none; z-index: 60;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain-shift 9s steps(6) infinite;
}
@keyframes grain-shift {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-2%,3%); }
  40% { transform: translate(3%,-2%); } 60% { transform: translate(-3%,-3%); }
  80% { transform: translate(2%,2%); }
}

#embers {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}

/* ---------- custom cursor: the spark ---------- */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 0; height: 0;
  pointer-events: none; z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cursor-core {
  position: absolute; top: -4px; left: -4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ember-hot);
  box-shadow: 0 0 12px 2px rgba(255, 107, 26, 0.8), 0 0 32px 6px rgba(255, 107, 26, 0.35);
  transition: transform var(--transition-interactive);
}
body.cursor-on .cursor { opacity: 1; }
body.cursor-hover .cursor-core { transform: scale(2.2); }
@media (hover: none) { .cursor { display: none; } }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
  transition: transform 0.3s var(--ease-out), background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11, 11, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.site-header.hidden { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 0.7rem; }
.logo { width: 34px; height: 34px; color: var(--ink); flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em;
}
.brand-name em { font-style: italic; font-weight: 400; color: var(--ink-dim); }
.site-nav { display: flex; align-items: center; gap: 1.9rem; }
.site-nav a {
  font-size: var(--text-sm); font-weight: 500; color: var(--ink-dim);
  transition: color var(--transition-interactive);
}
.site-nav a:hover { color: var(--white-hot); }
.nav-cta {
  color: var(--ember-hot) !important;
  border: 1px solid rgba(255, 107, 26, 0.4);
  padding: 0.45rem 1rem; border-radius: 2rem;
  transition: background var(--transition-interactive), border-color var(--transition-interactive), color var(--transition-interactive) !important;
}
.nav-cta:hover { background: rgba(255, 107, 26, 0.12); border-color: var(--ember); }

/* ---------- kicker ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ember);
  display: flex; align-items: center; gap: 0.9rem;
  margin-bottom: 2.2rem;
}
.kicker-rule { display: inline-block; width: 2.4rem; height: 1px; background: var(--ember); flex: none; }
.kicker.centered { justify-content: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.9rem; border-radius: 2.5rem;
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive),
              background var(--transition-interactive), border-color var(--transition-interactive), color var(--transition-interactive);
}
.btn:active { transform: translateY(1px); }
.btn-ember {
  color: #180a02;
  background: linear-gradient(120deg, var(--ember-hot) 0%, var(--ember) 55%, var(--ember-deep) 130%);
  box-shadow: 0 0 0 1px rgba(255, 160, 80, 0.35) inset, 0 8px 30px -8px rgba(255, 107, 26, 0.55);
}
.btn-ember:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 190, 120, 0.5) inset, 0 14px 44px -10px rgba(255, 107, 26, 0.75); }
.btn-ghost { color: var(--ink-dim); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--white-hot); border-color: rgba(245, 240, 235, 0.35); }
.btn-lg { font-size: 1.05rem; padding: 1.15rem 2.4rem; }

/* ---------- section scaffolding ---------- */
.section {
  position: relative; z-index: 2;
  padding: var(--space-section) var(--gutter);
  max-width: var(--maxw); margin: 0 auto;
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl); font-weight: 560;
  line-height: 1.02; letter-spacing: -0.015em;
  margin-bottom: 1.6rem;
}
.section-lede { max-width: 34rem; color: var(--ink-dim); margin-bottom: 4.5rem; }
.ember-text {
  background: linear-gradient(100deg, var(--ember-hot) 10%, var(--ember) 60%, var(--ember-deep) 110%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-style: italic; font-weight: 480;
}

/* ================= HERO ================= */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 7rem var(--gutter) 5.5rem;
  z-index: 2; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media video {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.05) brightness(0.85);
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(11,11,13,0.92) 0%, rgba(11,11,13,0.55) 45%, rgba(11,11,13,0.25) 100%),
    linear-gradient(to top, var(--bg) 0%, rgba(11,11,13,0.15) 30%, rgba(11,11,13,0.5) 100%);
}
.hero-inner { max-width: var(--maxw); width: 100%; margin: 0 auto; }
.hero-kicker { margin-bottom: 2.6rem; }
.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 540;
  line-height: 0.98; letter-spacing: -0.02em;
  margin-bottom: 2.2rem;
  text-wrap: balance;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .w { display: inline-block; }
.hero-title .dim { color: var(--ink-faint); }
.hero-title .ember {
  font-weight: 640;
  font-variation-settings: 'SOFT' 60, 'WONK' 0;
  padding-right: 0.04em;
  font-feature-settings: "liga" 0, "dlig" 0, "calt" 0;
  background: linear-gradient(95deg, var(--white-hot) 0%, var(--ember-hot) 30%, var(--ember) 75%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { max-width: 33rem; color: var(--ink-dim); font-size: var(--text-lg); line-height: 1.55; margin-bottom: 2.8rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem var(--gutter);
  border-top: 1px solid var(--line-soft);
}
.scroll-arrow { display: inline-block; animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ================= MANIFESTO ================= */
.manifesto-grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}
.manifesto-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl); font-weight: 560;
  line-height: 1.12; letter-spacing: -0.015em;
}
.manifesto-body p { color: var(--ink-dim); margin-bottom: 1.4rem; max-width: 36rem; }
.manifesto-body p:last-child { margin-bottom: 0; }
.manifesto-close { color: var(--ink) !important; font-size: var(--text-lg); }
.manifesto-close strong { font-weight: 700; }
.manifesto-figure img {
  width: 100%; aspect-ratio: 21/9; object-fit: cover;
  border-radius: 4px;
}
.manifesto-figure figcaption { margin-top: 1rem; }

/* ================= CRAFT ================= */
.craft-list { display: flex; flex-direction: column; gap: clamp(4.5rem, 8vw, 8rem); }
.craft-item {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.craft-item:nth-child(even) .craft-media { order: 2; }
.craft-media {
  position: relative; overflow: hidden; border-radius: 4px;
}
.craft-media img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.craft-item:hover .craft-media img { transform: scale(1.035); }
.craft-index { margin-bottom: 1.1rem; color: var(--ember); }
.craft-name {
  font-family: var(--font-display);
  font-size: var(--text-xl); font-weight: 600;
  letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.craft-alias { color: var(--ink-faint); }
.craft-line {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-lg); color: var(--ember-hot);
  margin-bottom: 1.1rem;
}
.craft-copy > p:not(.craft-line):not(.craft-index) { color: var(--ink-dim); max-width: 34rem; }
.craft-tags {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1.6rem;
}
.craft-tags li {
  border: 1px solid var(--line); border-radius: 2rem;
  padding: 0.3rem 0.85rem;
}

/* ================= PROCESS ================= */
.process-track { position: relative; margin-top: 4.5rem; }
.process-rail {
  position: absolute; left: 0; right: 0; top: 0.55rem; height: 1px;
  background: var(--line);
}
.process-heat {
  height: 100%; width: 0%;
  background: linear-gradient(to right, var(--ember-deep), var(--ember), var(--ember-hot));
  box-shadow: 0 0 12px rgba(255, 107, 26, 0.7);
}
.process-steps {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}
.process-step { padding-top: 2.2rem; position: relative; }
.process-step::before {
  content: ''; position: absolute; top: 0.3rem; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--ember);
  box-shadow: 0 0 10px rgba(255, 107, 26, 0.5);
}
.step-num { color: var(--ember); display: block; margin-bottom: 0.9rem; }
.process-step h3 {
  font-family: var(--font-display); font-size: var(--text-xl);
  font-weight: 600; margin-bottom: 0.7rem;
}
.process-step p { color: var(--ink-dim); font-size: var(--text-sm); line-height: 1.7; }

/* ================= DIVIDER ================= */
.divider {
  position: relative; z-index: 2;
  height: clamp(24rem, 60vh, 38rem);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.divider img {
  position: absolute; inset: 0; width: 100%; height: 110%;
  object-fit: cover;
  filter: brightness(0.75);
}
.divider::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 22%, transparent 78%, var(--bg) 100%);
}
.divider-quote {
  position: relative; z-index: 2;
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-2xl); font-weight: 500;
  line-height: 1.15; text-align: center;
  color: var(--white-hot);
  text-shadow: 0 2px 40px rgba(0,0,0,0.8);
  padding: 0 var(--gutter);
}

/* ================= WORK ================= */
.work-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.work-copy > p { color: var(--ink-dim); max-width: 36rem; margin-bottom: 1.4rem; }
.work-tests { list-style: none; margin: 2.2rem 0; display: flex; flex-direction: column; gap: 1.4rem; }
.work-tests li {
  display: flex; gap: 1.3rem; align-items: baseline;
  padding: 1.3rem 1.4rem;
  background: var(--bg-2);
  border: 1px solid var(--line-soft); border-radius: 4px;
}
.test-num { color: var(--ember); flex: none; }
.work-tests strong { color: var(--ink); }
.work-tests div { color: var(--ink-dim); font-size: var(--text-sm); line-height: 1.65; }
.work-close { color: var(--ink) !important; font-weight: 500; }
.work-figure { position: sticky; top: 6rem; }
.work-figure img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 4px;
}
.work-figure figcaption { margin-top: 1rem; }

/* ================= CTA ================= */
.cta { text-align: center; padding-bottom: clamp(7rem, 14vw, 13rem); }
.cta-title {
  font-family: var(--font-display);
  font-size: var(--text-hero); font-weight: 540;
  line-height: 0.98; letter-spacing: -0.02em;
  margin-bottom: 1.8rem;
}
.cta-sub { max-width: 30rem; margin: 0 auto 3rem; color: var(--ink-dim); }
.cta-note { margin-top: 1.6rem; max-width: 26rem; margin-left: auto; margin-right: auto; line-height: 1.9; }
.cta .btn-lg { max-width: 100%; overflow-wrap: anywhere; }

/* ================= FOOTER ================= */
.site-footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  padding: 4rem var(--gutter) 3rem;
  display: grid; grid-template-columns: 1.2fr 2fr;
  gap: 3rem;
  max-width: 100%;
}
.footer-brand p { color: var(--ink-faint); font-size: var(--text-sm); max-width: 20rem; margin-top: 1.1rem; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-cols > div { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-h { color: var(--ink-dim); margin-bottom: 0.3rem; }
.footer-cols a { transition: color var(--transition-interactive); }
.footer-cols a:hover { color: var(--ember-hot); }

/* ================= REVEALS ================= */
.rv { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .rv { opacity: 1 !important; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 960px) {
  .manifesto-grid, .work-grid { grid-template-columns: 1fr; }
  .craft-item { grid-template-columns: 1fr; gap: 1.6rem; }
  .craft-item:nth-child(even) .craft-media { order: 0; }
  .process-steps { grid-template-columns: 1fr 1fr; row-gap: 3rem; }
  .process-rail { display: none; }
  .work-figure { position: static; }
  .work-figure img { aspect-ratio: 16/10; }
  .site-footer { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .process-step::before { display: none; }
  .process-step { padding-top: 0; }
}
@media (max-width: 640px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .hero-sub { font-size: 1.125rem; }
  .btn-lg { font-size: 0.95rem; padding: 1.05rem 1.5rem; letter-spacing: 0; }
  .hero { padding-bottom: 7rem; }
  .hero-meta span:first-child, .hero-meta span:last-child { display: none; }
  .hero-meta { justify-content: center; }
  .process-steps { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .footer-cols { grid-template-columns: 1fr; gap: 2.2rem; }
}
