@font-face {
  font-family: 'FW Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/bodoni-moda.woff2') format('woff2');
}
@font-face {
  font-family: 'FW Text';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('fonts/jost.woff2') format('woff2');
}

:root {
  --bg: #080808;
  --surface: #131210;
  --surface-2: #1d1b17;
  --ink: #ece8e1;
  --ink-dim: #c9c2b7;
  --ink-muted: #9c978d;
  --ink-faint: #66625a;

  /* Copper: primary brand accent — logo, CTAs, hairlines, hover states */
  --copper-light: #f0ac72;
  --copper: #d08847;
  --copper-deep: #a85a2a;

  /* Silver: secondary metal — data readouts, secondary emphasis */
  --silver: #b9c0c8;
  --silver-dim: #7b828a;

  /* Light royal blue: reserved exclusively for core/inner-circle status markers */
  --royal: #8da0de;
  --royal-deep: #5f73b0;

  --rule: rgba(208, 136, 71, 0.16);
  --rule-strong: rgba(208, 136, 71, 0.32);
  --slide-count: 7;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'FW Text', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--copper-deep); color: var(--bg); }

h1, h2, h3 {
  font-family: 'FW Display', Georgia, serif;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}

p { margin: 0; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--copper);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  font-size: 0.9rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

a:focus-visible, button:focus-visible {
  outline: 1.5px solid var(--copper-light);
  outline-offset: 3px;
}

/* ---------- Grain: static texture overlay, no animation cost ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Mark: real logo asset (assets/fw-mark.png). Its native
   aspect ratio is wider than tall (~1.18:1) — always size by width
   with height:auto so it's never stretched into a square. */
.mark { display: block; height: auto; }

/* ---------- Brandbar ---------- */
.brandbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
  pointer-events: none;
}
.brandbar-mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'FW Display', serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}
.brandbar-mark .mark { width: 1.7rem; }

.dots {
  display: flex;
  gap: 0.6rem;
  pointer-events: auto;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 200ms var(--ease), transform 200ms var(--ease);
}
.dot:hover { transform: scale(1.2); }
.dot[aria-current="true"] { background: var(--copper); border-color: var(--copper); }

/* ---------- Edge nav ---------- */
.edge-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: rgba(8,8,8,0.5);
  backdrop-filter: blur(6px);
  color: var(--ink-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease);
}
.edge-nav:hover { color: var(--copper-light); border-color: var(--copper); background: rgba(19,18,16,0.7); }
.edge-nav svg { width: 1.4rem; height: 1.4rem; }
.edge-nav.prev { left: clamp(0.75rem, 3vw, 2rem); }
.edge-nav.next { right: clamp(0.75rem, 3vw, 2rem); }
.edge-nav.prev svg { transform: rotate(180deg); }

/* ---------- Track / slides ---------- */
.viewport {
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}
.track {
  height: 100%;
  width: calc(var(--slide-count) * 100vw);
  display: flex;
  will-change: transform;
}
/* Transform is driven by GSAP (script.js) for eased, choreographable
   slide-to-slide motion; no CSS transition here to avoid double-easing. */
.slide {
  width: 100vw;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 3rem);
}
.slide-inner {
  max-width: 62rem;
  width: 100%;
  margin: 0 auto;
  padding-top: 4rem;
}

/* Slides with a cinematic background clip */
.slide.has-bg-video { position: relative; }
.slide-bg-video,
.slide-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.slide-bg-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Readable pocket on the LEFT where the copy sits; the right side —
     where every clip's subject lives — stays clear so the animation reads. */
  background:
    linear-gradient(90deg, rgba(8,8,8,0.82) 0%, rgba(8,8,8,0.6) 30%, rgba(8,8,8,0.24) 58%, rgba(8,8,8,0.04) 80%, rgba(8,8,8,0) 100%),
    linear-gradient(0deg, rgba(8,8,8,0.45) 0%, rgba(8,8,8,0.05) 26%, rgba(8,8,8,0) 45%);
}
/* Data-dense slides (stats, grids) get a slightly deeper left pocket,
   still clear on the right so the cinematics show through. */
.slide-bg-scrim.strong {
  background:
    linear-gradient(90deg, rgba(8,8,8,0.9) 0%, rgba(8,8,8,0.74) 34%, rgba(8,8,8,0.42) 62%, rgba(8,8,8,0.12) 84%, rgba(8,8,8,0) 100%),
    linear-gradient(0deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.1) 30%, rgba(8,8,8,0) 48%);
}

/* Left-align copy over the clips so it sits in the readable pocket and
   never covers the animation's focal point. */
.slide.has-bg-video { justify-content: flex-start; }
.has-bg-video .slide-inner {
  position: relative;
  z-index: 2;
  max-width: 48rem;
  margin: 0;
  /* clear the left edge-nav button so copy never sits under it */
  padding-left: clamp(3rem, 6vw, 5.5rem);
}
.has-bg-video .slide-inner :is(h1, h2, h3, .lede, .sub, p, li) {
  text-shadow: 0 1px 18px rgba(5, 5, 5, 0.7);
}
/* Slightly wider pocket for the data / text slides that need the room */
#slide-2 .slide-inner, #slide-4 .slide-inner { max-width: 54rem; }
#slide-6 .slide-inner { max-width: 60rem; }
/* Active slide's clip fades up; inactive stay dark under the scrim */
.slide-bg-video { opacity: 0; transition: opacity 600ms ease; }
.slide.is-active .slide-bg-video,
.slide-bg-img { opacity: 1; }

/* Preloader — holds the curtain until all media has buffered */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 700ms ease;
}
.preloader.done {
  opacity: 0;
  pointer-events: none;
}
.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  text-align: center;
}
.preloader-mark {
  width: 60px;
  height: auto;               /* mark is wider than tall — never force square */
  display: block;
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  animation: pl-rise 1s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             pl-glow 3.2s ease-in-out 1s infinite;
}
.preloader-word {
  font-family: 'FW Text', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--ink-dim);
  opacity: 0;
  transform: translateY(10px);
  animation: pl-rise 1s cubic-bezier(0.16, 1, 0.3, 1) 0.14s forwards;
}
.preloader-track {
  width: 168px;
  height: 2px;
  background: rgba(236, 232, 225, 0.14);
  overflow: hidden;
  opacity: 0;
  animation: pl-rise 1s cubic-bezier(0.16, 1, 0.3, 1) 0.28s forwards;
}
.preloader-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--copper-light);
  transition: transform 350ms ease;
}
.preloader-status {
  font-family: 'FW Text', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0;
  animation: pl-rise 1s cubic-bezier(0.16, 1, 0.3, 1) 0.42s forwards;
}
@keyframes pl-rise {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pl-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(240, 172, 114, 0)); }
  50% { filter: drop-shadow(0 0 14px rgba(240, 172, 114, 0.35)); }
}
@media (prefers-reduced-motion: reduce) {
  .preloader-mark { animation: pl-rise 0.4s ease forwards; }
  .preloader-word, .preloader-track, .preloader-status { animation: pl-rise 0.4s ease forwards; }
}

/* Cinematic fade-to-black used on loop/wrap transitions */
.fade-veil {
  position: fixed;
  inset: 0;
  background: #050505;
  opacity: 0;
  z-index: 60;
  pointer-events: none;
}

/* The Forge — clean process list, no box */
.process {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  max-width: 42rem;
}
.process li {
  display: flex;
  gap: 1.1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}
.process li:last-child { border-bottom: 1px solid var(--rule); }
.process .ps-num {
  font-family: 'FW Display', serif;
  color: var(--copper-light);
  font-size: 0.95rem;
  flex: 0 0 auto;
  min-width: 1.5rem;
}
.process .ps-body h3 { font-size: 1.15rem; margin: 0 0 0.15rem; }
.process .ps-body p { color: var(--ink-dim); font-size: 0.92rem; max-width: 40ch; }

/* Deck progress indicator */
.progress {
  position: fixed;
  left: clamp(1.25rem, 4vw, 3rem);
  bottom: clamp(1.1rem, 3.5vh, 2.25rem);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: 'FW Text', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  pointer-events: none;
}
.progress-index b { color: var(--ink); font-weight: 600; }
.progress-track {
  width: clamp(80px, 14vw, 160px);
  height: 2px;
  background: rgba(236, 232, 225, 0.16);
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0.14);
  transform-origin: left center;
  background: var(--copper-light);
  transition: transform 700ms var(--ease);
}
.progress-label { color: var(--ink-dim); }
@media (max-width: 560px) {
  .progress-label { display: none; }
}

/* The Standard — community covenant */
.covenant h2 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); letter-spacing: -0.01em; max-width: 20ch; }
.covenant-list {
  list-style: none;
  counter-reset: covenant;
  margin: 2rem 0 2.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 2.5rem;
  max-width: 62rem;
}
.covenant-list li {
  counter-increment: covenant;
  position: relative;
  padding-left: 2.6rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.covenant-list li::before {
  content: counter(covenant, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.05em;
  font-family: 'FW Display', serif;
  font-size: 0.95rem;
  color: var(--copper);
  letter-spacing: 0.02em;
}
.covenant-list b { color: var(--ink); font-weight: 500; }
.covenant-list .chan {
  color: var(--silver);
  font-weight: 500;
  white-space: nowrap;
}
.apply-btn.ghost {
  background: transparent;
  border: 1px solid var(--copper-deep);
  color: var(--copper-light);
}
@media (max-width: 720px) {
  .covenant-list { grid-template-columns: 1fr; gap: 0.75rem; }
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.lede {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--ink-dim);
  max-width: 46ch;
  margin-top: 1.5rem;
}
.sub { color: var(--ink-muted); max-width: 50ch; margin-top: 1rem; }

/* Hero */
.hero { text-align: left; }
.hero-mark { width: clamp(2.75rem, 5.5vw, 3.75rem); margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -0.01em; max-width: 16ch; }
.hero .mission { margin-top: 2rem; color: var(--ink-muted); font-size: 0.95rem; }
.scroll-hint {
  margin-top: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--copper-light);
  font-family: 'FW Text', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0.5rem 0;
}
.scroll-hint svg { width: 1rem; height: 1rem; }

/* Forge */
.forge h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.forge-carousel {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.forge-viewport { flex: 1; overflow: hidden; }
.forge-track {
  display: flex;
  transition: transform 500ms var(--ease);
}
.forge-card {
  flex: 0 0 100%;
  display: flex;
  align-items: stretch;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid var(--rule);
  background: var(--surface);
  min-height: 14rem;
}
.forge-media {
  flex: 0 0 56%;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bg);
}
.forge-media img,
.forge-media .forge-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}
.forge-copy {
  flex: 1 1 auto;
  align-self: center;
}
@media (max-width: 720px) {
  .forge-card { flex-direction: column; gap: 1.25rem; }
  .forge-media { flex: 0 0 auto; }
}
.stage-num {
  font-family: 'FW Display', serif;
  color: var(--copper);
  font-size: 1.1rem;
}
.forge-card h3 { font-size: 1.6rem; margin: 0.75rem 0 1rem; }
.forge-card p { color: var(--ink-dim); max-width: 46ch; }

.forge-nav {
  flex-shrink: 0;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
.forge-nav:hover { color: var(--copper-light); border-color: var(--copper); }
.forge-nav svg { width: 1.2rem; height: 1.2rem; }
.forge-nav.prev svg { transform: rotate(180deg); }

.forge-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-left: calc(2.75rem + 1rem);
}
.forge-dots .fdot {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
}
.forge-dots .fdot.active { background: var(--copper); border-color: var(--copper); }

/* Proof */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 3rem;
  margin-top: 2.5rem;
}
.stat b {
  display: block;
  font-family: 'FW Display', serif;
  font-size: 2rem;
  color: var(--silver);
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 0.78rem; color: var(--ink-faint); }

.feed {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
}
.feed-line {
  display: flex;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.feed-line .t { color: var(--ink-faint); font-variant-numeric: tabular-nums; width: 3.5rem; flex-shrink: 0; }
.feed-line .who { color: var(--silver); width: 5rem; flex-shrink: 0; }
.feed-line .msg { color: var(--ink-dim); }

/* Inner circle */
.circle h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
/* Royal blue is reserved exclusively for this core/inner-circle marker —
   nowhere else on the site, so it keeps a sharp, singular meaning. */
.core-badge {
  margin-top: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid rgba(141, 160, 222, 0.35);
  padding: 0.85rem 1.5rem 0.85rem 0.85rem;
}
.core-mark-frame {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px var(--royal), 0 0 14px -2px rgba(141, 160, 222, 0.55);
}
.core-mark-frame .mark { width: 1.6rem; }
.core-badge span { font-size: 0.8rem; color: var(--royal); letter-spacing: 0.03em; }

/* How it works */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 2.5rem;
}
.works-item { background: var(--bg); padding: 1.75rem 1.5rem; }
.works-item h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.works-item p { color: var(--ink-muted); font-size: 0.92rem; }

/* Apply */
.apply h2 { font-size: clamp(2rem, 4.5vw, 3rem); max-width: 14ch; }
.apply-btn {
  margin-top: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--copper);
  color: var(--bg);
  text-decoration: none;
  font-family: 'FW Text', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 1rem 1.75rem;
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}
.apply-btn:hover { background: var(--copper-light); transform: translateY(-1px); }
.apply-btn svg { width: 1.3rem; height: 1.3rem; }
.fine-print { margin-top: 1.25rem; font-size: 0.78rem; color: var(--ink-faint); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .slide-inner { padding-top: 3rem; }
  .edge-nav { width: 2.5rem; height: 2.5rem; }
  .forge-carousel { gap: 0.5rem; }
  .forge-nav { width: 2.25rem; height: 2.25rem; }
  .forge-dots { padding-left: calc(2.25rem + 0.5rem); }
  .brandbar-mark span { display: none; }
  .stat-row { gap: 1.75rem 2rem; }
}

/* ---------- Mobile: cinematics fill the top, copy anchors to the bottom ---------- */
@media (max-width: 720px) {
  /* Block layout so tall slides scroll naturally instead of flex-clipping. */
  .slide { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }

  .has-bg-video .slide-inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;   /* seat copy against the dark lower band */
    min-height: 100%;
    max-width: none;
    margin: 0;
    padding-left: clamp(1.25rem, 5vw, 2rem);
    padding-right: clamp(1.25rem, 5vw, 2rem);
    padding-bottom: 4.75rem;      /* clear the bottom progress bar */
    box-sizing: border-box;
  }
  #slide-2 .slide-inner,
  #slide-4 .slide-inner,
  #slide-6 .slide-inner { max-width: none; }

  /* Portrait scrim reads bottom-up: dark where the text sits, clear up top
     where the animation plays — so the two stay intertwined, not stacked. */
  .slide-bg-scrim {
    background: linear-gradient(0deg,
      rgba(8,8,8,0.95) 0%, rgba(8,8,8,0.82) 30%, rgba(8,8,8,0.48) 56%,
      rgba(8,8,8,0.15) 80%, rgba(8,8,8,0) 100%);
  }
  .slide-bg-scrim.strong {
    background: linear-gradient(0deg,
      rgba(8,8,8,0.97) 0%, rgba(8,8,8,0.9) 40%, rgba(8,8,8,0.64) 68%,
      rgba(8,8,8,0.24) 88%, rgba(8,8,8,0) 100%);
  }

  .hero h1 { font-size: clamp(2.1rem, 8.5vw, 3rem); }
  .hero-mark { width: clamp(2.5rem, 9vw, 3.25rem); }
  .process { margin-top: 1.4rem; }
  .process li { padding: 0.62rem 0; }
  .covenant h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .covenant-list { margin: 1.4rem 0 1.75rem; }
  .stat-row { gap: 1.4rem 2rem; margin-top: 1.75rem; }
  .feed, .works-grid, .core-badge { margin-top: 1.75rem; }

  /* Progress bar spans the very bottom edge on phones. */
  .progress {
    left: 0; right: 0; bottom: 0;
    padding: 0.7rem clamp(1.25rem, 5vw, 2rem);
    gap: 0.7rem;
    background: linear-gradient(0deg, rgba(5,5,5,0.9), rgba(5,5,5,0));
  }
  .progress-track { flex: 1; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .track, .forge-track, .apply-btn, .dot, .edge-nav, .forge-nav { transition: none !important; }
}
