/* Kingmaker Alert — kingmaker-italo.com
   Palette sampled from assets/kingmaker-logo-tp.png.
   No webfonts, no third-party requests, no backdrop-filter. */

:root {
  --ink: #1a0733;
  --ink-soft: #240b45;
  --regal: #420f71;
  --regal-lift: #571a8c;
  --crown: #fde027;
  --ember: #ffb01b;
  --parchment: #ede9f2;
  --muted: #9a85b8;
  --muted-lift: #b7a6d0;

  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --edge: 16px;
  --edge-sm: 10px;
  --hair: 1px solid rgba(183, 166, 208, .16);
  --shell: 1240px;
  --gap: 24px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--crown);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- primitives ---------- */

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: .98;
}

h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.0625rem; letter-spacing: -.01em; line-height: 1.3; }

p { margin: 0; }

.tag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted-lift);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .18em;
  line-height: 1;
  text-transform: uppercase;
}

.lede {
  max-width: 46ch;
  color: var(--muted-lift);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.age {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 7px;
  border: 1px solid currentcolor;
  border-radius: 4px;
  color: var(--muted-lift);
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--crown);
  box-shadow: 0 0 0 0 rgba(253, 224, 39, .55);
}

/* ---------- layout ---------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.band { padding-block: clamp(72px, 10vw, 130px); }
.band--deep { background: var(--ink-soft); }
.band__inner--narrow { max-width: 820px; }

.band__inner--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
}

/* Grid children default to min-width:auto, which lets a long unbreakable
   string stretch its track past the viewport. Every grid here opts out. */
.band__inner--split > *,
.stage__inner > *,
.offers > *,
.feed__row > * { min-width: 0; }

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: var(--hair);
  background: var(--ink);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.mark {
  display: flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
}

.mark__crown { align-self: center; }
.mark__crown svg { width: 30px; height: 21px; }

.mark__word {
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -.025em;
}

.mark__sub {
  color: var(--muted-lift);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.masthead__age {
  color: var(--muted);
  font-size: .8125rem;
}

/* ---------- stage ---------- */

.stage {
  position: relative;
  isolation: isolate;
  padding-block: clamp(56px, 8vw, 104px) clamp(44px, 5vw, 64px);
}

.stage__art {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.stage__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 38%;
  opacity: .72;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, var(--ink) 14%, rgba(26, 7, 51, .8) 42%, rgba(26, 7, 51, .26) 100%),
    linear-gradient(to bottom, rgba(26, 7, 51, .3) 0%, rgba(26, 7, 51, 0) 26%, rgba(26, 7, 51, .55) 80%, var(--ink) 100%);
}

.stage__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  align-items: start;
  gap: clamp(40px, 5vw, 72px);
}

.stage__copy { padding-top: 8px; }
.stage__copy h1 { margin-bottom: 22px; }
.stage__copy .lede { margin-bottom: 36px; }

/* ---------- capture form ---------- */

.capture { max-width: 480px; }

.capture__label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted-lift);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.capture__field {
  display: flex;
  gap: 8px;
}

.capture__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--regal-lift);
  border-radius: var(--edge);
  background: var(--ink-soft);
  font-size: 1rem;
  transition: border-color .16s ease;
}

.capture__input::placeholder { color: var(--muted); }
.capture__input:hover { border-color: var(--muted); }
.capture__input[aria-invalid="true"] { border-color: var(--ember); }

.cta {
  flex: 0 0 auto;
  padding: 15px 24px;
  border: 1px solid var(--crown);
  border-radius: var(--edge);
  background: var(--crown);
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: -.01em;
  transition: background-color .16s ease, border-color .16s ease;
}

.cta:hover { background: var(--ember); border-color: var(--ember); }

.cta--ghost {
  background: transparent;
  color: var(--crown);
}

.cta--ghost:hover { background: var(--crown); color: var(--ink); }

.capture__error {
  min-height: 1.2em;
  margin-top: 10px;
  color: var(--ember);
  font-size: .875rem;
}

.capture__note {
  color: var(--muted);
  font-size: .8125rem;
}

.capture__done {
  max-width: 480px;
  padding: 22px 24px;
  border: 1px solid var(--crown);
  border-radius: var(--edge);
  background: var(--regal);
}

.capture__done strong {
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.capture__done span {
  display: block;
  margin-top: 6px;
  color: var(--muted-lift);
  font-size: .9375rem;
}

/* ---------- feed (signature) ---------- */

.feed {
  border: var(--hair);
  border-radius: var(--edge);
  background: rgba(36, 11, 69, .9);
}

.feed__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: var(--hair);
}

.feed__title {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.feed__note {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .06em;
}

.feed__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feed__row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-areas:
    "time state"
    "time name"
    "time meta";
  column-gap: 14px;
  padding: 15px 20px;
  border-bottom: var(--hair);
  border-left: 2px solid transparent;
}

.feed__row:last-child { border-bottom: 0; }

.feed__time {
  grid-area: time;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.feed__state {
  grid-area: state;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .18em;
  line-height: 1.5;
  text-transform: uppercase;
}

.feed__name {
  grid-area: name;
  overflow-wrap: break-word;
  margin: 3px 0 5px;
  color: var(--muted-lift);
  font-size: .9375rem;
  font-weight: 600;
}

.feed__meta {
  grid-area: meta;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}

.feed__sep { margin: 0 8px; opacity: .5; }

.feed__row--live {
  border-left-color: var(--crown);
  background: rgba(87, 26, 140, .32);
}

.feed__row--live .feed__time { color: var(--parchment); }
.feed__row--live .feed__name { color: var(--parchment); }
.feed__state--live { color: var(--crown); }
.feed__count { color: var(--crown); font-weight: 500; }

.feed__foot {
  padding: 14px 20px;
  border-top: var(--hair);
  color: var(--muted);
  font-size: .8125rem;
}

/* ---------- timeline ---------- */

.timeline {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.timeline__step {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-top: var(--hair);
}

.timeline__step--end { border-bottom: var(--hair); }

.timeline__mark {
  color: var(--crown);
  font-family: var(--mono);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.timeline__step--end .timeline__mark { color: var(--muted); }

.timeline__body h3 { margin-bottom: 6px; }

.timeline__body p {
  max-width: 52ch;
  color: var(--muted-lift);
  font-size: .9375rem;
}

.band__art img {
  width: 100%;
  border: var(--hair);
  border-radius: var(--edge);
}

/* ---------- offers ---------- */

.offers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 48px;
}

.offer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: var(--hair);
  border-radius: var(--edge);
  background: var(--ink);
  transition: border-color .18s ease, transform .18s ease;
}

.offer:hover {
  border-color: var(--regal-lift);
  transform: translateY(-3px);
}

.offer__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.offer__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 24px;
}

.offer__value {
  color: var(--crown);
  font-family: var(--display);
  font-size: 2.125rem;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1;
}

.offer__value span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .625rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.offer__name { margin: 16px 0 10px; }

.offer__text {
  flex: 1 1 auto;
  margin-bottom: 22px;
  color: var(--muted-lift);
  font-size: .875rem;
}

.offer__spec {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding-top: 18px;
  border-top: var(--hair);
}

.offer__spec dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .5625rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.offer__spec dd {
  margin: 5px 0 0;
  font-family: var(--mono);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

.offer__live { color: var(--crown); }

/* ---------- faq ---------- */

.faq { margin-top: 44px; }

.faq__item {
  border-top: var(--hair);
}

.faq__item:last-child { border-bottom: var(--hair); }

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.015em;
  list-style: none;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--crown);
  font-family: var(--mono);
  font-size: 1.125rem;
  line-height: 1;
}

.faq__item[open] summary::after { content: "\2212"; }

.faq__item p {
  max-width: 62ch;
  padding-bottom: 22px;
  color: var(--muted-lift);
  font-size: .9375rem;
}

/* ---------- closing ---------- */

.closing {
  padding-block: clamp(72px, 9vw, 116px);
  border-top: var(--hair);
  background: var(--regal);
  text-align: center;
}

.closing__inner .lede {
  max-width: 42ch;
  margin: 18px auto 32px;
}

/* ---------- legal ---------- */

.legal {
  padding-block: 56px;
  border-top: var(--hair);
  background: var(--ink);
}

.legal__age {
  margin-bottom: 14px;
  font-size: .875rem;
}

.legal__text {
  max-width: 78ch;
  color: var(--muted);
  font-size: .8125rem;
}

.legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
}

.legal__links a { text-decoration-color: var(--regal-lift); }
.legal__links a:hover { text-decoration-color: var(--crown); }

.legal__copy {
  margin-top: 26px;
  padding-top: 22px;
  border-top: var(--hair);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .75rem;
}

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

@keyframes km-row-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

@keyframes km-pulse {
  70% { box-shadow: 0 0 0 9px rgba(253, 224, 39, 0); }
  100% { box-shadow: 0 0 0 0 rgba(253, 224, 39, 0); }
}

/* Stagger is pure CSS: it needs no JS, so it cannot flash before hydration
   and it still runs with scripting disabled. */
.feed__row {
  animation: km-row-in 460ms cubic-bezier(.2, .75, .25, 1) both;
}

.feed__row:nth-child(1) { animation-delay: 0ms; }
.feed__row:nth-child(2) { animation-delay: 60ms; }
.feed__row:nth-child(3) { animation-delay: 120ms; }
.feed__row:nth-child(4) { animation-delay: 180ms; }
.feed__row:nth-child(5) { animation-delay: 240ms; }

.pulse { animation: km-pulse 2.4s ease-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .feed__row,
  .pulse { animation: none; }
  .offer { transition: border-color .18s ease; }
  .offer:hover { transform: none; }
}

/* ---------- breakpoints ---------- */

@media (max-width: 1024px) {
  .stage__inner,
  .band__inner--split { grid-template-columns: minmax(0, 1fr); }
  .band__art { max-width: 420px; }
  .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage__art img { opacity: .4; }
}

@media (max-width: 640px) {
  :root { --gap: 18px; }
  .masthead__age { display: none; }
  .offers { grid-template-columns: minmax(0, 1fr); }
  .timeline__step { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .capture__field { flex-direction: column; }
  .cta { width: 100%; }
  .feed__head { padding-inline: 16px; }
  .feed__row,
  .feed__foot { padding-inline: 16px; }
}

@media (max-width: 480px) {
  .feed__row {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "time state"
      "name name"
      "meta meta";
    column-gap: 12px;
    row-gap: 2px;
  }
  .feed__time { font-size: .75rem; }
  .offer__spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
