/* =========================================================================
   WED FLAGS — Vol. 01 · Wisteria Square Edition
   Shared site stylesheet. Editorial wedding magazine meets red-flag desk.
   ========================================================================= */

/* ----- Tokens ------------------------------------------------------------ */
:root {
  /* Core paper + ink */
  --paper:    #FFF8EA;
  --ivory:    #F4EBD8;
  --ivory-2:  #ECE0C7;
  --ink:      #241A1C;
  --ink-soft: #4A3A3D;
  --charcoal: #151313;

  /* Brand accents */
  --red:      #B5142B;
  --red-deep: #8E0E20;
  --gold:     #B98524;
  --gold-2:   #D9A95A;

  /* Meter palette */
  --love:     #B5142B;
  --family:   #6F2D59;
  --budget:   #4C7A57;
  --crew:     #245A9B;
  --vibe:     #B98524;
  --blush:    #E9B7B2;

  /* Rules */
  --rule:     rgba(36, 26, 28, 0.18);
  --rule-2:   rgba(36, 26, 28, 0.32);

  /* Type */
  --serif: "Fraunces", "Cormorant Garamond", "Libre Baskerville", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono:  "IBM Plex Mono", "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* Layout */
  --max:    1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 6px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--paper);
  background-image:
    url("wed-paper-texture.png"),
    radial-gradient(1200px 800px at 80% -100px, rgba(185,133,36,0.07), transparent 60%);
  background-size: 600px auto, auto;
  background-repeat: repeat, no-repeat;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--red); color: var(--paper); }

/* ----- Container --------------------------------------------------------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ----- Type primitives --------------------------------------------------- */
.eyebrow,
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
}
.eyebrow--red { color: var(--red); }
.eyebrow--gold { color: var(--gold); }

.serif { font-family: var(--serif); font-weight: 500; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(56px, 9vw, 132px); line-height: 0.92; }
h2 { font-size: clamp(40px, 5.4vw, 76px); line-height: 0.98; }
h3 { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.08; }
h4 { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.18; }

.lede {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em 0; }
p:last-child { margin-bottom: 0; }

.small { font-size: 14px; color: var(--ink-soft); }

/* ----- Editorial rule (top-of-page newspaper line) ----------------------- */
.rule-row {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.rule-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); display: inline-block; }
.rule-row .grow { flex: 1; }
.rule-row .pipe { opacity: 0.45; }

/* ----- Header / Nav ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 234, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
}
.nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav .brand-flag {
  width: 28px;
  height: 24px;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}
.nav .brand-flag::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 1px;
  width: 2px;
  height: 22px;
  background: var(--ink);
  border-radius: 999px;
}
.nav .brand-flag::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 2px;
  width: 18px;
  height: 12px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 12%, 78% 50%, 100% 88%, 0 100%);
}
.nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0; padding: 0;
  flex: 1;
  justify-content: center;
}
.nav ul a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 4px;
  border-bottom: 1px solid transparent;
}
.nav ul a:hover { border-bottom-color: var(--ink); }
.nav .cta-mini {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav .cta-mini:hover { background: var(--red); }

/* hamburger only mobile */
.nav-toggle { display: none; background: none; border: 0; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }

@media (max-width: 880px) {
  .nav ul { display: none; }
  .nav-toggle { display: block; }
  .nav .cta-mini { padding: 8px 12px; font-size: 10px; }
}

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 22px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: transform 0.12s ease, background 0.18s ease;
}
.btn:hover { background: var(--red); border-color: var(--red); transform: translateY(-1px); }
.btn--red { background: var(--red); border-color: var(--red); }
.btn--red:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--big { padding: 20px 30px; font-size: 13px; }

/* ----- Form / waitlist --------------------------------------------------- */
.waitlist {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  width: 100%;
  max-width: 520px;
}
.waitlist input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 16px;
  padding: 12px 18px;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.waitlist input::placeholder { color: var(--ink-soft); }
.waitlist button {
  border: 0;
  background: var(--red);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 999px;
  white-space: nowrap;
}
.waitlist button:hover { background: var(--ink); }
.waitlist--success input { color: var(--budget); font-weight: 600; }

@media (max-width: 560px) {
  .waitlist {
    flex-direction: column;
    border-radius: 28px;
    padding: 8px;
  }
  .waitlist input {
    text-align: center;
    padding: 12px 14px;
  }
  .waitlist button {
    width: 100%;
    padding: 15px 18px;
  }
}

/* ----- Section scaffolding ---------------------------------------------- */
section { padding: clamp(60px, 8vw, 120px) 0; position: relative; }
section + section { border-top: 1px solid var(--rule); }

.section-mark {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 36px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.section-mark .num { color: var(--red); }
.section-mark .title { color: var(--ink); }
.section-mark .meta { color: var(--ink-soft); }

/* ----- Hero -------------------------------------------------------------- */
.hero {
  padding: 24px 0 80px 0;
}
.hero .rule-row { margin-bottom: 36px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.hero-left { min-width: 0; }

.hero-headline {
  font-family: var(--serif);
  font-size: clamp(56px, 8.4vw, 124px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hero-headline .line {
  display: block;
  white-space: nowrap;
  position: relative;
}
.hero-headline em {
  font-style: italic;
  color: var(--red);
  font-weight: 400;
}
.hero-headline .flag-mark {
  display: inline-block;
  width: 0.52em;
  height: 0.58em;
  margin-left: 0.14em;
  vertical-align: -0.02em;
  transform: translateY(-0.03em);
  position: relative;
}
.hero-headline .flag-mark::before {
  content: "";
  position: absolute;
  left: 0.08em;
  top: 0.05em;
  width: 0.035em;
  height: 0.48em;
  background: var(--ink);
  border-radius: 999px;
}
.hero-headline .flag-mark::after {
  content: "";
  position: absolute;
  left: 0.12em;
  top: 0.055em;
  width: 0.34em;
  height: 0.22em;
  background: var(--red);
  clip-path: polygon(0 0, 100% 12%, 78% 50%, 100% 88%, 0 100%);
}

.hero-sub {
  margin-top: 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.32;
  max-width: 540px;
  color: var(--ink);
}

.hero-paragraph {
  margin-top: 20px;
  max-width: 480px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

.hero-cta {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-cta .legal {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 44px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.hero-stats > div {
  padding: 16px 0;
  border-left: 1px solid var(--rule);
}
.hero-stats > div:first-child { border-left: 0; padding-left: 0; }
.hero-stats > div:not(:first-child) { padding-left: 20px; }
.hero-stats .k {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  display: block;
}
.hero-stats .v {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Hero visual: phones + pinned cards */
.hero-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.05;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone {
  position: relative;
  width: 56%;
  border-radius: 10%;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 30px 60px -20px rgba(36, 26, 28, 0.45),
    0 8px 24px -8px rgba(36, 26, 28, 0.25),
    0 0 0 1.5px rgba(0,0,0,0.85);
  transform-origin: center center;
}
.phone img { width: 100%; display: block; }

.hero-stage .phone.p1 {
  transform: rotate(-5deg);
  z-index: 3;
}
.hero-stage .phone.p2 {
  position: absolute;
  width: 48%;
  right: 4%;
  top: 12%;
  transform: rotate(6deg);
  z-index: 2;
}
.hero-stage .phone.p3 {
  position: absolute;
  width: 44%;
  left: 3%;
  bottom: 10%;
  transform: rotate(-3deg);
  z-index: 1;
}

.pinned {
  position: absolute;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-transform: none;
  box-shadow: 0 8px 24px -10px rgba(36, 26, 28, 0.35);
  max-width: 220px;
}
.pinned::before {
  content: "";
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 60px; height: 14px;
  background: var(--gold-2);
  opacity: 0.65;
}
.pinned .stamp {
  display: inline-block;
  border: 1.5px solid var(--red);
  color: var(--red);
  padding: 2px 6px;
  margin-bottom: 6px;
  font-size: 9px;
  letter-spacing: 0.2em;
  transform: rotate(-2deg);
}

.hero-stage .pinned.tip1 { top: 0; left: -4%; transform: rotate(-4deg); z-index: 4; max-width: 50%; }
.hero-stage .pinned.tip2 { bottom: 4%; right: -4%; transform: rotate(3deg); z-index: 4; max-width: 55%; }

/* ----- "Tape" / paper accents ------------------------------------------- */
.tape {
  position: absolute;
  width: 90px; height: 22px;
  background: rgba(185, 133, 36, 0.45);
  border-left: 1px dashed rgba(185,133,36,0.7);
  border-right: 1px dashed rgba(185,133,36,0.7);
}

/* ----- How it works ----------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.step {
  padding: 26px 22px 30px 22px;
  border-left: 1px solid var(--rule);
  position: relative;
}
.step:first-child { border-left: 0; }
.step .n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.step h3 {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.05;
  margin-bottom: 10px;
}
.step p {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.45;
}
.step .glyph {
  position: absolute;
  top: 18px; right: 18px;
  width: 22px; height: 22px;
  opacity: 0.6;
}
@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { border-left: 1px solid var(--rule); }
  .step:nth-child(odd) { border-left: 0; }
  .step:not(:first-child):not(:nth-child(2)) { border-top: 1px solid var(--rule); }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step { border-left: 0 !important; }
  .step + .step { border-top: 1px solid var(--rule); }
}

/* ----- Role cards ------------------------------------------------------- */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1000px) { .roles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .roles-grid { grid-template-columns: 1fr; } }

.role {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 24px;
  position: relative;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.role:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -16px rgba(36,26,28,0.35); }
.role .tag {
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.role .role-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ivory);
  border: 1px solid var(--ink);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.role h3 {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  margin-bottom: 4px;
}
.role .who {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.role p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  flex: 1;
}
.role .blurb {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule-2);
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.4;
}
.role[data-role="planner"]      .role-icon { color: var(--budget); }
.role[data-role="photographer"] .role-icon { color: var(--crew); }
.role[data-role="bridesmaid"]   .role-icon { color: var(--family); }
.role[data-role="guest"]        .role-icon { color: var(--gold); }

/* ----- The wedding ------------------------------------------------------ */
.wedding {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 900px) { .wedding { grid-template-columns: 1fr; } }
.wedding .editorial h2 { margin-bottom: 20px; }
.wedding .editorial .lede { margin-bottom: 20px; }
.wedding .editorial p { max-width: 56ch; }

.invite {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 40px -24px rgba(36,26,28,0.4);
}
.invite::before, .invite::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px;
  height: 1px;
  background: var(--ink);
}
.invite::before { top: 16px; }
.invite::after { bottom: 16px; }
.invite .crest {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}
.invite h3 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
  margin-bottom: 4px;
}
.invite .amp {
  display: inline-block;
  font-style: italic;
  font-weight: 400;
  color: var(--red);
  padding: 0 8px;
}
.invite .where {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  margin: 20px 0 24px;
}
.invite .when {
  display: flex; justify-content: center; gap: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.invite .rsvp {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed var(--rule-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.invite .rsvp strong { color: var(--red); }

.stamp {
  position: absolute;
  top: -18px; right: -18px;
  width: 92px; height: 92px;
  border: 2px solid var(--red);
  color: var(--red);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  line-height: 1.2;
  transform: rotate(-12deg);
  background: rgba(255,248,234,0.6);
  text-transform: uppercase;
}

/* ----- Meters ----------------------------------------------------------- */
.meters {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 1000px) { .meters { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .meters { grid-template-columns: 1fr; } }

.meter {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 22px 20px;
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.meter:hover { transform: translateY(-3px); }
.meter .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}
.meter .name {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  margin-top: 4px;
}
.meter .val {
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 14px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.meter .bar {
  height: 6px;
  background: var(--ivory-2);
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.meter .bar > i {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 60%;
  background: currentColor;
  transition: width 1.2s ease;
}
.meter[data-m="love"]   { color: var(--love); }
.meter[data-m="family"] { color: var(--family); }
.meter[data-m="budget"] { color: var(--budget); }
.meter[data-m="crew"]   { color: var(--crew); }
.meter[data-m="vibe"]   { color: var(--vibe); }
.meter .desc {
  margin-top: 16px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  flex: 1;
}
.meter .quip {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--rule-2);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
}

/* ----- Endings / share cards ------------------------------------------- */
.endings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .endings-grid { grid-template-columns: 1fr; } }

.ending {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.ending::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--rule);
  pointer-events: none;
}
.ending .ending-head {
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
}
.ending h3 {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.02;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.ending .role-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.ending .ending-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.35;
  margin: 12px 0 18px;
  position: relative;
  z-index: 1;
}
.ending .scoreline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 18px 0;
  position: relative;
  z-index: 1;
}
.ending .scoreline div {
  border: 1px solid var(--rule-2);
  padding: 6px 4px;
  text-align: center;
}
.ending .scoreline .l {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ending .scoreline .n {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
  margin-top: 2px;
}
.ending .ending-foot {
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  border-top: 1px dashed var(--rule-2);
  padding-top: 14px;
  position: relative;
  z-index: 1;
}
.ending .ending-stamp {
  position: absolute;
  top: 16px; right: 24px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  border: 1.5px solid var(--red);
  color: var(--red);
  padding: 3px 6px;
  transform: rotate(4deg);
  text-transform: uppercase;
  z-index: 2;
}

/* ----- Submit story ----------------------------------------------------- */
.submit-block {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 900px) { .submit-block { grid-template-columns: 1fr; } }

.submit-block .pitch h2 { margin-bottom: 16px; }
.submit-block .pitch .lede { margin-bottom: 20px; }
.submit-block .pitch ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  font-size: 15px;
}
.submit-block .pitch ul li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--rule-2);
  display: flex; gap: 12px;
}
.submit-block .pitch ul li .check {
  font-family: var(--mono);
  color: var(--red);
  font-size: 11px;
  letter-spacing: 0.18em;
  flex-shrink: 0;
  min-width: 80px;
}

.story-form {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 28px;
  position: relative;
}
.story-form .form-head {
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 12px;
  margin-bottom: 20px;
}
.story-form label {
  display: block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.story-form input, .story-form select, .story-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  padding: 10px 0;
  outline: none;
}
.story-form textarea {
  border: 1px solid var(--ink);
  padding: 12px;
  min-height: 120px;
  font-family: var(--serif);
  font-size: 16px;
  resize: vertical;
}
.story-form .roles {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 4px;
}
.story-form .pill {
  border: 1px solid var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
.story-form .pill.on { background: var(--ink); color: var(--paper); }
.story-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.story-form .submit-row {
  margin-top: 24px;
  display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap;
}
.story-form .submit-row .small { flex: 1; }

/* ----- Community / vendors --------------------------------------------- */
.tribe {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 16px;
}
@media (max-width: 900px) { .tribe { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tribe { grid-template-columns: 1fr; } }
.tribe-card {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.tribe-card .tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.tribe-card h4 {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.05;
}
.tribe-card p { font-size: 14px; color: var(--ink); }

.community-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .community-actions { grid-template-columns: 1fr; }
}

/* ----- Future packs ----------------------------------------------------- */
.packs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .packs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .packs-grid { grid-template-columns: 1fr; } }
.pack {
  border: 1px dashed var(--rule-2);
  padding: 22px;
  background: rgba(255,248,234,0.5);
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
}
.pack .future {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 2px 6px;
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 4px;
}
.pack h4 {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
}
.pack p { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }

/* ----- Press fact sheet ------------------------------------------------- */
.factsheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
@media (max-width: 720px) { .factsheet { grid-template-columns: 1fr; } }
.factsheet > div {
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  font-size: 14px;
}
.factsheet > div:nth-child(odd) { border-left: 0; }
.factsheet > div:last-child, .factsheet > div:nth-last-child(2) { border-bottom: 0; }
.factsheet .k {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

/* ----- Marquee strip (group-chat ticker) ------------------------------- */
.marquee {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  contain: paint;
  padding: 14px 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.marquee .track {
  display: inline-flex;
  gap: 50px;
  animation: ticker 50s linear infinite;
  padding-right: 50px;
  will-change: transform;
}
.marquee .track span { display: inline-flex; align-items: center; gap: 14px; }
.marquee .track .red { color: var(--gold-2); }
.marquee .track .dot { width: 6px; height: 6px; background: var(--red); border-radius: 50%; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ----- Roadmap ---------------------------------------------------------- */
.roadmap-hero {
  padding-bottom: 48px;
}

.roadmap-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(32px, 6vw, 84px);
  align-items: end;
  padding-top: clamp(48px, 8vw, 92px);
}

.roadmap-hero-grid h1 {
  max-width: 10ch;
}

.roadmap-hero-grid .lede {
  margin-top: 24px;
  max-width: 34ch;
}

.roadmap-ticket {
  position: relative;
  border: 1px solid var(--rule-2);
  background:
    linear-gradient(90deg, rgba(181,20,43,0.08) 0 1px, transparent 1px 100%),
    var(--paper);
  background-size: 18px 100%, auto;
  padding: clamp(24px, 4vw, 38px);
  box-shadow: 0 18px 40px -32px var(--ink);
}

.roadmap-ticket::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(185,133,36,0.36);
  pointer-events: none;
}

.ticket-stamp {
  position: absolute;
  top: -16px;
  right: 24px;
  transform: rotate(-3deg);
  border: 3px solid var(--red);
  color: var(--red);
  background: var(--paper);
  padding: 5px 12px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.roadmap-ticket h3 {
  margin-bottom: 14px;
}

.roadmap-lanes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.roadmap-lane,
.sprint-card,
.expansion-slip {
  border: 1px solid var(--rule-2);
  background: rgba(255,248,234,0.72);
  padding: 24px;
}

.roadmap-lane {
  min-height: 410px;
}

.lane-kicker,
.sprint-card span {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

.roadmap-lane p,
.sprint-card p,
.expansion-slip p {
  color: var(--ink-soft);
  font-size: 15px;
}

.roadmap-lane ul {
  margin: 22px 0 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.roadmap-lane li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.45;
}

.roadmap-lane li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 2px;
  background: var(--red);
}

.sprint-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.sprint-card {
  min-height: 260px;
}

.sprint-card h4 {
  margin-bottom: 12px;
}

.sprint-card--red {
  background: var(--red);
  border-color: var(--red-deep);
  color: var(--paper);
}

.sprint-card--red span,
.sprint-card--red p {
  color: var(--paper);
}

.sprint-card--red p {
  opacity: 0.86;
}

.expansion-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.expansion-slip {
  background: var(--paper);
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.expansion-slip .future {
  align-self: flex-start;
}

.community-ledger {
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: clamp(34px, 6vw, 64px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
}

.ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

@media (max-width: 1020px) {
  .roadmap-lanes,
  .expansion-row {
    grid-template-columns: 1fr 1fr;
  }
  .sprint-board {
    grid-template-columns: 1fr 1fr;
  }
  .sprint-card--red {
    grid-column: 1 / -1;
    min-height: 180px;
  }
}

@media (max-width: 760px) {
  .roadmap-hero-grid,
  .community-ledger {
    grid-template-columns: 1fr;
  }
  .ledger-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .roadmap-lanes,
  .sprint-board,
  .expansion-row {
    grid-template-columns: 1fr;
  }
  .roadmap-lane,
  .sprint-card,
  .expansion-slip {
    min-height: auto;
  }
}

/* ----- Footer ----------------------------------------------------------- */
.footer {
  background: var(--charcoal);
  color: var(--paper);
  padding: 80px 0 28px 0;
  border-top: 1px solid var(--ink);
}
.footer .wrap { color: var(--paper); }
.footer h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.95;
  margin-bottom: 24px;
  color: var(--paper);
}
.footer h2 em { color: var(--red); font-style: italic; font-weight: 400; }
.footer .lede { color: var(--paper); opacity: 0.85; max-width: 540px; }
.footer .footer-cta { margin-top: 28px; }
.footer .waitlist {
  background: rgba(255,248,234,0.06);
  border-color: rgba(255,248,234,0.4);
}
.footer .waitlist input { color: var(--paper); }
.footer .waitlist input::placeholder { color: rgba(255,248,234,0.55); }
.footer-hero {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: end;
}
.footer-hero > * { min-width: 0; }
.footer-icon { text-align: right; }
.footer-links {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,248,234,0.18);
}
@media (max-width: 800px) { .footer-links { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .footer h2 {
    font-size: clamp(34px, 11vw, 46px);
    line-height: 1.02;
  }
  .footer .lede { max-width: 100%; }
  .footer-hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-icon { text-align: left; }
  .footer-icon img {
    width: 96px !important;
    height: 96px !important;
    border-radius: 20px !important;
  }
}
.footer-links .col h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin: 0 0 14px 0;
}
.footer-links .col a {
  display: block;
  font-size: 14px;
  padding: 6px 0;
  color: rgba(255,248,234,0.85);
}
.footer-links .col a:hover { color: var(--paper); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,248,234,0.18);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,248,234,0.7);
}

/* ----- Generic article (for legal pages) ------------------------------- */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 0;
}
.article h1 { font-size: clamp(48px, 7vw, 84px); margin-bottom: 8px; }
.article .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 36px;
}
.article h2 {
  font-size: 28px;
  line-height: 1.15;
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.article h3 {
  font-size: 20px;
  margin: 24px 0 8px;
  font-family: var(--serif);
}
.article p { font-size: 16px; line-height: 1.65; }
.article ul, .article ol { padding-left: 22px; }
.article li { padding: 4px 0; }

/* ----- 404 ------------------------------------------------------------- */
.notfound {
  min-height: 70vh;
  display: grid; place-items: center;
  text-align: center;
  padding: 80px 0;
}
.notfound h1 { font-size: clamp(72px, 12vw, 168px); line-height: 0.9; }
.notfound .lede { margin-top: 18px; }
.notfound .links { margin-top: 36px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ----- Utility --------------------------------------------------------- */
.center { text-align: center; }
.mw-md { max-width: 660px; margin-left: auto; margin-right: auto; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.flex { display: flex; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; align-items: center; }
.hide-mobile { } /* placeholder for media query */
@media (max-width: 720px) { .hide-mobile { display: none !important; } }

/* ----- Reveal on scroll ------------------------------------------------ */
/* Hidden state only applies once JS confirms IntersectionObserver is wired.
   This way the page never gets stuck blank if JS is delayed/disabled. */
.js-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js-ready .reveal.in { opacity: 1; transform: none; }

/* ----- Hero responsive break -------------------------------------------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { margin-top: 32px; max-width: 460px; }
}
@media (max-width: 560px) {
  .hero-stage { max-width: 100%; }
  .hero-headline { letter-spacing: -0.025em; font-size: clamp(44px, 13vw, 80px); }
  .hero-headline .line { white-space: normal; }
  .pinned { font-size: 10px; padding: 10px 12px; }
  .stamp {
    right: 8px;
    width: 78px;
    height: 78px;
    font-size: 8px;
  }
}
