/* ============================================================
   forsake.us — launch page styles
   Tokens
   ============================================================ */
:root {
  --bg: #0B0B0D;
  --bg-raise: #101013;
  --ink: #ECE9E1;
  --dim: #79756C;
  --line: rgba(236, 233, 225, 0.14);
  --line-strong: rgba(236, 233, 225, 0.32);
  --acc: #BF2E1F;

  --font-display: "Archivo Black", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
  --font-mono: "Space Mono", monospace;
}

/* ============================================================
   Base
   ============================================================ */
* { 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: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: var(--acc); color: #fff; }

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

/* site background video + light veil (kept subtle so the footage shows
   through; legibility-only, not a blackout) */
.bg-video {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bg-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 95% at 50% 0%, rgba(11, 11, 13, 0.18), rgba(11, 11, 13, 0.32)),
    linear-gradient(rgba(11, 11, 13, 0.22), rgba(11, 11, 13, 0.4));
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   Shared bits
   ============================================================ */
.overline,
.override {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--acc);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* top bar */
.topbar {
  position: fixed;
  top: var(--morph-h, 84px); left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  background: transparent;
  pointer-events: none;
}
.topbar-mark { color: var(--ink); letter-spacing: 0.3em; }
.topbar-status { display: flex; align-items: center; }

/* ============================================================
   Morphing countdown — liquid text band pinned to the top
   ============================================================ */
.morph-band {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--morph-h, 84px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: transparent;
  pointer-events: none;
}

.morph-countdown {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  /* threshold SVG only — the 0.6px blur is gone so settled text stays crisp;
     the crossfade still reads as a liquid morph through the SVG matrix. */
  filter: url(#mc-threshold);
}

.mc-text {
  grid-area: 1 / 1;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(11, 11, 13, 0.9), 0 0 12px rgba(11, 11, 13, 0.6);
  will-change: filter, opacity;
}

/* ============================================================
   GATE (locked)
   ============================================================ */
.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(var(--morph-h, 84px) + 40px) 24px 40px;
}

.gate .overline { margin-bottom: 28px; }

/* Dither Reveal hero — replaces the inkbleed wordmark on the gate.
   Faithful vanilla port of Originkit DitherReveal: dithered + wave-distorted
   image, full color revealed around the pointer. Box matches the logo's
   3:1 banner aspect so `cover` shows the whole logo without cropping. */
.dither-gate {
  width: 440px;
  max-width: 85vw;
  min-width: 0;
  flex-shrink: 0;
  aspect-ratio: 3 / 1;
  margin: 0 auto 30px;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}

.gate-line {
  font-size: 1.02rem;
  color: var(--ink);
  text-align: center;
  margin-bottom: 42px;
}

.gate-line br { display: none; }

/* lock form */
.lock { width: min(420px, 92vw); margin-bottom: 24px; }

.lock-row {
  display: flex;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s;
}
.lock-row:focus-within { border-color: var(--ink); }

.lock-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  padding: 14px 4px;
}
.lock-input::placeholder { color: var(--dim); letter-spacing: 0.14em; }

.lock-btn {
  background: transparent;
  border: 0;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 14px 4px 14px 18px;
  transition: color 0.2s;
}
.lock-btn:hover { color: var(--ink); }

.lock-error {
  min-height: 1.2em;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--acc);
  opacity: 0;
  transition: opacity 0.25s;
}
.lock-error.show { opacity: 1; }

.gate-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

/* gate enter button */
.gate-enter {
  position: relative;
  display: block;
  margin: 0 auto 24px;
  background: transparent;
  border: 0;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0 0 6px;
  cursor: pointer;
  transition: color 0.3s, letter-spacing 0.3s, text-shadow 0.3s;
}
.gate-enter::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.gate-enter:hover {
  color: var(--ink);
  letter-spacing: 0.38em;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}
.gate-enter:hover::after {
  transform: scaleX(1);
}

/* password modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-overlay[hidden] { display: none; }

.modal-box {
  position: relative;
  width: min(420px, 92vw);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  padding: 48px 36px 36px;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: 0;
  color: var(--dim);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--ink); }

.modal-box .overline { margin-bottom: 28px; }
.modal-box .lock { width: 100%; margin-bottom: 0; }

.mini-foot {
  position: absolute;
  bottom: 26px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  opacity: 0.6;
}

/* 10% off voucher link — sits above the footer, underline on hover */
.voucher-bar {
  position: relative;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.6;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: voucher-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1s both;
}
.voucher-bar .voucher-label {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}
/* sliding underline — white, matches the site ink */
.voucher-bar .voucher-label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.voucher-bar:hover .voucher-label::after {
  transform: scaleX(1);
}
.voucher-bar .voucher-arrow {
  display: inline-block;
  font-weight: 700;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.voucher-bar:hover .voucher-arrow { transform: translateX(4px); }
.voucher-bar:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@keyframes voucher-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 10% off modal */
.voucher-modal {
  position: fixed;
  inset: 0;
  z-index: 901;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.voucher-modal[hidden] { display: none; }

.voucher-box {
  position: relative;
  width: min(440px, 92vw);
  background: var(--bg-raise);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 1px rgba(236, 233, 225, 0.05), 0 24px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  animation: voucher-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* soft pixel glow behind the content — raised to match the gate's light */
.voucher-box .pixel-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.42;
  mix-blend-mode: screen;
  pointer-events: none;
}
.voucher-content {
  position: relative;
  z-index: 1;
  padding: 48px 36px 36px;
}
@keyframes voucher-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.voucher-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: 0;
  color: var(--dim);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.voucher-close:hover { color: var(--ink); }

/* morphing headline inside the SMS modal — crisp at rest, liquid on swap */
.voucher-morph {
  position: relative;
  display: grid;
  place-items: center;
  height: 2.3em;
  width: 100%;
  margin-bottom: 8px;
  filter: url(#vm-threshold);
}
.vm-text {
  grid-area: 1 / 1;
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  will-change: filter, opacity;
}
.vm-text:first-child { color: var(--ink); }

.voucher-copy {
  font-size: 0.9rem;
  color: var(--dim);
  margin-bottom: 28px;
  line-height: 1.6;
}

.voucher-row {
  display: flex;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s;
  text-align: left;
}
.voucher-row:focus-within { border-color: var(--ink); }

.voucher-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  padding: 14px 4px;
}
.voucher-input::placeholder { color: var(--dim); }

.voucher-btn {
  background: transparent;
  border: 0;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 14px 4px 14px 18px;
  transition: color 0.2s;
}
.voucher-btn:hover { color: var(--ink); }

.voucher-msg {
  min-height: 1.2em;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--acc);
  opacity: 0;
  transition: opacity 0.25s;
}
.voucher-msg.show { opacity: 1; }
.voucher-msg.ok { color: var(--dim); }

/* ── voucher: success handoff — wipe out the row, wipe in the message ── */
.voucher-row {
  overflow: hidden;
  max-height: 96px;
  opacity: 1;
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.voucher-form.swapping .voucher-row {
  max-height: 0;
  opacity: 0;
}

/* text-wipe reveal · hard edge sweeps left→right, then settles */
.voucher-msg.wipe {
  clip-path: inset(0 100% 0 0);
  color: var(--dim);
  animation: msg-wipe 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards;
}
@keyframes msg-wipe {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

.voucher-code {
  display: inline-block;
  margin: 0 6px;
  padding: 3px 10px;
  background: transparent;
  border: 1px solid var(--acc);
  color: var(--acc);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.voucher-code:hover,
.voucher-code:focus-visible {
  background: var(--acc);
  color: #fff;
  outline: none;
}

.voucher-note {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  opacity: 0.65;
}

/* lock error shake */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
.shake { animation: shake 0.35s ease; }

/* ============================================================
   STORE (unlocked)
   ============================================================ */
.store { padding-top: 0; }

/* hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--morph-h, 84px) + 16px) 28px 0;
  max-width: 1600px;
  margin: 0 auto;
}

.hero-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 9vh;
}

.hero-mid .overline { margin-bottom: 26px; }

.inkbleed.ib-hero {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 12vw, 13rem);
  letter-spacing: -0.03em;
  line-height: 0.98;
  width: 100%;
  height: clamp(2.9rem, 12.5vw, 13.5rem);
  margin-bottom: 42px;
}

.hero-line {
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  font-weight: 500;
  max-width: 22ch;
  margin-bottom: 18px;
}

.hero-sub {
  color: var(--dim);
  max-width: 46ch;
  font-size: 1rem;
  margin-bottom: 46px;
}

.hero-cta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--acc);
}

/* marquee */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin: 10vh 0 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: slide 26s linear infinite;
}
.marquee span {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 3.4rem);
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink);
  padding-right: 0.4em;
  text-transform: uppercase;
  mix-blend-mode: screen;
}

@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* join */
.join {
  max-width: 760px;
  margin: 0 auto;
  padding: 14vh 28px;
  text-align: center;
}
.join .overline { margin-bottom: 30px; }
.join-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.5vw, 3rem);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.join-sub { color: var(--dim); max-width: 52ch; margin: 0 auto 44px; }

.mail {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
  max-width: 520px;
  margin: 0 auto;
  transition: border-color 0.2s;
}
.mail:focus-within { border-color: var(--ink); }

.mail-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 16px 6px;
}
.mail-input::placeholder { color: var(--dim); }

.mail-btn {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 16px 6px 16px 20px;
  transition: color 0.2s;
}
.mail-btn:hover { color: var(--acc); }

.mail-ok {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8BA98C;
  min-height: 1.2em;
}
.mail-err {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc);
  min-height: 1.2em;
}

/* creed */
.creed {
  max-width: 900px;
  margin: 0 auto;
  padding: 16vh 28px 10vh;
  border-top: 1px solid var(--line);
}
.creed-ipa { color: var(--dim); letter-spacing: 0.06em; text-transform: lowercase; }
.creed-q {
  margin-top: 34px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.6vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  quotes: none;
}
.creed-q::before { content: "“"; color: var(--acc); }

/* footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 40px 28px 46px;
  border-top: 1px solid var(--line);
}
.foot-nav {
  display: flex;
  gap: 30px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}
.foot-nav a { transition: color 0.2s; }
.foot-nav a:hover { color: var(--ink); }

.foot-copy {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.foot-copy em { color: var(--ink); font-style: normal; }

/* ============================================================
   Inkbleed (core — faithful port of the originkit effect)
   ============================================================ */
.inkbleed {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  color: var(--ink);
}

/* Sharp layer: the crisp glyphs, NEVER filtered. Sits above the
   ink and gives up only the cursor-sized hole via its radial mask. */
.ib-sharp-group {
  position: relative;
  z-index: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  white-space: pre;
  line-height: 1;
  user-select: none;
}

/* Ink layer: blurred + choker copies only. The per-instance goo
   filter is applied inline by JS and is permanent — the layer is
   spot-masked invisible outside the cursor, so it can't "pop on". */
.inkbleed .ib-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  text-align: center;
}

.inkbleed .ib-ink-char {
  position: absolute;
  display: inline-block;
  white-space: pre;
  pointer-events: none;
}

.inkbleed .ib-char {
  position: relative;
  display: inline-block;
}

.inkbleed .ib-sharp {
  display: inline-block;
  white-space: pre;
}
.inkbleed .ib-blur,
.inkbleed .ib-choker {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-block;
  white-space: pre;
  pointer-events: none;
}
.inkbleed .ib-blur {
  filter: blur(7px);
}
.inkbleed .ib-choker-l { left: -5px; }
.inkbleed .ib-choker-r { left: 5px; }
.inkbleed .ib-choker { will-change: mask-image, -webkit-mask-image; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .dot { animation: none; }
  * { animation-duration: 0.001ms !important; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .topbar { padding: 18px 20px; }
  .hero { padding: calc(var(--morph-h, 84px) + 12px) 20px 0; }
  .gate-line br { display: block; }

  .foot { flex-direction: column; align-items: flex-start; gap: 14px; }
  .foot-nav { gap: 22px; }
}

@media (max-width: 420px) {
  .hero .overline { font-size: 0.62rem; }
  .gate { padding-top: calc(var(--morph-h, 84px) + 72px); }
}