:root {
  --ink: #f8fafc;
  --muted: #94a3b8;
  --deep: #0b1a3d;
  --panel: #1e3a8a;
  --teal: #1e3a8a;
  --mint: #fdba74;
  --gold: #f97316;
  --ember: #9a3412;
  --sky: #eff6ff;
  --good: #22c55e;
  --bad: #ef4444;
  --watch: #f59e0b;
  --line: rgba(248, 250, 252, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--deep);
  overflow-x: hidden;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1000px 520px at 12% -8%, rgba(30, 58, 138, 0.55), transparent 55%),
    radial-gradient(900px 480px at 92% 8%, rgba(249, 115, 22, 0.22), transparent 50%),
    linear-gradient(165deg, #050d22 0%, #0b1a3d 42%, #1e3a8a 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: min(42vh, 420px);
  background:
    linear-gradient(180deg, transparent, rgba(11, 26, 61, 0.88) 55%),
    url("assets/psx-characters/theme-dividends.webp") center bottom / cover no-repeat;
  opacity: 0.28;
  animation: characterDrift 22s var(--ease) infinite alternate;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  animation: drift 18s var(--ease) infinite alternate;
}

.orb-a {
  width: 340px;
  height: 340px;
  left: -80px;
  top: 18%;
  background: rgba(30, 58, 138, 0.65);
}

.orb-b {
  width: 280px;
  height: 280px;
  right: -60px;
  top: 55%;
  background: rgba(249, 115, 22, 0.28);
  animation-delay: -6s;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 20s linear infinite;
}

.tape {
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  opacity: 0.18;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 0 4vw 18px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.tape span {
  flex: 1;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--gold), var(--teal));
  transform-origin: bottom;
  animation: pump 2.2s ease-in-out infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, -18px, 0) scale(1.08); }
}

@keyframes grainShift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-2%, -3%, 0); }
}

@keyframes pump {
  0%, 100% { transform: scaleY(0.55); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes characterDrift {
  from { transform: translate3d(0, 8px, 0) scale(1.02); }
  to { transform: translate3d(0, -10px, 0) scale(1.06); }
}

@keyframes raceRun {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(6px, -12px, 0) rotate(1.5deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.top,
main,
.foot {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  max-width: 1120px;
  margin: 0 auto;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wordmark img {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.top-cta {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: var(--gold);
  transition: background 180ms ease, transform 180ms ease;
}

.top-cta:hover {
  background: rgba(249, 115, 22, 0.26);
  transform: translateY(-1px);
}

.service-line {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(253, 186, 116, 0.35);
  color: #fdba74;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.service-line img {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #fff;
}

.service-line:hover {
  border-color: rgba(249, 115, 22, 0.7);
  color: #fff;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 1.25rem 3.5rem;
  max-width: 1120px;
  margin: 0 auto;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(11, 26, 61, 0.35), rgba(30, 58, 138, 0.55)),
    url("assets/psx-characters/theme-title.webp") center / cover no-repeat;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
  isolation: isolate;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 26, 61, 0.15), rgba(11, 26, 61, 0.55));
  z-index: 0;
}

.hero-character {
  position: relative;
  z-index: 1;
  width: min(420px, 88%);
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
  animation: rise 900ms var(--ease) both, raceRun 5.2s ease-in-out 1s infinite;
  border-radius: 18px;
}

.hero-mark {
  width: min(280px, 68vw);
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.4));
  animation: rise 900ms var(--ease) both, bob 4.8s ease-in-out 1s infinite;
}

.candles {
  position: absolute;
  bottom: 8%;
  z-index: 1;
  display: flex;
  gap: 10px;
  opacity: 0.7;
}

.candles i {
  width: 11px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--gold), #93c5fd);
  transform-origin: bottom;
  animation: pump 1.9s ease-in-out infinite;
}

.candles i:nth-child(1) { height: 28px; animation-delay: 0s; }
.candles i:nth-child(2) { height: 44px; animation-delay: 0.12s; }
.candles i:nth-child(3) { height: 34px; animation-delay: 0.24s; }
.candles i:nth-child(4) { height: 58px; animation-delay: 0.08s; }
.candles i:nth-child(5) { height: 40px; animation-delay: 0.2s; }
.candles i:nth-child(6) { height: 50px; animation-delay: 0.16s; }
.candles i:nth-child(7) { height: 36px; animation-delay: 0.28s; }

.hero-copy {
  animation: rise 1s var(--ease) 120ms both;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, #ffffff 12%, #fdba74 48%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 1rem 0 1.6rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  line-height: 1.55;
}

.color-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.chip::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
}

.chip.firmer {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

.chip.softer {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

.chip.mixed {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fdba74;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--gold), #ea580c);
  color: #fff;
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.32);
}

.btn.primary:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.4);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.04);
}

.btn.wide {
  width: 100%;
  margin-top: 0.35rem;
}

.btn[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.btn-spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  display: none;
  animation: spin 0.7s linear infinite;
}

.btn.is-loading .btn-label { opacity: 0.65; }
.btn.is-loading .btn-spinner { display: inline-block; }

.fine {
  margin: 1rem 0 0;
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.84rem;
}

.helps,
.join {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.section-head,
.join-intro {
  max-width: 36rem;
  margin-bottom: 2rem;
}

.section-head h2,
.join-intro h2,
.success h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-head p:last-child,
.join-intro p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.help-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.help-list li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.help-list .num {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.35rem;
}

.help-list h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.help-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.join {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 5rem;
}

.signup,
.success {
  width: min(560px, 100%);
  padding: 1.35rem;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(30, 58, 138, 0.92), rgba(11, 26, 61, 0.94));
  border: 1px solid rgba(253, 186, 116, 0.22);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.field-row {
  display: grid;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.field label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--mint);
}

.field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(248, 250, 252, 0.14);
  background: rgba(5, 13, 34, 0.55);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input::placeholder {
  color: rgba(148, 163, 184, 0.55);
}

.field input:focus {
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.form-note {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--mint);
}

.form-note.error { color: #fecaca; }

.success {
  text-align: center;
  animation: rise 600ms var(--ease) both;
}

.success img {
  margin: 0.2rem auto 1rem;
}

.success p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
  display: grid;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.foot strong {
  color: var(--ink);
}

.foot p { margin: 0.35rem 0 0; }

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.foot a {
  color: var(--gold);
  text-decoration: none;
}

.foot a:hover { text-decoration: underline; }

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 2.5rem;
    padding-top: 2rem;
  }

  .hero-visual {
    order: 2;
    min-height: 420px;
  }
  .hero-copy { order: 1; }

  .help-list li {
    grid-template-columns: 5.5rem 1fr;
    padding: 1.6rem 0;
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .foot {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }

  .foot-meta {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
