/* ============================================================
   Super Silver Academy — style.css
   Midnight Superhero Academy aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&family=DM+Sans:opsz,wght@9..40,400;9..40,500&display=swap');

/* === VARIABLES === */
:root {
  --navy:        #0D1B3E;
  --navy-mid:    #14254F;
  --navy-light:  #1E3364;
  --gold:        #F5B93E;
  --gold-hover:  #E5A82A;
  --gold-glow:   rgba(245, 185, 62, 0.30);
  --silver:      #A8C4D4;
  --silver-dim:  rgba(168, 196, 212, 0.70);
  --cream:       #FAF9F6;
  --white:       #FFFFFF;
  --text-dark:   #1A1A2E;
  --text-muted:  #5A6880;
  --border:      #E5E9F2;

  --radius-card: 18px;
  --radius-btn:  50px;
  --radius-input:10px;

  --shadow-card:  0 4px 24px rgba(13, 27, 62, 0.09);
  --shadow-hover: 0 14px 44px rgba(13, 27, 62, 0.18);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.25s var(--ease);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.65;
}

img { max-width: 100%; display: block; }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  background: var(--navy);
  position: relative;
  overflow: hidden;
  padding: 90px 24px 110px;
  text-align: center;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Subtle radial glow behind content */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(245,185,62,0.08) 0%, transparent 65%);
  pointer-events: none;
}

/* Starfield */
.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes twinkle {
  0%, 100% { opacity: 0;                    transform: scale(0.5); }
  50%       { opacity: var(--op, 0.6);      transform: scale(1);   }
}

/* Hero content sits above starfield */
.hero > *:not(.stars):not(.wave) {
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,185,62,0.12);
  border: 1px solid rgba(245,185,62,0.35);
  color: var(--gold);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 50px;
  margin-bottom: 28px;
}

.hero__title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 8vw, 3.8rem);
  color: var(--white);
  line-height: 1.12;
  margin-bottom: 20px;
  max-width: 680px;
}

.hero__title .gold { color: var(--gold); }

.hero__subtitle {
  font-size: clamp(1rem, 3.2vw, 1.15rem);
  color: var(--silver-dim);
  max-width: 460px;
  margin: 0 auto 38px;
  line-height: 1.7;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 16px 34px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 22px var(--gold-glow);
}

.hero__cta:hover {
  background: var(--gold-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(245,185,62,0.42);
}

.hero__cta:hover .arrow { transform: translateY(4px); }

.arrow {
  display: inline-block;
  font-size: 1.1em;
  transition: transform 0.2s var(--ease);
}

/* === WAVE DIVIDERS === */
.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 1;
}

.wave svg { display: block; width: 100%; height: 60px; }

.wave--top {
  top: 0;
  bottom: auto;
}

/* ============================================================
   SECTION SHARED
   ============================================================ */

.section-label {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  color: var(--text-dark);
  line-height: 1.18;
  margin-bottom: 48px;
}

/* ============================================================
   BOOKS SECTION
   ============================================================ */

.books {
  background: var(--cream);
  padding: 80px 24px 90px;
  text-align: center;
}

.books__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .books__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

.book-card {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  text-align: left;
}

.book-card:hover {
  transform: translateY(-8px) rotate(-0.5deg);
  box-shadow: var(--shadow-hover);
}

.book-card__img-wrap {
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--white);
  text-decoration: none;
  outline-offset: 2px;
}

.book-card__img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s var(--ease);
}

.book-card:hover .book-card__img-wrap img,
.book-card__img-wrap:hover img {
  transform: scale(1.04);
}

.book-card__body {
  padding: 20px 22px 24px;
}

.book-card__title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.book-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.btn-amazon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FF9900;
  color: #111;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: 50px;
  text-decoration: none;
  transition: var(--transition);
}

.btn-amazon::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23111'%3E%3Cpath d='M13 3L4 14h7v7l9-11h-7V3z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.btn-amazon:hover {
  background: #e68a00;
  transform: translateY(-1px);
}

/* ============================================================
   FORM SECTION
   ============================================================ */

.form-section {
  background: var(--navy);
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle radial behind form */
.form-section::before {
  content: '';
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(245,185,62,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.form-section .section-title { color: var(--white); }

.form-section__subtitle {
  color: var(--silver-dim);
  max-width: 420px;
  margin: -28px auto 40px;
  font-size: 1rem;
  line-height: 1.7;
  position: relative;
}

.form-wrapper {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 20px;
  min-height: 520px;
  box-shadow: 0 8px 50px rgba(0,0,0,0.30);
  overflow: hidden;
}

/* Form fields */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-input);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,185,62,0.18);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: '▾';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Consent checkbox */
.form-group.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.form-group.consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--gold);
  border-radius: 4px;
}

.form-group.consent label {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0;
  cursor: pointer;
}

/* Submit button */
.btn-submit {
  display: block;
  width: 100%;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 18px var(--gold-glow);
  letter-spacing: 0.02em;
}

.btn-submit:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(245,185,62,0.40);
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 28px 24px;
  text-align: center;
}

footer p {
  color: rgba(255,255,255,0.35);
  font-size: 0.84rem;
}

/* ============================================================
   THANK YOU PAGE
   ============================================================ */

.ty-hero {
  background: var(--navy);
  padding: 90px 24px 110px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ty-hero > *:not(.stars):not(.wave) {
  position: relative;
  z-index: 1;
}

.ty-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(245,185,62,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.ty-icon {
  font-size: 3.8rem;
  margin-bottom: 22px;
  display: block;
  animation: float 2.2s ease-in-out infinite alternate;
}

@keyframes float {
  from { transform: translateY(0);    }
  to   { transform: translateY(-14px); }
}

.ty-hero__title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 7vw, 3rem);
  color: var(--gold);
  line-height: 1.15;
  margin-bottom: 20px;
  max-width: 580px;
}

.ty-hero__body {
  color: var(--silver-dim);
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  max-width: 440px;
  line-height: 1.75;
}

/* While you wait */
.wait-section {
  background: var(--cream);
  padding: 72px 24px 80px;
  text-align: center;
}

.wait-section__icon {
  font-size: 2.8rem;
  margin-bottom: 20px;
  display: block;
}

.wait-section__title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--text-dark);
  margin-bottom: 14px;
}

.wait-section__body {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.75;
}

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

@media (max-width: 480px) {
  .form-wrapper {
    padding: 28px 20px 32px;
  }
}
