/* ============================================================
   The Personal Brand Playbook waitlist
   ============================================================ */

:root{
  --bg: #060608;
  --bg-2: #0a0a0d;
  --accent: #2f6bff;
  --accent-soft: rgba(47, 107, 255, 0.35);
  --text: #f5f6f8;
  --muted: #9aa0ac;
  --muted-2: #6b707c;
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.06);
  --error: #ff5c5c;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html{
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body{
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* ---------------- Ambient background ---------------- */

.noise{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.glow{
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  will-change: transform;
}

.glow--a{
  width: 46vw;
  height: 46vw;
  top: -14vw;
  left: -10vw;
  background: radial-gradient(circle, rgba(47,107,255,0.55), rgba(47,107,255,0) 70%);
  animation: drift-a 22s ease-in-out infinite alternate;
}

.glow--b{
  width: 40vw;
  height: 40vw;
  bottom: -16vw;
  right: -8vw;
  background: radial-gradient(circle, rgba(47,107,255,0.35), rgba(47,107,255,0) 70%);
  animation: drift-b 26s ease-in-out infinite alternate;
}

@keyframes drift-a{
  0%{ transform: translate(0, 0) scale(1); }
  100%{ transform: translate(6vw, 8vw) scale(1.12); }
}
@keyframes drift-b{
  0%{ transform: translate(0, 0) scale(1); }
  100%{ transform: translate(-5vw, -6vw) scale(1.08); }
}

.spotlight{
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--x, 50%) var(--y, 30%), rgba(47,107,255,0.10), transparent 60%);
  transition: opacity 0.3s ease;
}

/* ---------------- Layout ---------------- */

main{ position: relative; z-index: 2; }

.hero{
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5.5rem 1.5rem 2.25rem;
  position: relative;
}

.hero__inner{
  width: 100%;
  max-width: 680px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kicker{
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.08);
}

.headline{
  margin: 0 0 0.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
}

.headline .line{ display: block; }
.headline em{
  font-style: normal;
  color: var(--accent);
}

.subhead{
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.8vw, 1.1rem);
  line-height: 1.55;
  max-width: 46ch;
}

.subhead strong{ color: var(--text); font-weight: 600; }
.accent-text{ color: var(--text); font-weight: 600; border-bottom: 1px solid var(--accent-soft); }

/* ---------------- Stats ---------------- */

.stats{
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

.stat{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  max-width: 11rem;
}

.stat__num{
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat__label{
  font-size: 0.8rem;
  color: var(--muted-2);
  line-height: 1.3;
}

.stat-divider{
  width: 1px;
  height: 2.5rem;
  background: var(--border);
}

/* ---------------- Form ---------------- */

.waitlist-form{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.waitlist-form[hidden]{ display: none; }

.field{
  position: relative;
  text-align: left;
}

.field input{
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem 1rem 0.55rem;
  font-size: 1rem;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.25s var(--ease-out-expo), background 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo);
}

.field input:hover{ border-color: rgba(255,255,255,0.18); }

.field input:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.15);
  background: rgba(47, 107, 255, 0.05);
}

.field label{
  position: absolute;
  left: 1rem;
  top: 1rem;
  font-size: 1rem;
  color: var(--muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.2s var(--ease-out-expo), color 0.2s ease, top 0.2s var(--ease-out-expo);
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label{
  top: 0.5rem;
  transform: translateY(-0.15rem) scale(0.72);
  color: var(--muted-2);
}

.field input:focus + label{ color: var(--accent); }

.field__error{
  display: block;
  min-height: 1.1rem;
  font-size: 0.78rem;
  color: var(--error);
  margin-top: 0.35rem;
  padding-left: 0.25rem;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.field__error.show{ opacity: 1; transform: translateY(0); }

.field.invalid input{ border-color: var(--error); }
.field.invalid input:focus{ box-shadow: 0 0 0 4px rgba(255, 92, 92, 0.15); }

.field.shake{ animation: shake 0.4s var(--ease-out-expo); }
@keyframes shake{
  0%, 100%{ transform: translateX(0); }
  20%{ transform: translateX(-6px); }
  40%{ transform: translateX(5px); }
  60%{ transform: translateX(-3px); }
  80%{ transform: translateX(2px); }
}

/* ---------------- CTA button ---------------- */

.cta{
  position: relative;
  margin-top: 0.4rem;
  padding: 1.05rem 1.5rem;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-out-expo), background 0.25s ease;
  box-shadow: 0 8px 24px -8px rgba(47, 107, 255, 0.6);
}

.cta:hover{
  box-shadow: 0 12px 32px -6px rgba(47, 107, 255, 0.75);
}

.cta:active{ transform: scale(0.97) !important; }

.cta::before{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.28), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cta:hover::before{ opacity: 1; }

.cta__spinner{
  display: inline-block;
  width: 0;
  height: 0.9rem;
  margin-left: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  vertical-align: middle;
  opacity: 0;
  transition: width 0.25s ease, margin 0.25s ease, opacity 0.2s ease;
}

.cta.loading .cta__label{ opacity: 0.6; }
.cta.loading .cta__spinner{
  width: 0.9rem;
  margin-left: 0.6rem;
  opacity: 1;
  border-color: rgba(255,255,255,0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.cta.loading{ cursor: default; pointer-events: none; }

@keyframes spin{ to{ transform: rotate(360deg); } }

.form-note{
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  color: var(--muted-2);
}

/* ---------------- Success state ---------------- */

.success{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.success[hidden]{ display: none; }

.success h2{
  margin: 0.25rem 0 0.4rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.success p{
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.success__check{
  width: 4.25rem;
  height: 4.25rem;
  margin-bottom: 0.5rem;
}

.success__circle{
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw-circle 0.5s var(--ease-out-expo) forwards;
}

.success__mark{
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: draw-mark 0.35s var(--ease-out-expo) 0.45s forwards;
}

@keyframes draw-circle{ to{ stroke-dashoffset: 0; } }
@keyframes draw-mark{ to{ stroke-dashoffset: 0; } }

/* ---------------- Scroll cue ---------------- */

.scroll-cue{
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.4rem;
  height: 2.3rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
}

.scroll-cue span{
  display: block;
  width: 4px;
  height: 4px;
  margin: 6px auto 0;
  border-radius: 50%;
  background: var(--accent);
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot{
  0%{ transform: translateY(0); opacity: 1; }
  70%{ transform: translateY(10px); opacity: 0; }
  100%{ transform: translateY(0); opacity: 0; }
}

/* ---------------- Included section ---------------- */

.included{
  padding: 2rem 1.5rem 2.25rem;
  border-top: 1px solid var(--border-soft);
}

.included__inner{
  max-width: 1120px;
  margin: 0 auto;
}

.included__kicker{
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 1.25rem;
}

.cards{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.card{
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1.4rem 1.25rem;
  transition: transform 0.4s var(--ease-out-expo), border-color 0.3s ease, background 0.3s ease;
}

.card:hover{
  transform: translateY(-4px);
  border-color: var(--accent-soft);
  background: rgba(47, 107, 255, 0.05);
}

.card__icon{
  width: 1.5rem;
  height: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.card h3{
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p{
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ---------------- Footer ---------------- */

.site-footer{
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1rem 1.5rem 1.5rem;
}

.site-footer p{
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted-2);
}

/* ---------------- Reveal animation ---------------- */

.reveal{
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.in-view{
  opacity: 1;
  transform: translateY(0);
}

.hero .reveal.in-view:nth-of-type(1){ transition-delay: 0.02s; }

/* stagger inside hero via JS-applied delay custom property */
.hero .reveal{ transition-delay: var(--delay, 0s); }
.included .reveal{ transition-delay: var(--delay, 0s); }

/* ---------------- Responsive ---------------- */

@media (max-width: 1020px){
  .cards{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px){
  .cards{ grid-template-columns: 1fr; }
  .hero{ padding-top: 5.5rem; }
}

@media (max-width: 480px){
  .stats{ gap: 1.1rem; }
  .stat{ max-width: 8.5rem; }
}

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

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important;
  }
  .glow{ animation: none; }
  .spotlight{ display: none; }
}
