/* ============================================================
   Zelcast  ·  the board: one live field of cells, true black,
   one band of light, almost no words
   ============================================================ */

:root {
  --bg: #070605;
  --ink: #e9e4da;
  --ink-dim: rgba(233, 228, 218, 0.62);
  --ink-faint: rgba(233, 228, 218, 0.42);
  --hairline: rgba(233, 228, 218, 0.14);
  --amber: #d8a960;
  --type: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--type);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

html { scrollbar-color: rgba(233, 228, 218, 0.22) var(--bg); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(233, 228, 218, 0.18);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(233, 228, 218, 0.32); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 3px;
}

.cfield input:focus-visible { outline: none; }

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

/* ---------------------------------------------------------- */
/* The field                                                   */
/* ---------------------------------------------------------- */

#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

main, .site-foot, .site-head { position: relative; z-index: 1; }

/* ---------------------------------------------------------- */
/* Header                                                      */
/* ---------------------------------------------------------- */

.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  padding: clamp(1.1rem, 2.5vw, 1.75rem) var(--gutter);
  mix-blend-mode: difference;
}

.wordmark {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  text-decoration: none;
}

/* ---------------------------------------------------------- */
/* Hero                                                        */
/* ---------------------------------------------------------- */

.hero { height: 165vh; }

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
}

.hero-copy {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(3.5rem, 9vh, 6.5rem);
}

.hero-title {
  font-size: clamp(2.5rem, 8.7vw, 8.9rem);
  max-width: none;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: #f4f1ea;
}

/* each line rides in its own mask so it can rise into view */
.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.hero-title .line i {
  display: block;
  font-style: normal;
  will-change: transform;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: clamp(3rem, 7vh, 5rem);
  background: var(--ink-faint);
  transform-origin: bottom;
}

/* ---------------------------------------------------------- */
/* Manifesto                                                   */
/* ---------------------------------------------------------- */

.manifesto {
  padding: clamp(6rem, 16vh, 11rem) var(--gutter);
  display: flex;
  justify-content: center;
}

.manifesto { flex-direction: column; align-items: center; }

.manifesto-text {
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 32ch;
  text-align: center;
  color: #f4f1ea;
}

.manifesto-sub {
  margin-top: clamp(1.1rem, 2.4vh, 1.7rem);
  font-weight: 400;
  font-size: clamp(0.95rem, 1.15vw, 1.12rem);
  letter-spacing: 0.005em;
  line-height: 1.4;
  max-width: 38ch;
  text-align: center;
  text-wrap: balance;
  color: var(--ink-dim);
}

/* ---------------------------------------------------------- */
/* Method                                                      */
/* ---------------------------------------------------------- */

.method { padding: 0 var(--gutter); }

.method-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: start;
}

.method-media {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
}

/* an empty stage: the field performs inside this rectangle */
.method-stage {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 70vh;
}

.method-steps { padding: 12vh 0 14vh; }

.step {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.step-rule {
  height: 1px;
  background: var(--hairline);
  transform-origin: left;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

/* on small screens each step gets its own slice of the board */
.step-stage { display: none; }

.step-index {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.step-title {
  font-size: clamp(2.1rem, 3.8vw, 3.6rem);
  margin-top: 1.2rem;
}

.step-text {
  margin-top: 1.1rem;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-dim);
  max-width: 36ch;
}

/* ---------------------------------------------------------- */
/* The cut                                                     */
/* ---------------------------------------------------------- */

.cut-pin {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vh, 3.2rem);
  padding: clamp(7.5rem, 16vh, 9.5rem) var(--gutter) clamp(3rem, 8vh, 5rem);
}

.cut-label {
  position: absolute;
  top: clamp(4.5rem, 10vh, 6rem);
  left: var(--gutter);
  right: var(--gutter);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* labels carry a quiet position in the document */
.cut-label,
.focus-label,
.contact-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.label-index {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.cut-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 24), 1fr);
  gap: clamp(4px, 0.55vw, 7px);
  width: min(880px, 90vw);
}

.cut-grid .cell {
  background: var(--amber);
  aspect-ratio: 1;
  border-radius: 2px;
}

.cut-lines {
  position: relative;
  width: 100%;
  text-align: center;
}

.cut-line {
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cut-kicker {
  font-size: 0.92rem;
  color: var(--ink-dim);
  text-align: center;
}

/* layout applied only when the scroll choreography runs */
.js-cut .cut-lines { height: 2.6em; }

.js-cut .cut-line {
  position: absolute;
  inset: 0 0 auto 0;
  opacity: 0;
}

.js-cut .cut-kicker { opacity: 0; }

/* static fallback: no grid, lines read as a list */
.cut:not(.js-cut) .cut-grid { display: none; }
.cut:not(.js-cut) .cut-line { margin-bottom: 0.4em; }

/* ---------------------------------------------------------- */
/* Ledger                                                      */
/* ---------------------------------------------------------- */

.ledger { padding: clamp(6rem, 15vh, 11rem) var(--gutter) 0; }

.ledger-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.ledger-rule {
  height: 1px;
  background: var(--hairline);
  transform-origin: left;
  margin-bottom: clamp(1.4rem, 3.5vh, 2.4rem);
}

/* dot-matrix numerals built by JS; plain text until then */
.ledger-num {
  display: flex;
  gap: clamp(8px, 1vw, 14px);
  min-height: clamp(4rem, 9vw, 9rem);
  align-items: flex-start;
}

.ledger-fallback {
  font-weight: 600;
  font-size: clamp(3.4rem, 8.5vw, 8.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.ledger-num .digit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(4px, 0.5vw, 7px);
}

.ledger-num .dcell {
  width: clamp(12px, 1.7vw, 24px);
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--amber);
}

.ledger-num .dcell.off { opacity: 0.07; }

.ledger-item p {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  color: var(--ink-dim);
}

/* ---------------------------------------------------------- */
/* Focus                                                       */
/* ---------------------------------------------------------- */

.focus { padding: clamp(6rem, 14vh, 10rem) var(--gutter); }

.focus-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: clamp(2.2rem, 5vh, 4rem);
}

.focus-list { list-style: none; }

.focus-row { display: block; }

.row-rule {
  height: 1px;
  background: var(--hairline);
  transform-origin: left;
}

.row-body {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding: clamp(1.5rem, 3.2vh, 2.4rem) 0;
  transition: padding-left 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.focus-row:hover .row-body { padding-left: clamp(0.75rem, 2vw, 2rem); }

.focus-name { font-size: clamp(1.7rem, 4vw, 3.7rem); }

.focus-note {
  font-size: 0.9rem;
  color: var(--ink-dim);
  text-align: right;
  flex-shrink: 0;
  max-width: 24ch;
}

.focus-roles {
  margin-top: clamp(2.2rem, 5vh, 3.5rem);
  font-size: 0.9rem;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------- */
/* Contact                                                     */
/* ---------------------------------------------------------- */

.contact { padding: clamp(6rem, 15vh, 10rem) var(--gutter); }

.contact-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: clamp(2rem, 5vh, 3.2rem);
}

.contact-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: end;
  max-width: 64rem;
}

.cfield {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.8rem;
}

.cfield label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.45rem;
}

.cfield input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--type);
  font-size: 1.02rem;
}

.cfield input::placeholder { color: var(--ink-faint); }

.cfield:focus-within { border-color: var(--amber); }

.contact-send {
  appearance: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--type);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.95rem 2.6rem;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease;
}

.contact-send:hover {
  background: var(--ink);
  color: var(--bg);
}

.contact-status {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  color: var(--amber);
  min-height: 1.3em;
  margin-top: 0.4rem;
}

/* ---------------------------------------------------------- */
/* Footer                                                      */
/* ---------------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--hairline);
  padding: clamp(2rem, 5vh, 3.5rem) var(--gutter) 1.6rem;
}

.foot-mark {
  overflow: hidden;
  line-height: 0.84;
}

.foot-mark-inner {
  display: inline-block;
  font-weight: 600;
  font-size: clamp(4rem, 18.5vw, 19rem);
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: #f4f1ea;
  will-change: transform;
}

.foot-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  font-size: 0.82rem;
  color: var(--ink-dim);
}

/* ---------------------------------------------------------- */
/* Mobile                                                      */
/* ---------------------------------------------------------- */

@media (max-width: 860px) {
  .hero { height: 140vh; }

  .method-grid { grid-template-columns: 1fr; }

  .method-media { display: none; }

  .method-steps { padding: 3rem 0 4rem; }

  .step {
    min-height: 55vh;
    margin-bottom: 3rem;
  }

  .step-rule { margin-bottom: 1.8rem; }

  .step-stage {
    display: block;
    height: clamp(90px, 20vw, 130px);
    margin-bottom: 1.8rem;
  }


  .ledger-row { grid-template-columns: 1fr; gap: 3rem; }

  .row-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .focus-note { text-align: left; }

  .contact-form { grid-template-columns: 1fr; }

  .contact-send { justify-self: start; }

  .foot-row { flex-direction: column; gap: 0.4rem; }
}

/* ---------------------------------------------------------- */
/* Reduced motion                                              */
/* ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  #field { display: none; }
  .hero { height: auto; }
  .hero-sticky { position: relative; min-height: 80vh; }
  .row-body, .focus-row:hover .row-body { transition: none; }
}
