/* /subathon. Mobile first, desktop layout from 1000px. */

main { display: flex; flex-direction: column; gap: 40px; }

/* ---------- Landing: hero + dashboard ---------- */

.landing {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
  overflow: hidden;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 380px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter) 20px;
}

.hero-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 18, 20, 0) 45%, var(--bg) 100%),
    linear-gradient(90deg, rgba(18, 18, 20, 0.55), rgba(18, 18, 20, 0) 60%),
    url('/assets/hero-bg-960.webp') center 30% / cover no-repeat;
  opacity: 0.85;
}
.hero-art::after {
  content: '';
  position: absolute;
  right: -40px;
  top: 10%;
  width: 70%;
  height: 80%;
  background: url('/assets/brush-red.webp') center / contain no-repeat;
  opacity: 0.22;
  filter: blur(6px);
  mix-blend-mode: screen;
  transform: rotate(-12deg);
}

.hero-character {
  position: absolute;
  right: -8%;
  top: 10px;
  width: 104%;
  max-width: 560px;
  pointer-events: none;
}
.hero-character img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
  /* The source PNG is cut flat under the jacket: fade the lower part into the background */
  -webkit-mask-image: linear-gradient(180deg, #000 52%, rgba(0, 0, 0, 0.35) 70%, transparent 86%);
  mask-image: linear-gradient(180deg, #000 52%, rgba(0, 0, 0, 0.35) 70%, transparent 86%);
}

.hero-title {
  position: relative;
  display: flex;
  flex-direction: column;
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
}
.hero-edition { font-size: clamp(1.5rem, 6vw, 2.6rem); }
.hero-brand { font-size: clamp(3rem, 15vw, 6.4rem); }
.hero-event { font-style: normal; color: var(--red-bright); font-size: clamp(2.6rem, 13.2vw, 5.7rem); }

.dashboard {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 60%),
    var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red-bright);
}
.panel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timer-panel { grid-column: 1 / -1; }
.timer {
  font-weight: 700;
  font-size: clamp(2.6rem, 13vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.total {
  font-weight: 700;
  font-size: clamp(2rem, 10vw, 3.2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.next-panel { grid-column: 1 / -1; }
.next-name {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.next-distance { color: var(--muted); font-size: 0.8rem; font-weight: 600; }

.dashboard-watch {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  padding: 16px;
  min-height: 44px;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-title);
  font-size: 1.15rem;
  line-height: 1;
  text-align: right;
  transition: background 0.15s;
}
.dashboard-watch:hover { background: var(--red-bright); }
.dashboard-watch-label { display: flex; flex-direction: column; gap: 2px; }
.watch-arrow { width: 64px; height: 18px; transition: transform 0.2s; }
.dashboard-watch:hover .watch-arrow { transform: translateX(4px); }

/* Phones and tablets: timer, then subs + watch side by side, then next goal */
@media (max-width: 999px) {
  .next-panel { order: 3; }
  .dashboard-watch { order: 2; font-size: 1.05rem; }
  .dashboard-watch .watch-arrow { width: 48px; }
}

.details-arrow {
  display: flex;
  align-self: center;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-top: 16px;
  color: var(--red-bright);
  animation: bob 2.4s ease-in-out infinite;
}
.details-arrow .icon { width: 26px; height: 26px; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (min-width: 560px) {
  .dashboard { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 440px; }
}

@media (min-width: 700px) {
  .hero-art {
    background:
      linear-gradient(180deg, rgba(18, 18, 20, 0) 55%, var(--bg) 100%),
      linear-gradient(90deg, rgba(18, 18, 20, 0.7), rgba(18, 18, 20, 0) 55%),
      url('/assets/hero-bg-1920.webp') center 30% / cover no-repeat;
  }
  .hero-character { right: -2%; top: 0; width: 66%; max-width: 900px; }
  .hero { min-height: 520px; padding-bottom: 32px; }
}

@media (min-width: 1000px) {
  .landing { min-height: calc(100svh - var(--header-h)); max-width: none; }
  .hero { flex: 1; min-height: 480px; padding-bottom: 36px; }
  .hero-character { right: 2%; top: 16px; width: min(54%, 860px); }
  .dashboard {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr) minmax(0, 1.3fr) minmax(150px, 0.5fr);
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
  }
  .timer-panel, .next-panel { grid-column: auto; }
  .panel { padding: 22px 24px; justify-content: space-between; min-height: 152px; }
  .timer { font-size: clamp(3rem, 4.6vw, 4.6rem); }
  .hero-title { width: 100%; max-width: var(--max); margin: 0 auto; }
  .hero-brand { font-size: clamp(4rem, 7.4vw, 7.6rem); }
  .hero-event { font-size: clamp(3.6rem, 6.6vw, 6.8rem); }
  .dashboard-watch { font-size: 1.5rem; padding: 20px 22px; }
}

/* ---------- Sections shared layout ---------- */

.stream-section, .unlocks, .content-grid, .info-card, .feedback-section {
  width: calc(100% - var(--gutter) * 2);
  max-width: var(--max);
  margin: 0 auto;
}

.card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

/* ---------- Live player ---------- */

.stream-section { max-width: 1100px; }
.stream-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.stream-heading h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.35rem;
  text-transform: uppercase;
}
.stream-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 0 4px rgba(230, 0, 0, 0.25), 0 0 14px var(--red-glow);
  animation: pulse 1.8s infinite;
}
.stream-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.stream-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Next unlocks ---------- */

.unlocks-grid { display: grid; gap: 12px; }
.unlock-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(204, 0, 0, 0.12), rgba(204, 0, 0, 0) 55%), var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.unlock-card .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.unlock-card .eyebrow .icon { width: 14px; height: 14px; color: var(--red-bright); }
.unlock-card h3 { font-weight: 800; font-size: 1.1rem; line-height: 1.25; }
.unlock-card .unlock-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}
.unlock-card .unlock-meta strong { color: var(--red-bright); font-size: 1.25rem; margin-right: 4px; font-variant-numeric: tabular-nums; }

@media (min-width: 800px) {
  .unlocks-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* ---------- Goals + gifters ---------- */

.content-grid { display: grid; gap: 24px; align-items: start; }
.goals-card, .gifters-card, .info-card { padding: 20px 16px; }
.goals-title-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.goals-counts { font-size: 0.85rem; }
.goals-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.goal-filters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.goal-filters button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
.goal-filters button:hover { color: var(--text); }
.goal-filters button[aria-pressed='true'] { color: #fff; background: var(--red-soft); border-color: rgba(230, 0, 0, 0.6); }
.filter-description { min-height: 1.5em; margin: 12px 2px; font-size: 0.85rem; }

.goal-list, .gifter-list { list-style: none; margin: 0; padding: 0; }
.goal-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 12px 12px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--card-2);
}
.goal-item:first-child { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.goal-subs { font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.goal-item[data-state='locked'] .goal-subs { color: var(--muted); }
.goal-item[data-state='unlocked'] .goal-subs { color: var(--text); }
.goal-text { min-width: 0; }
.goal-text strong { display: block; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.goal-text span { display: block; margin-top: 2px; color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.goal-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.goal-votes { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.goal-votes .icon { width: 16px; height: 16px; color: var(--red-bright); }
.goal-empty { padding: 28px 12px; text-align: center; color: var(--muted); }

.show-more { width: 100%; margin-top: 12px; }

.gifter-empty { margin-bottom: 8px; }
.gifter-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
}
.gifter-rank { color: var(--red-bright); font-weight: 800; font-variant-numeric: tabular-nums; }
.gifter-item:nth-child(-n + 3) .gifter-rank { font-family: var(--font-title); font-weight: 400; font-size: 1.1rem; }
.gifter-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gifter-count { text-align: right; font-weight: 800; font-size: 1.15rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gifter-count small { display: block; color: var(--muted); font-weight: 500; font-size: 0.7rem; }

@media (min-width: 700px) {
  .goals-card, .gifters-card, .info-card { padding: 28px; }
  .goal-filters { display: inline-flex; flex-wrap: wrap; }
  .goal-item { grid-template-columns: 84px 1fr auto; padding: 14px 16px; }
}

@media (min-width: 1000px) {
  .content-grid { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
  .goal-scroll, .gifter-scroll {
    max-height: 560px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--red) transparent;
  }
  .gifter-scroll { max-height: 642px; }
}

/* ---------- How it works ---------- */

.info-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(30, 33, 32, 0.92), rgba(30, 33, 32, 0.97)),
    url('/assets/strip-red.webp') bottom center / cover no-repeat,
    var(--card);
}
.info-layout { display: grid; gap: 28px; }
.time-rules { display: grid; gap: 24px; }
.rate-group h3 { margin-bottom: 12px; font-weight: 700; font-size: 1.15rem; }
.rate-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--red-soft);
  border-left: 3px solid var(--red-bright);
  font-weight: 700;
  font-size: 0.92rem;
}
.rate-note .icon { margin-top: 3px; width: 14px; height: 14px; color: var(--red-bright); }
.rate-rows { border: 1px solid var(--line-strong); border-radius: var(--radius); }
.rate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  background: var(--card-2);
}
.rate + .rate { border-top: 1px solid var(--line); }
.rate span { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; }
.rate strong { font-weight: 800; font-size: 1.4rem; white-space: nowrap; }
.rate small { color: var(--red-bright); font-family: var(--font-cond); font-size: 0.95rem; margin-left: 2px; }

.info-guide { display: grid; gap: 0; }
.info-guide article { padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-guide article:first-child { padding-top: 0; }
.info-guide article:last-child { border-bottom: 0; }
.info-guide h3 { margin-bottom: 6px; font-weight: 700; font-size: 1.05rem; }
.info-guide p { color: var(--muted); font-size: 0.95rem; }

@media (min-width: 1000px) {
  .info-layout { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 40px; }
}

/* ---------- Feedback ---------- */

.feedback-section { max-width: 760px; }
.feedback-card {
  padding: 24px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red-bright);
  border-radius: var(--radius);
}
#feedback-form { display: grid; gap: 16px; }
#feedback-form > .muted { margin-top: -4px; }
.feedback-fields { display: grid; gap: 16px; }
.feedback-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.feedback-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.feedback-submit .button { min-width: 160px; }
.feedback-status { font-weight: 600; font-size: 0.9rem; }
.feedback-status[data-tone='error'] { color: #ff6b6b; }
.feedback-success { display: grid; justify-items: start; gap: 10px; }
.feedback-success h3 { font-family: var(--font-title); font-weight: 400; font-size: 1.6rem; text-transform: uppercase; }
.feedback-success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%; background: var(--red);
}
.feedback-success-icon .icon { width: 22px; height: 22px; }

@media (min-width: 700px) {
  .feedback-card { padding: 32px 36px; }
  .feedback-fields { grid-template-columns: 1fr 1fr; }
}

/* ---------- Goal unlocked notice ---------- */

.unlock-notice {
  position: fixed;
  right: 12px;
  left: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px 14px 16px;
  background: linear-gradient(120deg, rgba(204, 0, 0, 0.32), rgba(204, 0, 0, 0.08)), #18191a;
  border: 1px solid var(--red-bright);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(230, 0, 0, 0.25);
  animation: notice-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.unlock-symbol {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  background: var(--red-bright); color: #fff;
  animation: spin-in 0.8s ease-out;
}
.unlock-symbol .icon { width: 22px; height: 22px; }
.unlock-copy { display: grid; flex: 1; min-width: 0; }
.unlock-eyebrow { font-family: var(--font-cond); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: #ff7a7a; }
.unlock-copy strong { font-weight: 800; font-size: 1.05rem; line-height: 1.25; }
.unlock-copy span:last-child { color: var(--muted); font-size: 0.82rem; }
@keyframes notice-in { from { transform: translateY(30px) scale(0.96); opacity: 0; } }
@keyframes spin-in { from { transform: rotate(-180deg) scale(0.4); } }
@media (min-width: 700px) {
  .unlock-notice { left: auto; right: 24px; bottom: 24px; width: 400px; }
}
