/* ============================================================
 * C4YOS LAND — Kickstarter page (kickstarter.html / -de.html)
 *
 * Built on the shared system in styles.css: the printed card is the
 * structural device. The campaign key art is dealt onto the page as a
 * card, what backing builds is laid out like gadget cards (sky art field,
 * slate text panel), and reward tiers are collectible cards in the four
 * rarity colours from the rulebook, face down until they're announced.
 *
 * Sections: hero · build · why · fund · rewards · cards · world · back ·
 * status · final. Motion is at the end, then responsive.
 * ============================================================ */

.ks-body {
  /* rarity colours = the badges on the printed cards (U blue, R purple, L orange, M red) */
  --uncommon: #5256e0;
  --rare: #c42ae8;
  --legendary: #f5870c;
  --mythic: #ee2d45;
  --live: #36b86a;
  --ks-line: rgba(255, 246, 227, .14);
  --ks-dim: #cfc7b6;
  background: transparent;
  color: var(--paper);
  font-size: 19px;
}

/* fixed sky painting, compositor-only */
.ks-sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden; /* clips the oversized painting: no sideways scroll */
  pointer-events: none;
}
.ks-sky::before {
  content: "";
  position: absolute;
  inset: -4%;
  background:
    linear-gradient(180deg, rgba(10, 18, 48, .5) 0%, rgba(10, 18, 48, .78) 42%, rgba(10, 18, 48, .92) 100%),
    url('assets/backgrounds/sky-islands-bg.jpg') center / cover;
}

.ks-header { padding-inline: var(--gutter); }

.ks-wrap {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ks-section { position: relative; padding-block: clamp(64px, 8vw, 128px); }

.ks-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 56px); }
.ks-head--center { margin-inline: auto; text-align: center; }
.ks-head--center .ks-lead { margin-inline: auto; }
.ks-head--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
}
.ks-head--row > div { max-width: 720px; }

.ks-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 4.6vw, 66px);
  line-height: .96;
  text-transform: uppercase;
  color: var(--paper);
  -webkit-text-stroke: .1em var(--card-black);
  paint-order: stroke fill;
  text-shadow: 0 .07em 0 var(--card-black);
  text-wrap: balance;
}
.ks-h2--xl { font-size: clamp(44px, 6.4vw, 96px); }

.ks-lead {
  margin: var(--s-4) 0 0;
  max-width: 50ch;
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.45;
  color: var(--ks-dim);
  text-wrap: pretty;
}

.ks-kicker {
  margin: 0 0 var(--s-5);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--gold);
}

.ks-note { margin: var(--s-4) 0 0; font-size: 17px; line-height: 1.4; color: #b9b2a3; }

.ks-actions { display: flex; flex-wrap: wrap; gap: 14px 16px; margin-top: clamp(24px, 3vw, 34px); }
.ks-actions--center { justify-content: center; }
.ks-hero .ks-actions .btn--lg { font-size: clamp(20px, 1.65vw, 24px); }

/* circled numerals, as printed on the monster cards */
.ks-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card-black);
  box-shadow: 0 0 0 2px var(--paper);
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
  padding-top: 3px;
  color: var(--paper);
}

/* the special die */
.ks-die { display: block; width: 100%; height: auto; overflow: visible; }
.ks-die rect { fill: var(--paper); stroke: var(--card-black); stroke-width: 7; }
.ks-die circle { fill: var(--card-black); }
.ks-die.is-lit rect { fill: var(--gold); }

/* rarity gem: a turned square in the rarity colour */
.ks-gem { display: inline-flex; align-items: center; gap: 10px; }
.ks-gem i {
  flex: none;
  width: 14px;
  height: 14px;
  background: var(--gem, var(--paper));
  border: 2.5px solid var(--card-black);
  transform: rotate(45deg);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .45);
}
.ks-gem--uncommon { --gem: var(--uncommon); }
.ks-gem--rare { --gem: var(--rare); }
.ks-gem--legendary { --gem: var(--legendary); }
.ks-gem--mythic { --gem: var(--mythic); }

/* ============================================================
 * 1. HERO — the campaign, dealt as a card
 * ============================================================ */

.ks-hero {
  position: relative;
  padding-block: clamp(20px, 3vw, 44px) clamp(72px, 9vw, 136px);
  overflow-x: clip;
}

.ks-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 4vw, 64px);
  min-height: min(760px, calc(100svh - var(--header-h) - 40px));
}

.ks-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 var(--s-5);
  padding: 10px 18px 8px 14px;
  background: var(--card-black);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--paper);
}
.ks-chip-dot {
  position: relative;
  width: 11px;
  height: 11px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--gold);
}
.ks-chip[data-state="live"] .ks-chip-dot { background: var(--live); }
.ks-chip[data-state="ended"] .ks-chip-dot { background: #8d877b; }
.ks-chip-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid currentColor;
  color: var(--gold);
  opacity: 0;
}
.ks-chip[data-state="live"] .ks-chip-dot::after { color: var(--live); }

.ks-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 5.4vw, 86px);
  line-height: .92;
  text-transform: uppercase;
  color: var(--paper);
  -webkit-text-stroke: .09em var(--card-black);
  paint-order: stroke fill;
  text-shadow: 0 .06em 0 var(--card-black);
}
.ks-hero-line { display: block; }
.ks-hero-title:lang(de) { font-size: clamp(40px, 4.2vw, 68px); }
.ks-hero-line > span { display: inline-block; }
.ks-hero-line:last-child { color: var(--gold); }

.ks-hero-lead {
  margin: var(--s-5) 0 0;
  max-width: 44ch;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.42;
  color: #e8e1d2;
  text-wrap: pretty;
}

/* key art card + two real cards behind it */
.ks-keyart {
  --px: 0;
  --py: 0;
  position: relative;
  padding: 7% 5% 9% 6%;
}
.ks-keyart [data-depth] {
  translate: calc(var(--px) * var(--d, 0) * 1px) calc(var(--py) * var(--d, 0) * 1px);
  transition: translate 500ms var(--ease-out);
}

.ks-keycard {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: clamp(7px, .8vw, 11px) clamp(7px, .8vw, 11px) 0;
  background: var(--card-black);
  border-radius: clamp(12px, 1.4vw, 20px);
  rotate: -2.2deg;
  box-shadow: 0 16px 0 rgba(0, 0, 0, .32);
}
.ks-keycard-art {
  overflow: hidden;
  border-radius: clamp(6px, .8vw, 11px);
  aspect-ratio: 1264 / 843;
  background: #1c3b78;
}
.ks-keycard-art img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ks-keycard-plate {
  padding: clamp(10px, 1vw, 14px) 6px clamp(9px, .9vw, 12px);
  font-family: var(--font-display);
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--paper);
}

.ks-keyart-back {
  position: absolute;
  z-index: 1;
  width: 27%;
}
.ks-keyart-back img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6%/4%;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .3);
}
.ks-keyart-back--1 { top: -3%; right: -1%; width: 29%; rotate: 13deg; }
.ks-keyart-back--2 { bottom: 1%; left: 0; width: 23%; rotate: -13deg; z-index: 3; }

.ks-stamp {
  position: absolute;
  z-index: 4;
  right: 2%;
  bottom: 3%;
  display: grid;
  place-content: center;
  width: clamp(104px, 10vw, 146px);
  aspect-ratio: 1;
  margin: 0;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--card-black), inset 0 0 0 6px var(--red), inset 0 0 0 8px var(--paper), 0 10px 0 4px rgba(0, 0, 0, .3);
  rotate: -12deg;
  text-align: center;
  font-family: var(--font-display);
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}
.ks-stamp span:first-child { font-size: clamp(14px, 1.2vw, 18px); letter-spacing: .02em; }
.ks-stamp span:last-child { font-size: clamp(26px, 2.5vw, 38px); margin-top: 2px; }

/* ============================================================
 * 2. BUILD — what the game is
 * ============================================================ */

.ks-build-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 104px);
}

.ks-beats {
  list-style: none;
  margin: clamp(28px, 3.4vw, 40px) 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.ks-beat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.ks-beat h3 {
  margin: 4px 0 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
}
.ks-beat p { margin: 0; max-width: 46ch; font-size: 18px; line-height: 1.4; color: var(--ks-dim); }

.ks-build-modes {
  margin: clamp(24px, 3vw, 32px) 0 var(--s-3);
  padding-top: var(--s-4);
  border-top: 2px dashed var(--ks-line);
  max-width: 46ch;
  font-size: 18px;
  color: #e8e1d2;
}

.ks-build-art { position: relative; padding: 9% 6% 11%; }
.ks-sheet {
  margin: 0;
  padding: 7px;
  background: var(--card-black);
  border-radius: 16px;
  rotate: 1.6deg;
  box-shadow: 0 14px 0 rgba(0, 0, 0, .3);
}
.ks-sheet img { display: block; width: 100%; height: auto; border-radius: 10px; }
.ks-build-card {
  position: absolute;
  width: 26%;
  height: auto;
  border-radius: 6%/4%;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .3);
}
.ks-build-card--a { top: 0; left: 0; rotate: -9deg; }
.ks-build-card--b { right: 0; bottom: 0; width: 22%; rotate: 8deg; }

/* ============================================================
 * 3. WHY — the black plate
 * ============================================================ */

.ks-why {
  background: var(--card-black);
  margin-block: 22px;
}
/* plate notches, like the footer's top edge */
.ks-why::before,
.ks-why::after {
  content: "";
  position: absolute;
  left: 50%;
  width: min(420px, 60vw);
  height: 23px;
  translate: -50% 0;
  background: var(--card-black);
}
.ks-why::before { top: -22px; clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 100%, 0 100%); }
.ks-why::after { bottom: -22px; clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 22px 100%); }

.ks-why-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.ks-why-copy { position: sticky; top: calc(var(--header-h) + 32px); }
.ks-why-copy .ks-lead + .ks-lead { margin-top: var(--s-4); }

.ks-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(28px, 3.4vw, 44px);
}
.ks-step {
  position: relative;
  padding-left: 76px;
}
.ks-step-node {
  position: absolute;
  left: 0;
  top: 2px;
  width: 54px;
}
.ks-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 64px;
  bottom: calc(-1 * clamp(28px, 3.4vw, 44px) + 6px);
  border-left: 3px dashed rgba(255, 246, 227, .28);
}
.ks-step-when {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--gold);
}
.ks-step-name {
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--paper);
}
.ks-step-text { margin: 0; max-width: 44ch; font-size: 18px; line-height: 1.42; color: var(--ks-dim); }

/* ============================================================
 * 4. FUND — laid out like gadget cards
 * ============================================================ */

.ks-loot-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}
/* a staggered hand, not a flat row */
.ks-loot:nth-child(even) { margin-top: 40px; }

.ks-loot {
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: var(--card-black);
  border-radius: 16px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .3);
}
.ks-loot-art {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: 10px 10px 4px 4px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 70% at 50% 35%, #4cc3ff, var(--card-sky) 60%, #0b83c7);
}
.ks-loot-name {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin: -18px 0 0 10px;
  padding: 11px 16px 7px;
  background: var(--card-black);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%, 0 9px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
}
.ks-loot-text {
  flex: 1;
  margin: 4px 0 0;
  padding: 12px 14px 14px;
  background: var(--card-slate);
  border-radius: 4px 4px 10px 10px;
  font-size: 17px;
  line-height: 1.35;
  color: #10151a;
}

.ks-loot-vis { position: absolute; inset: 0; display: grid; place-items: center; }

.ks-loot-vis--print img {
  position: absolute;
  width: 34%;
  height: auto;
  border-radius: 6%/4%;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .3);
  top: 14%;
}
.ks-loot-vis--print img:nth-child(1) { left: 12%; rotate: -12deg; }
.ks-loot-vis--print img:nth-child(2) { left: 33%; top: 9%; z-index: 1; }
.ks-loot-vis--print img:nth-child(3) { right: 12%; rotate: 12deg; }

.ks-loot-vis--rarity ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ks-loot-vis--rarity li {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 2px 0 var(--card-black), 1px 0 0 var(--card-black), -1px 0 0 var(--card-black);
}
.ks-loot-vis--rarity .ks-gem i { width: 18px; height: 18px; }

.ks-loot-vis--modes { align-content: center; gap: 10px; }
.ks-pawns { display: flex; align-items: flex-end; gap: 4px; }
.ks-pawn { width: clamp(30px, 3vw, 42px); height: auto; }
.ks-pawn circle, .ks-pawn path { fill: var(--paper); stroke: var(--card-black); stroke-width: 3.5; }
.ks-pawn:not(.is-on) circle, .ks-pawn:not(.is-on) path { fill: rgba(255, 246, 227, .28); stroke-dasharray: 5 4; }
.ks-loot-vis--modes span {
  font-family: var(--font-display);
  font-size: 16px;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 2px 0 var(--card-black);
}

.ks-loot-vis--die {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16% 18%;
  place-items: center;
}
.ks-loot-vis--die .ks-die { width: min(52px, 100%); }

/* ============================================================
 * 5. REWARDS — collectible tiers, face down until announced
 * ============================================================ */

.ks-tiers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  align-items: stretch;
}

.ks-tier {
  --r: var(--paper);
  --tx: 0deg;
  --ty: 0deg;
  perspective: 900px;
}
.ks-tier--uncommon { --r: var(--uncommon); --r-deep: #25277a; }
.ks-tier--rare { --r: var(--rare); --r-deep: #5e0f73; }
.ks-tier--legendary { --r: var(--legendary); --r-deep: #8a4700; }
.ks-tier--mythic { --r: var(--mythic); --r-deep: #8a1426; }

.ks-tier-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 9px;
  background: var(--card-black);
  border-radius: 18px;
  box-shadow: 0 12px 0 rgba(0, 0, 0, .32);
  transform: rotateX(var(--ty)) rotateY(var(--tx));
  transition: transform 420ms var(--ease-out), translate 300ms var(--ease-out);
}
.ks-tier:hover .ks-tier-card { translate: 0 -8px; }

/* face down */
.ks-tier-back {
  position: relative;
  aspect-ratio: 460 / 520;
  display: grid;
  place-items: center;
  border-radius: 11px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, .22), transparent 42%),
    repeating-linear-gradient(45deg, var(--r) 0 14px, color-mix(in srgb, var(--r) 84%, #000) 14px 28px);
  box-shadow: inset 0 0 0 4px var(--card-black), inset 0 0 0 8px var(--r);
}
.ks-tier-back::before {
  content: "";
  position: absolute;
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--card-black);
  box-shadow: 0 0 0 5px var(--r), 0 0 0 9px var(--card-black);
}
.ks-tier-back img {
  position: relative;
  width: 58%;
  height: auto;
  rotate: -6deg;
}
/* light sweep across the card on hover */
.ks-tier-back::after {
  content: "";
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%);
  translate: -60% 0;
  transition: translate 700ms var(--ease-out);
  pointer-events: none;
}
.ks-tier:hover .ks-tier-back::after { translate: 60% 0; }

.ks-tier-foot { padding: 14px 8px 8px; }
.ks-tier-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
}
.ks-tier-slot .ks-gem { --gem: var(--r); }
.ks-tier-hidden { margin: 8px 0 0; font-size: 17px; color: var(--ks-dim); }
.ks-tier-price {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: var(--gold);
}
.ks-tier-price.is-pending {
  padding: 9px 10px 7px;
  border: 2px dashed rgba(255, 246, 227, .28);
  border-radius: 8px;
  font-family: var(--font-hand);
  font-size: 17px;
  color: #b9b2a3;
}

/* face up (once a tier is real) */
.ks-tier-face {
  padding: 22px 20px 20px;
  background: var(--paper);
  border: 9px solid var(--card-black);
  color: var(--ink-text);
}
.ks-tier-face::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10px;
  background: var(--r);
  border-radius: 8px 8px 0 0;
}
.ks-tier-face .ks-tier-slot { margin-top: 6px; color: #6d6047; font-size: 16px; }
.ks-tier-name {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink-text);
}
.ks-tier-face .ks-tier-price { color: var(--ink-text); font-size: 40px; }
.ks-tier-limit { margin: 6px 0 0; font-size: 16px; color: #8a1c12; }
.ks-tier-text { margin: 12px 0 0; font-size: 17px; line-height: 1.38; color: #3a3226; }
.ks-tier-includes { margin: 16px 0 6px; font-family: var(--font-display); font-size: 15px; text-transform: uppercase; color: var(--purple); }
.ks-tier-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 17px; line-height: 1.3; }
.ks-tier-items li { position: relative; padding-left: 22px; }
.ks-tier-items li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 9px;
  height: 9px;
  background: var(--r);
  border: 2px solid var(--card-black);
  transform: rotate(45deg);
}
.ks-tier-cta { margin-top: auto; padding-top: 20px; }
.ks-tier-cta .btn { display: flex; font-size: 17px; }
.ks-tier-cta .btn__face { white-space: normal; text-align: center; line-height: 1.05; }
.ks-tier-soon { margin: 0; font-size: 17px; color: #6d6047; }
.ks-tier-flag {
  position: absolute;
  top: -22px;
  left: 50%;
  translate: -50% 0;
  margin: 0;
  padding: 9px 14px 6px;
  background: var(--gold);
  border: 3px solid var(--card-black);
  font-family: var(--font-display);
  font-size: 15px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-text);
}
.ks-tier.is-featured .ks-tier-card { box-shadow: 0 0 0 4px var(--gold), 0 12px 0 4px rgba(0, 0, 0, .32); }

/* ============================================================
 * 6. CARDS — a fan you can pull from
 * ============================================================ */

.ks-cards { overflow: clip; }

.ks-fan-stage {
  --lean: 0;
  --step: 9.5deg;
  --w: clamp(140px, 13.4vw, 200px);
  position: relative;
  height: calc(var(--w) * 2.55);
  margin-top: clamp(8px, 2vw, 24px);
}
.ks-fan {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  rotate: calc(var(--lean) * 2.5deg);
  transform-origin: 50% 260%;
  transition: rotate 700ms var(--ease-out);
}
.ks-fan-card {
  position: absolute;
  left: 50%;
  bottom: calc(var(--w) * .68);
  width: var(--w);
  translate: -50% 0;
  rotate: calc(var(--o) * var(--step));
  transform-origin: 50% 280%;
  border-radius: 7%/4.7%;
  transition: translate 360ms var(--ease-out), rotate 900ms var(--ease-deal), scale 360ms var(--ease-out);
  cursor: pointer;
  outline: none;
}
.ks-fan-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .35);
  -webkit-user-drag: none;
  user-select: none;
}
.ks-fan-card:hover,
.ks-fan-card:focus-visible,
.ks-fan-card.is-pulled {
  z-index: 20;
  translate: -50% -44px;
  scale: 1.08;
}
.ks-fan-card:focus-visible img { box-shadow: 0 0 0 4px var(--gold), 0 10px 0 4px rgba(0, 0, 0, .35); }

.ks-cards-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 28px;
  text-align: center;
}
.ks-hint { margin: 0; font-size: 17px; color: #b9b2a3; }

/* ============================================================
 * 7. WORLD — full bleed
 * ============================================================ */

/* sits on the page sky like every other section (no picture of its own) */
.ks-world-copy { position: relative; z-index: 1; width: 100%; }
.ks-world-copy .ks-h2 { max-width: 12ch; }
.ks-world-copy .glitch { color: inherit; }
.ks-world-copy .ks-lead { max-width: 46ch; margin-bottom: var(--s-4); color: #eee7d8; }

/* ============================================================
 * 8. BACK — the conversion board
 * ============================================================ */

.ks-back-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(28px, 4vw, 64px) clamp(24px, 5vw, 80px) clamp(28px, 4vw, 56px) clamp(24px, 3vw, 48px);
  background: var(--paper);
  border: 8px solid var(--card-black);
  border-radius: 24px;
  box-shadow: 0 16px 0 rgba(0, 0, 0, .35);
  color: var(--ink-text);
}
/* sky art field on the left, like the top of a gadget card */
.ks-back-art {
  position: relative;
  align-self: stretch;
  min-height: 340px;
  margin: calc(-1 * clamp(28px, 4vw, 64px)) 0 calc(-1 * clamp(28px, 4vw, 56px)) calc(-1 * clamp(24px, 3vw, 48px));
  border-radius: 16px 0 0 16px;
  background:
    radial-gradient(ellipse 70% 60% at 45% 40%, #4cc3ff, var(--card-sky) 60%, #0b83c7);
  border-right: 8px solid var(--card-black);
}
.ks-back-card {
  position: absolute;
  height: auto;
  border-radius: 6%/4%;
  box-shadow: 0 12px 0 rgba(0, 0, 0, .3);
}
.ks-back-card--a { width: 58%; left: 12%; top: -9%; rotate: -8deg; }
.ks-back-card--b { width: 36%; right: 8%; bottom: 8%; rotate: 10deg; }

.ks-back-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(42px, 5.2vw, 80px);
  line-height: .92;
  text-transform: uppercase;
  color: var(--ink-text);
  text-wrap: balance;
}
.ks-back-text {
  margin: var(--s-4) 0 0;
  max-width: 44ch;
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.42;
  color: #3a3226;
}
.ks-back .ks-note { color: #6d6047; }
.ks-back .btn--paper { --face: var(--purple); --face-ink: var(--paper); }

/* ============================================================
 * 9. STATUS — the campaign panel
 * ============================================================ */

.ks-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-areas: "head stats" "action stats";
  gap: clamp(24px, 3vw, 40px) clamp(32px, 5vw, 80px);
  padding: clamp(24px, 4vw, 56px);
  background: rgba(0, 0, 0, .82);
  border: 3px solid rgba(255, 246, 227, .16);
  border-radius: 22px;
  box-shadow: 0 16px 0 rgba(0, 0, 0, .3);
}
.ks-panel-head { grid-area: head; }
.ks-stats { grid-area: stats; }
.ks-panel-action { grid-area: action; align-self: end; }
.ks-panel-action[hidden] { display: none; }

.ks-panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 var(--s-4);
  font-family: var(--font-display);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ks-dim);
}
.ks-panel-brand img { width: 96px; height: auto; }
.ks-panel-brand span { padding-left: 12px; border-left: 2px solid var(--ks-line); }

.ks-panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 4vw, 58px);
  line-height: .95;
  text-transform: uppercase;
  color: var(--paper);
  text-wrap: balance;
}
.ks-panel-window { margin: var(--s-3) 0 0; font-size: 17px; color: #b9b2a3; }

.ks-stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}
.ks-stat {
  margin: 0;
  padding: 16px 18px 15px;
  background: rgba(255, 246, 227, .05);
  border: 2px solid var(--ks-line);
  border-radius: 12px;
}
.ks-stat--goal { grid-column: 1 / -1; }
.ks-stat dt {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #b9b2a3;
}
.ks-stat dd { margin: 8px 0 0; }
.ks-stat-value {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
}
.ks-stat--goal .ks-stat-value { color: var(--gold); font-size: clamp(34px, 3.4vw, 50px); }
.ks-stat.is-pending .ks-stat-value {
  text-transform: none;
  font-family: var(--font-hand);
  font-size: 21px;
  line-height: 1.2;
  color: var(--ks-dim);
}
.ks-meter {
  display: block;
  height: 14px;
  margin-top: 14px;
  background: rgba(255, 246, 227, .1);
  border: 2px solid var(--card-black);
  box-shadow: 0 0 0 2px var(--ks-line);
  border-radius: 999px;
  overflow: hidden;
}
.ks-meter i {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: inherit;
  transition: width 1200ms var(--ease-out);
}
.ks-stat-sub { display: block; margin-top: 8px; font-size: 17px; color: var(--ks-dim); }
.ks-stat-sub:empty { display: none; }
[data-state="prelaunch"] .ks-meter { display: none; }

.ks-status-pill {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 14px 6px;
  border-radius: 999px;
  background: var(--gold);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink-text);
}
[data-state="live"] .ks-status-pill { background: var(--live); color: var(--card-black); }
[data-state="ended"] .ks-status-pill { background: #8d877b; }

.ks-reminder-label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  text-transform: uppercase;
  color: var(--paper);
}
.ks-reminder-row { display: flex; gap: 10px; }
.ks-reminder-row input {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  padding: 12px 16px;
  background: var(--paper);
  border: 3px solid var(--card-black);
  border-radius: 8px;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .1);
  font-family: var(--font-hand);
  font-size: 20px;
  color: var(--ink-text);
}
.ks-reminder-row input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ks-reminder-row input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.ks-reminder-row .btn { flex: none; }
.ks-reminder-msg { margin: 10px 0 0; min-height: 1.4em; font-size: 16px; color: #b9b2a3; }
.ks-reminder-msg.is-error { color: #ff8a78; }
.ks-reminder-msg.is-ok { color: #7fe3a6; }
.ks-reminder.is-sending .btn { pointer-events: none; opacity: .75; }
.ks-panel-action .btn { max-width: 100%; }
.ks-panel-action .btn__face { white-space: normal; text-align: center; }

/* ============================================================
 * 10. FINAL — the end card
 * ============================================================ */

.ks-final {
  position: relative;
  padding-block: clamp(56px, 7vw, 100px) clamp(96px, 11vw, 168px);
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .55) 45%, #000 100%);
  overflow: clip;
}

.ks-cast {
  list-style: none;
  margin: 0 auto clamp(20px, 3vw, 44px);
  padding: 0 var(--gutter);
  display: flex;
  justify-content: center;
  max-width: 1500px;
}
.ks-cast-item {
  flex: 0 1 180px;
  min-width: 0;
  margin-inline: -10px;
  padding: 6px;
  background: var(--card-black);
  border-radius: 12px;
  rotate: calc((var(--i) - 3.5) * 1.6deg);
  translate: 0 calc(abs(var(--i) - 3.5) * 8px);
  box-shadow: 0 10px 0 rgba(0, 0, 0, .35);
}
@supports not (translate: 0 calc(abs(1px))) {
  .ks-cast-item { translate: none; }
}
.ks-cast-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 360 / 330;
  object-fit: cover;
  border-radius: 7px;
}
.ks-cast-item.is-boss { flex-basis: 220px; z-index: 2; margin-top: -20px; }

.ks-final-copy { position: relative; }
.ks-final-logo {
  width: clamp(220px, 26vw, 380px);
  height: auto;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .5));
}
.ks-final-title {
  margin: clamp(8px, 1.4vw, 18px) 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(54px, 8.4vw, 136px);
  line-height: .9;
  text-transform: uppercase;
  color: var(--paper);
  -webkit-text-stroke: .08em var(--card-black);
  paint-order: stroke fill;
  text-shadow: 0 .06em 0 var(--card-black);
  text-wrap: balance;
}
.ks-final .ks-lead { margin-inline: auto; }
.ks-final .btn--lg { font-size: clamp(24px, 2.4vw, 32px); }

.ks-body .site-footer { margin-top: 0; }

/* ============================================================
 * LIGHTBOX (extends the shared trailer lightbox)
 * ============================================================ */

.ks-lightbox { flex-direction: column; gap: 14px; }
.ks-lightbox .trailer-lightbox-panel { aspect-ratio: 1280 / 800; }
.ks-lightbox--trailer .trailer-lightbox-panel { aspect-ratio: 16 / 9; }
.ks-lightbox-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.ks-lightbox-caption {
  position: relative;
  margin: 0;
  max-width: 60ch;
  font-size: 17px;
  text-align: center;
  color: var(--ks-dim);
}

/* ============================================================
 * MOTION
 * ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  @keyframes ks-rise { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }
  @keyframes ks-line { from { transform: translateY(105%); } to { transform: none; } }
  @keyframes ks-deal { from { opacity: 0; transform: translate(40px, 90px) rotate(8deg) scale(.92); } to { opacity: 1; transform: none; } }
  @keyframes ks-back-in { from { opacity: 0; transform: translate(0, 40px) rotate(0deg); } to { opacity: 1; transform: none; } }
  @keyframes ks-stamp { 0% { opacity: 0; transform: scale(2.2) rotate(18deg); } 60% { opacity: 1; transform: scale(.94); } 100% { opacity: 1; transform: none; } }
  @keyframes ks-ping { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.8); } }
  @keyframes ks-sky { from { transform: scale(1); } to { transform: scale(1.06) translate(-1%, -.6%); } }

  .motion-ok .ks-sky::before { animation: ks-sky 36s ease-in-out infinite alternate; }

  /* hero: one orchestrated entrance */
  .motion-ok .ks-chip { animation: ks-rise 560ms var(--ease-out) 60ms both; }
  /* the clip box reaches past the letters so the outline and shadow are never cut */
  .motion-ok .ks-hero-line { overflow: hidden; padding: 0 .14em .1em; margin: 0 -.14em -.1em; }
  .motion-ok .ks-hero-line > span { animation: ks-line 760ms var(--ease-out) both; }
  .motion-ok .ks-hero-line:nth-child(1) > span { animation-delay: 140ms; }
  .motion-ok .ks-hero-line:nth-child(2) > span { animation-delay: 220ms; }
  .motion-ok .ks-hero-line:nth-child(3) > span { animation-delay: 300ms; }
  .motion-ok .ks-hero-lead { animation: ks-rise 640ms var(--ease-out) 420ms both; }
  .motion-ok .ks-hero .ks-actions { animation: ks-rise 640ms var(--ease-out) 520ms both; }
  .motion-ok .ks-hero .ks-note { animation: ks-rise 640ms var(--ease-out) 600ms both; }
  .motion-ok .ks-keycard { animation: ks-deal 900ms var(--ease-deal) 260ms both; }
  .motion-ok .ks-keyart-back > img { animation: ks-back-in 800ms var(--ease-deal) 700ms both; }
  .motion-ok .ks-keyart-back--2 > img { animation-delay: 820ms; }
  .motion-ok .ks-stamp > span:first-child { display: block; }
  .motion-ok .ks-stamp { animation: ks-stamp 520ms var(--ease-deal) 1150ms both; }
  .motion-ok .ks-chip-dot::after { animation: ks-ping 1.8s ease-out 1.4s infinite; }

  /* scroll reveals: set only once kickstarter.js is watching */
  .motion-ok.ks-reveal [data-reveal] { transition: opacity 620ms var(--ease-out), translate 760ms var(--ease-deal); }
  .motion-ok.ks-reveal [data-reveal]:not(.is-in) { opacity: 0; translate: 0 32px; }
  .motion-ok.ks-reveal .ks-beat:nth-child(2), .motion-ok.ks-reveal .ks-step--2, .motion-ok.ks-reveal .ks-loot--2, .motion-ok.ks-reveal .ks-tier:nth-child(2) { transition-delay: 90ms; }
  .motion-ok.ks-reveal .ks-beat:nth-child(3), .motion-ok.ks-reveal .ks-step--3, .motion-ok.ks-reveal .ks-loot--3, .motion-ok.ks-reveal .ks-tier:nth-child(3) { transition-delay: 180ms; }
  .motion-ok.ks-reveal .ks-loot--4, .motion-ok.ks-reveal .ks-tier:nth-child(4) { transition-delay: 270ms; }

  /* the fan opens once when it scrolls in */
  .motion-ok.ks-reveal .ks-fan:not(.is-open) .ks-fan-card { rotate: 0deg; translate: -50% 40px; }
  .motion-ok.ks-reveal .ks-fan .ks-fan-card { transition-delay: calc(abs(var(--o)) * 45ms); }
  .motion-ok.ks-reveal .ks-fan.is-settled .ks-fan-card { transition-delay: 0ms; }

  /* the cast steps up for the end card */
  .motion-ok.ks-reveal .ks-cast-item { transition: opacity 500ms var(--ease-out), translate 700ms var(--ease-deal); transition-delay: calc(var(--i) * 60ms); }
  .motion-ok.ks-reveal .ks-cast:not(.is-in) .ks-cast-item { opacity: 0; translate: 0 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .ks-keyart [data-depth], .ks-fan, .ks-fan-card, .ks-tier-card, .ks-tier-back::after, .ks-meter i { transition: none !important; }
}

/* ============================================================
 * RESPONSIVE
 * ============================================================ */

@media (max-width: 1180px) {
  .ks-loot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ks-loot:nth-child(even) { margin-top: 0; }
  .ks-loot:nth-child(2), .ks-loot:nth-child(4) { translate: 0 32px; }
  .ks-loot-grid { padding-bottom: 32px; }
  .ks-loot-art { aspect-ratio: 16 / 9; }
  .ks-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
  .ks-fan-stage { --step: 8.5deg; }
}

@media (max-width: 960px) {
  .ks-hero-grid { display: flex; flex-direction: column; align-items: flex-start; min-height: 0; gap: 0; }
  .ks-hero-copy { display: contents; }
  .ks-chip { order: 1; }
  .ks-hero-title { order: 2; font-size: clamp(42px, 8.6vw, 78px); }
  .ks-keyart { order: 3; max-width: 620px; width: 100%; margin: 12px auto 0; }
  .ks-hero-lead { order: 4; max-width: 56ch; margin-top: 4px; }
  .ks-hero .ks-actions { order: 5; }
  .ks-hero .ks-note { order: 6; }

  .ks-build-grid { grid-template-columns: 1fr; }
  .ks-build-art { max-width: 640px; margin-inline: auto; width: 100%; order: -1; }

  .ks-why-grid { grid-template-columns: 1fr; }
  .ks-why-copy { position: static; }

  .ks-back-board { grid-template-columns: 1fr; padding-top: 0; }
  .ks-back-art {
    min-height: 0;
    aspect-ratio: 16 / 9;
    margin: 0 calc(-1 * clamp(24px, 5vw, 80px)) 0 calc(-1 * clamp(24px, 3vw, 48px));
    border-radius: 16px 16px 0 0;
    border-right: 0;
    border-bottom: 8px solid var(--card-black);
    overflow: hidden;
  }
  .ks-back-card--a { width: 34%; left: 16%; top: 12%; }
  .ks-back-card--b { width: 22%; right: 18%; bottom: -8%; }

  .ks-panel { grid-template-columns: 1fr; grid-template-areas: "head" "stats" "action"; }

  .ks-cast { flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
  .ks-cast-item, .ks-cast-item.is-boss { flex: 0 0 calc(25% - 12px); margin: 0; translate: none; rotate: calc((var(--i) - 3.5) * 1deg); }
}

/* phones held sideways: pitch and buttons beside the key art, not below it */
@media (max-height: 500px) and (orientation: landscape) and (min-width: 640px) {
  .ks-hero { padding-bottom: 48px; }
  .ks-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 24px; }
  .ks-hero-copy { display: block; }
  .ks-hero-title, .ks-hero-title:lang(de) { font-size: clamp(30px, 5.2vw, 46px); }
  .ks-chip { margin-bottom: 12px; }
  .ks-hero-lead { margin-top: 12px; font-size: 18px; }
  .ks-hero .ks-actions { margin-top: 16px; }
  .ks-hero .ks-actions .btn--lg { font-size: 18px; flex: 0 1 auto; }
  .ks-keyart { margin: 0; }
}

/* phones: the fan becomes a hand you swipe through */
@media (max-width: 720px) {
  .ks-fan-stage { height: auto; margin-top: 0; }
  .ks-fan {
    position: static;
    rotate: none;
    display: flex;
    gap: 14px;
    padding: 28px var(--gutter) 34px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .ks-fan::-webkit-scrollbar { display: none; }
  .ks-fan-card {
    position: relative;
    left: auto;
    bottom: auto;
    flex: 0 0 min(58vw, 240px);
    width: auto;
    translate: none;
    rotate: calc(var(--o) * .8deg);
    transform-origin: 50% 50%;
    scroll-snap-align: center;
  }
  .ks-fan-card:hover, .ks-fan-card:focus-visible, .ks-fan-card.is-pulled { translate: 0 -12px; scale: 1; }
  .motion-ok.ks-reveal .ks-fan:not(.is-open) .ks-fan-card { rotate: calc(var(--o) * .8deg); translate: 0 30px; }
  .ks-hint { display: none; }

  .ks-loot-grid { grid-template-columns: 1fr; padding-bottom: 0; gap: 20px; }
  .ks-loot:nth-child(2), .ks-loot:nth-child(4) { translate: none; }
  .ks-loot {
    display: grid;
    grid-template-columns: 38% minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 10px;
  }
  .ks-loot-art { grid-row: 1 / 3; aspect-ratio: auto; min-height: 150px; border-radius: 10px 4px 4px 10px; }
  .ks-loot-name { margin: 0; align-self: stretch; clip-path: none; padding: 8px 4px 4px; font-size: 19px; }
  .ks-loot-text { margin: 0; font-size: 16px; border-radius: 4px 10px 10px 4px; }
  .ks-loot-vis--rarity ul { gap: 6px; }
  .ks-loot-vis--rarity li { font-size: 14px; }
  .ks-loot-vis--die { padding: 14% 10%; gap: 5px; }

  .ks-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .ks-tiers:not(.is-all-hidden) { grid-template-columns: 1fr; gap: 34px; }
  .ks-tier-back { aspect-ratio: 1; }
  .ks-tier-foot { padding: 10px 4px 4px; }
  .ks-tier-slot { font-size: 17px; }
  .ks-tier-hidden, .ks-tier-price.is-pending { font-size: 15px; }

  .ks-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ks-stat { padding: 12px 14px; }
  .ks-reminder-row { flex-direction: column; }
  .ks-reminder-row .btn { display: flex; }

  .ks-step { padding-left: 62px; }
  .ks-step-node { width: 44px; }
  .ks-step:not(:last-child)::before { left: 21px; top: 54px; }

  .ks-cast-item, .ks-cast-item.is-boss { flex-basis: calc(25% - 9px); padding: 4px; border-radius: 9px; }
  .ks-cast { gap: 9px; }
}

@media (max-width: 480px) {
  .ks-hero-title { font-size: clamp(42px, 12.4vw, 56px); }
  .ks-hero-line + .ks-hero-line { padding-left: 0; }
  .ks-actions .btn--lg { flex: 1 1 100%; }
  .ks-actions .btn__face { justify-content: center; white-space: normal; text-align: center; }
  .ks-back-title { font-size: clamp(34px, 10.5vw, 48px); }
  .ks-keyart { padding: 9% 4% 12% 5%; }
  .ks-stamp { width: 82px; right: -1%; bottom: 0; }
  .ks-stamp span:first-child { font-size: 12px; }
  .ks-stamp span:last-child { font-size: 22px; }

  .ks-tiers.is-all-hidden { grid-template-columns: 1fr 1fr; }
  .ks-tier-card { padding: 6px; border-radius: 14px; }
  .ks-tier-price.is-pending { padding: 6px 8px 5px; }

  .ks-back-board { border-width: 6px; border-radius: 18px; }
  .ks-back-art { border-bottom-width: 6px; }
  .ks-stat.is-pending .ks-stat-value { font-size: 18px; }
  .ks-status-pill { padding: 7px 10px 5px; font-size: clamp(13px, 3.9vw, 16px); }
  .ks-final { padding-bottom: 72px; }
}
