:root {
  --mist: #eef6f3;
  --paper: #ffffff;
  --ink: #3b2a1e;
  --ink-soft: #6b5646;
  --banana: #ffd23f;
  --banana-deep: #e0ae00;
  --teal: #1b6f6c;
  --line: #d5e4df;
  --shadow: #3b2a1e;
  --radius: 18px;
  --gutter: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --mist: #13201e;
    --paper: #1b2b29;
    --ink: #f4eadf;
    --ink-soft: #c8b7a6;
    --banana: #ffd23f;
    --banana-deep: #ffdf6e;
    --teal: #74d3cb;
    --line: #2c3f3c;
    --shadow: #0a1110;
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Nunito", system-ui, sans-serif;
  overflow-x: hidden;
}

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

a { color: var(--teal); }

h1, h2, h3 {
  font-family: "Baloo 2", "Nunito", system-ui, sans-serif;
  line-height: 1.1;
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--mist) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 64px;
}

.nav {
  display: flex;
  gap: 22px;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
}

.nav a:hover { color: var(--teal); }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn-primary {
  background: var(--banana);
  color: #3b2a1e;
  box-shadow: 4px 4px 0 var(--shadow);
}

.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--shadow);
}

.btn-ghost {
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover { border-color: var(--ink); }

.btn-small {
  padding: 7px 14px;
  font-size: .9rem;
  box-shadow: 3px 3px 0 var(--shadow);
}

/* Hero */

.hero {
  padding: 64px 0 72px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
}

.hero .wrap > div {
  max-width: 760px;
}

.hero-chip {
  width: clamp(220px, 26vw, 320px);
  height: auto;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--teal);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
}

.hero h1 span {
  background: linear-gradient(transparent 62%, var(--banana) 62%);
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  .hero h1 span { background: none; color: var(--banana); }
}

.hero p.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 40ch;
  margin: 18px 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Sections */

section { padding: 72px 0; }

.section-head {
  max-width: 620px;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
}

.section-head p {
  color: var(--ink-soft);
  margin: 10px 0 0;
}

/* Book grid */

.book-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 40px 28px;
}

.book {
  display: flex;
  flex-direction: column;
}

.cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 4px 12px 12px 4px;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--shadow);
  border: 2px solid var(--ink);
  margin-bottom: 18px;
}

.cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 12px;
  background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,.06) 70%, rgba(255,255,255,.18));
  z-index: 2;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.book p {
  margin: 6px 0 12px;
  color: var(--ink-soft);
  font-size: .98rem;
}

.book .meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.num {
  font-weight: 800;
  color: var(--teal);
  font-size: .85rem;
  margin-bottom: 2px;
}

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  border: 2px solid var(--ink);
  white-space: nowrap;
}

.pill-live { background: var(--banana); color: #3b2a1e; }
.pill-soon { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.pill-plan { background: transparent; color: var(--ink-soft); border-style: dashed; border-color: var(--ink-soft); }

/* About */

.about .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about p { color: var(--ink-soft); margin: 14px 0 0; }

.author-card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.author-card h3 { font-size: 1.6rem; font-weight: 800; }

.author-card { position: relative; }

.hidden-banana {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: .55;
  transform: rotate(-20deg);
  transition: opacity .2s ease, transform .2s ease;
}

.hidden-banana:hover,
.hidden-banana:focus-visible { opacity: 1; transform: rotate(-20deg) scale(1.2); }

.hidden-banana.found {
  opacity: 1;
  animation: banana-wiggle .6s ease;
}

@keyframes banana-wiggle {
  0%, 100% { transform: rotate(-20deg) scale(1.4); }
  25% { transform: rotate(10deg) scale(1.6); }
  75% { transform: rotate(-40deg) scale(1.6); }
}

.banana-confetti {
  position: fixed;
  z-index: 100;
  width: 26px;
  height: 26px;
  pointer-events: none;
}

/* About page */

.nav a[aria-current="page"] { color: var(--ink); }

.text-link {
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.how {
  background: var(--banana);
  color: #3b2a1e;
}

.how .section-head p { color: #5b4636; }

.steps,
.crew-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}

.steps {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  background: #fffaf0;
  border: 2px solid #3b2a1e;
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 5px 5px 0 #3b2a1e;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #3b2a1e;
  color: #ffd23f;
  font: 800 1.1rem/1 "Baloo 2", sans-serif;
}

.steps strong,
.crew-list strong {
  display: block;
  font: 800 1.25rem/1.2 "Baloo 2", sans-serif;
  margin-bottom: 6px;
}

.crew-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.crew-list li {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: var(--ink-soft);
}

.crew-list strong { color: var(--ink); }

.crew-note {
  margin: 24px 0 0;
  color: var(--ink-soft);
}

.heart {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.heart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.heart-grid p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  font-size: .95rem;
  color: var(--ink-soft);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.site-footer p { margin: 0; }

/* Phone */

@media (max-width: 820px) {
  :root { --gutter: 16px; }
  .nav { gap: 18px; }
  .hero { padding: 36px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 20px; }
  .hero-chip { width: 170px; order: -1; justify-self: center; }
  .about .wrap,
  .heart-grid { grid-template-columns: 1fr; gap: 24px; }
  section { padding: 56px 0; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 18px; }
  .cover { box-shadow: 5px 5px 0 var(--shadow); }
  .book h3 { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .hidden-banana { transition: none; }
  .hidden-banana.found { animation: none; }
}
