/* ============================================================
   KK Ravin — Author of The Mind You Build Is The Future You Live
   Dark, disciplined. Ink + steel blue.
   ============================================================ */

:root {
  --bg: #0e1116;
  --bg-2: #131820;
  --bg-3: #1a212c;
  --ink: #e8ebef;
  --muted: #aeb7c2;
  --faint: #7d8794;
  --blue: #7fb2e5;
  --blue-bright: #a5cbf0;
  --blue-soft: rgba(127, 178, 229, 0.35);
  --line: rgba(127, 178, 229, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --disp: 'Space Grotesk', 'Segoe UI', sans-serif;
  --body: 'Inter', 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-weight: 300;
  font-size: 16.5px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--blue); color: #0b0e12; }
img { max-width: 100%; display: block; -webkit-user-drag: none; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 6vw; }

/* ---------------- header ---------------- */

.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem 4vw;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}
.site-head.scrolled {
  background: rgba(14, 17, 22, 0.93);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 0.75rem 4vw; box-shadow: 0 1px 0 var(--line);
}
.wordmark {
  font-family: var(--disp); font-weight: 700; font-size: 1.15rem;
  letter-spacing: 0.34em; text-transform: uppercase;
}
.wordmark span { color: var(--blue); }

.site-nav ul { list-style: none; display: flex; gap: 1.9rem; align-items: center; }
.site-nav a {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: #dfe5ea; transition: color 0.3s ease; padding: 0.4rem 0; position: relative;
}
.site-nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--blue); transition: right 0.35s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--blue-bright); }
.site-nav a:hover::after, .site-nav a.active::after { right: 0; }

.burger { display: none; background: none; border: none; cursor: pointer; width: 40px; height: 40px; z-index: 120; }
.burger span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 6px auto; transition: 0.35s ease; }
body.nav-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1060px) {
  .burger { display: block; }
  .site-nav {
    position: fixed; inset: 0; background: rgba(11, 14, 18, 0.98);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
  }
  body.nav-open .site-nav { opacity: 1; pointer-events: auto; }
  .site-nav ul { flex-direction: column; gap: 1.9rem; text-align: center; }
  .site-nav a { font-size: 0.95rem; }
}

/* ---------------- hero ---------------- */

.hero {
  position: relative; min-height: 92vh;
  display: flex; align-items: center; overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 75% 20%, rgba(127,178,229,0.12), transparent 60%),
    linear-gradient(180deg, #10141b 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-bgimg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 30%;
  opacity: 0.16; filter: brightness(0.85) saturate(0.9);
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 6fr 5fr; gap: 4rem; align-items: center;
  padding: 9rem 0 5rem; width: 100%;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; padding-top: 8rem; text-align: center; } }

.kicker {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.38em; text-transform: uppercase;
  color: var(--blue-bright);
}
.hero h1 {
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.14;
  letter-spacing: -0.01em; margin: 1.2rem 0 1.4rem;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero p.lead { color: var(--muted); max-width: 34rem; font-size: 1.06rem; }
@media (max-width: 900px) { .hero p.lead { margin: 0 auto; } }
.hero-cta { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 2.4rem; }
@media (max-width: 900px) { .hero-cta { justify-content: center; } }

.hero-book { position: relative; text-align: center; }
.hero-book img {
  max-height: 460px; margin: 0 auto;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.6));
  animation: floatBook 7s ease-in-out infinite;
}
@keyframes floatBook { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) { .hero-book img { animation: none; } }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-block; padding: 0.9em 2.2em;
  border: 1px solid var(--blue-soft); border-radius: 3px;
  font-family: var(--disp); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink); background: transparent; cursor: pointer;
  transition: all 0.3s ease;
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: #0b0e12; transform: translateY(-2px); }
.btn.solid { background: var(--blue); border-color: var(--blue); color: #0b0e12; }
.btn.solid:hover { background: var(--blue-bright); border-color: var(--blue-bright); }

/* ---------------- sections ---------------- */

.section { padding: 6.5rem 0; }
.section.tint { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 720px; margin-bottom: 3.4rem; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 {
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.2; margin-top: 1rem;
}
.sec-head p.lead { color: var(--muted); margin-top: 1.1rem; }

.page-hero {
  padding: 11rem 0 4.5rem; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 70% 90% at 50% -20%, rgba(127,178,229,0.1), transparent), var(--bg);
}
.page-hero h1 {
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 1rem; line-height: 1.15;
}
.page-hero p.lead { color: var(--muted); max-width: 640px; margin-top: 1.2rem; font-size: 1.05rem; }

/* ---------------- cards & grids ---------------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
@media (max-width: 920px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px;
  padding: 2.4rem 2.2rem; transition: transform 0.35s ease, border-color 0.35s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--blue-soft); }
.card h3 { font-family: var(--disp); font-weight: 600; font-size: 1.25rem; margin-bottom: 0.7rem; }
.card p { color: var(--muted); font-size: 0.96rem; }
.card .go {
  display: inline-block; margin-top: 1.2rem; font-family: var(--disp);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--blue-bright);
}

.img-band {
  height: 46vh; min-height: 300px;
  background-size: cover; background-position: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) { .img-band { background-attachment: fixed; } }

.quote-band { text-align: center; padding: 5rem 6vw; }
.quote-band blockquote {
  font-family: var(--disp); font-weight: 500;
  font-size: clamp(1.3rem, 2.8vw, 1.9rem); line-height: 1.45; max-width: 780px; margin: 0 auto;
}
.quote-band cite {
  display: block; margin-top: 1.6rem; font-style: normal;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint);
}

/* ---------------- book / store ---------------- */

.book-panel { display: grid; grid-template-columns: 2fr 3fr; gap: 4rem; align-items: center; }
@media (max-width: 920px) { .book-panel { grid-template-columns: 1fr; } }
.book-panel .cover img { filter: drop-shadow(0 26px 40px rgba(0,0,0,0.55)); }

.check-list { list-style: none; margin-top: 1.4rem; }
.check-list li { padding: 0.55rem 0 0.55rem 2rem; position: relative; color: #d3dae1; }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 1.05em;
  width: 12px; height: 2px; background: var(--blue);
}

.market-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem; margin-top: 2.2rem;
}
.market {
  display: block; text-align: center; padding: 1.1rem 0.8rem;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 5px;
  transition: all 0.3s ease;
}
.market:hover { border-color: var(--blue); transform: translateY(-3px); background: #1d2634; }
.market .flag { font-size: 1.6rem; display: block; margin-bottom: 0.4rem; }
.market .n {
  font-family: var(--disp); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.market-more { margin-top: 1.6rem; color: var(--faint); font-size: 0.92rem; }
.market-more a { color: var(--muted); border-bottom: 1px solid var(--blue-soft); }
.market-more a:hover { color: var(--blue-bright); }

/* ---------------- kids shelf ---------------- */

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.6rem; }
.kid-card {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; transition: transform 0.35s ease, border-color 0.35s ease;
  display: flex; flex-direction: column;
}
.kid-card:hover { transform: translateY(-5px); border-color: var(--blue-soft); }
.kid-card .art { aspect-ratio: 2/3; overflow: hidden; background: #10151d; }
.kid-card .art img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s ease; }
.kid-card:hover .art img { transform: scale(1.03); }
.kid-card .art.txt {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 1.6rem; background: linear-gradient(150deg, #1c2430, #141a23);
}
.kid-card .art.txt span {
  font-family: var(--disp); font-weight: 600; font-size: 1.05rem; line-height: 1.4; color: #cddcec;
}
.kid-card figcaption { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.kid-card .t { font-family: var(--disp); font-weight: 600; font-size: 1rem; line-height: 1.35; }
.kid-card .s { color: var(--faint); font-size: 0.85rem; margin-top: 0.4rem; flex: 1; }

/* ---------------- challenge ---------------- */

.challenge {
  background: var(--bg-3); border: 1px solid var(--line); border-left: 3px solid var(--blue);
  border-radius: 6px; padding: 2.8rem 2.6rem; margin-top: 2.5rem;
}
.challenge h3 { font-family: var(--disp); font-weight: 700; font-size: 1.5rem; margin-bottom: 1.2rem; }
.challenge p { color: #d3dae1; margin-bottom: 1.1rem; }
.challenge p.q { font-family: var(--disp); font-weight: 600; color: var(--ink); }
.challenge .options { list-style: none; margin: 1.4rem 0; }
.challenge .options li {
  padding: 0.9rem 1.2rem; margin-bottom: 0.7rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px; color: #d3dae1;
}
.challenge .options li strong { color: var(--blue-bright); margin-right: 0.5rem; }

/* ---------------- prose / about ---------------- */

.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.4rem; color: #d3dae1; }
.prose p.intro { font-size: 1.25rem; line-height: 1.65; color: var(--ink); font-weight: 400; }
.prose h3 { font-family: var(--disp); font-weight: 600; font-size: 1.3rem; margin: 2.4rem 0 1rem; }
.prose ul { margin: 0 0 1.4rem 1.2rem; color: #d3dae1; }
.prose ul li { margin-bottom: 0.6rem; }

/* ---------------- forms ---------------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; max-width: 720px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.45rem; }
input, textarea {
  width: 100%; padding: 0.85rem 1rem;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 4px;
  color: var(--ink); font-family: var(--body); font-size: 0.98rem;
  transition: border-color 0.3s ease;
}
input:focus, textarea:focus { outline: none; border-color: var(--blue); }
textarea { min-height: 160px; resize: vertical; }
.form-note { color: var(--faint); font-size: 0.85rem; margin-top: 1rem; }
.form-status { margin-top: 1.2rem; font-size: 0.95rem; }
.form-status.ok { color: #8fd8a0; }
.form-status.err { color: #e59a9a; }

/* ---------------- footer ---------------- */

.site-foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 4rem 6vw 2.6rem; text-align: center; }
.site-foot .wordmark { font-size: 1rem; display: inline-block; margin-bottom: 1.8rem; }
.foot-nav { display: flex; justify-content: center; gap: 1.6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.foot-nav a { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); transition: color 0.3s; }
.foot-nav a:hover { color: var(--blue-bright); }
.foot-line { font-size: 0.78rem; color: var(--faint); }
.foot-line a { color: var(--muted); }
.foot-line a:hover { color: var(--blue-bright); }

/* ---------------- reveal ---------------- */

.reveal { opacity: 0; transform: translateY(24px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.2,0.6,0.2,1); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } }
