:root {
  --cream: #FCF8F0;
  --purple-900: #2C1050;
  --purple-800: #3D1868;
  --purple-700: #4E1F82;
  --purple-600: #6B2FA0;
  --purple-200: #E9DFF5;
  --purple-100: #F4EEFB;
  --orange-600: #E8720E;
  --orange-500: #F47C20;
  --orange-400: #FFA552;
  --ink: #372A54;
  --ink-soft: #6A5D8A;
  --white: #FFFFFF;
  --font-display: 'Baloo 2', 'Comic Sans MS', cursive;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-hand: 'Caveat', cursive;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

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

.page { position: relative; }

.accent-purple { color: var(--purple-700); }
.accent-orange { color: var(--orange-500); }
.accent-orange-l { color: var(--orange-400); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  padding: 56px 6vw 40px;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
}

.hero-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.decor { position: absolute; }
.decor.cloud   { width: 90px; top: 6%;  right: 26%; opacity: .85; }
.decor.dashes  { width: 34px; top: 20%; right: 42%; }
.decor.trail   { width: 150px; top: 10%; right: 6%; }
.decor.plane   { width: 52px; top: 8%;  right: 8%; transform: rotate(8deg); }
.decor.star    { width: 40px; top: 16%; right: 2%; }

/* ---- features section decor ---- */
.features-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.features-decor .star-1    { width: 30px; top: 4%;  left: 6%; opacity: .8; }
.features-decor .dashes-1  { width: 26px; top: 30%; right: 4%; }
.features-decor .dot-cluster { width: 60px; bottom: 8%; left: 3%; opacity: .7; }
.features-decor .heart-1   { width: 22px; top: 8%; right: 18%; opacity: .6; }

/* ---- newsletter card decor ---- */
.newsletter-card { position: relative; }
.newsletter-card .plane-2 {
  position: absolute;
  z-index: 1;
  width: 34px;
  top: 16px;
  right: 22px;
  transform: rotate(18deg);
  opacity: .85;
}

/* ---- footer decor ---- */
.footer-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.footer-decor .heart-2    { width: 22px; top: 14%; left: 4%; opacity: .5; }
.footer-decor .open-book  { width: 46px; bottom: 14%; right: 6%; opacity: .35; }
.footer-decor .star-2     { width: 26px; bottom: 22%; right: 14%; opacity: .5; }

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 24px;
}

.brand-logo {
  width: 148px;
  margin-bottom: 18px;
  filter: drop-shadow(0 8px 16px rgba(78, 31, 130, 0.18));
}

.hero-text h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.02;
  color: var(--purple-700);
}

.hero-text .tagline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 3.4vw, 36px);
  margin-top: 2px;
}

.rule {
  display: block;
  width: 140px;
  height: 3px;
  margin: 18px 0 20px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--orange-500), transparent);
}

.hero-text .lead {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 420px;
  margin-bottom: 22px;
}

.stay-curious {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 24px;
  color: var(--purple-700);
}

/* ---- hero art ---- */
.hero-art {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-illustration {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ===================== COUNTDOWN ===================== */
.countdown-strip {
  position: relative;
  background: var(--purple-200);
  padding: 20px 6vw 30px;
  text-align: center;
}

.countdown-strip .wave-up {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  transform: translateY(-99%);
}

.countdown-label {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--purple-700);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.countdown {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.countdown .unit {
  background: var(--white);
  border-radius: 16px;
  min-width: 76px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 8px 18px rgba(78, 31, 130, 0.12);
}

.countdown .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: var(--orange-500);
  line-height: 1;
}

.countdown .label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ===================== FEATURES ===================== */
.features {
  position: relative;
  background: var(--purple-200);
  padding: 8px 6vw 60px;
  text-align: center;
}

.features h2 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--purple-700);
  font-size: clamp(20px, 2.6vw, 28px);
  margin: 10px 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.features h2 .spark {
  color: var(--orange-500);
  font-weight: 700;
}

.feature-grid {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.feature {
  position: relative;
  padding: 0 10px;
}

.feature::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 14px;
  bottom: 30px;
  width: 1px;
  background: rgba(78, 31, 130, 0.18);
}

.feature:last-child::after { display: none; }

.feature-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 14px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(78, 31, 130, 0.12);
}

.feature-icon svg { width: 34px; height: 34px; }

.feature h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--purple-700);
  font-size: 16px;
  margin-bottom: 8px;
}

.feature p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ===================== NEWSLETTER ===================== */
.newsletter-card {
  max-width: 940px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 22px;
  padding: 30px 36px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 20px 40px rgba(78, 31, 130, 0.14);
}

.envelope { width: 56px; flex-shrink: 0; }

.newsletter-copy { flex: 1 1 260px; text-align: left; }

.newsletter-copy h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--purple-700);
  font-size: 21px;
  margin-bottom: 4px;
}

.newsletter-copy p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.newsletter-form {
  display: flex;
  flex: 1 1 340px;
  gap: 10px;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(78, 31, 130, 0.25);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s;
}

.newsletter-form input:focus { border-color: var(--purple-700); }

.newsletter-form button {
  background: var(--purple-700);
  color: var(--white);
  border: none;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .15s;
}

.newsletter-form button:hover { background: var(--purple-800); transform: translateY(-1px); }
.newsletter-form button:disabled { opacity: 0.6; cursor: default; transform: none; }

.form-message {
  max-width: 940px;
  margin: 14px auto 0;
  min-height: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--purple-700);
}

.form-message.error { color: #C4344B; }

/* ===================== FOOTER ===================== */
.site-footer {
  position: relative;
  background: var(--purple-800);
  padding: 46px 6vw 26px;
  margin-top: 30px;
  color: var(--white);
}

.site-footer .wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  transform: translateY(-99%);
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer-brand img { width: 92px; }
.footer-sub { font-size: 12px; letter-spacing: 0.06em; color: rgba(255,255,255,0.65); }

.footer-social { text-align: center; }
.footer-social p { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 10px; }

.social-icons { display: flex; gap: 12px; }
.social-icons a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background .2s, border-color .2s;
}
.social-icons a:hover { background: var(--orange-500); border-color: var(--orange-500); }
.social-icons svg { width: 17px; height: 17px; }

.footer-tagline { text-align: right; }
.footer-tagline p {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
}

.copyright {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255,255,255,0.55);
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-text { text-align: center; order: 1; }
  .hero-text .lead { margin-left: auto; margin-right: auto; }
  .brand-logo { margin-left: auto; margin-right: auto; }
  .stay-curious { display: flex; justify-content: center; }
  .rule { margin-left: auto; margin-right: auto; }
  .hero-art { order: 2; margin-top: 20px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); row-gap: 34px; }
  .feature:nth-child(3)::after { display: none; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-tagline { text-align: center; }
}

@media (max-width: 600px) {
  .decor.cloud, .decor.dashes, .decor.trail, .decor.plane, .decor.star { display: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(odd)::after { display: none; }
  .feature:nth-child(5) { grid-column: 1 / -1; justify-self: center; max-width: 200px; }
  .newsletter-card { padding: 26px 22px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .book-cat { animation: none; }
}
