:root {
  --ink: #2a2158;
  --ink-soft: #4a4280;
  --paper: #fff4c8;
  --paper-2: #ffd54f;
  --cream: #fffef4;
  --river: #00c2d7;
  --river-deep: #008fa3;
  --sky: #4ecbff;
  --salmon: #ff4d6d;
  --gold: #ffb703;
  --leaf: #22c55e;
  --wood: #ff8a00;
  --footer: #7b2cbf;
  --line: rgba(42, 33, 88, 0.12);
  --shadow: 0 18px 36px rgba(255, 77, 109, 0.16);
  --radius: 22px;
  --max: 1120px;
  --sans: "Nunito", system-ui, sans-serif;
  --display: "Fredoka", "Nunito", sans-serif;
  --note: "Caveat", cursive;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 0%, #ffe566 0%, transparent 32%),
    radial-gradient(circle at 100% 8%, #7ae0ff 0%, transparent 36%),
    radial-gradient(circle at 10% 92%, #ff9ad4 0%, transparent 30%),
    radial-gradient(circle at 90% 88%, #7dffb2 0%, transparent 28%),
    var(--paper);
  line-height: 1.65;
}

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

a { color: var(--river-deep); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  z-index: 20;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 6px solid transparent;
  border-image: linear-gradient(90deg, #ff4d6d, #ffb703, #22c55e, #00c2d7, #7b2cbf) 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold), var(--salmon));
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  box-shadow: 0 6px 0 rgba(42, 36, 28, 0.08);
}

.logo strong {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.logo small {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--river); }

.nav-toggle {
  display: none;
  border: 0;
  background: var(--cream);
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-weight: 800;
}

/* Hero */
.hero {
  padding: 3.2rem 0 4.6rem;
  position: relative;
  background: linear-gradient(180deg, transparent 55%, #9ee9ff 100%);
}

.page-home .hero {
  min-height: calc(100vh - 210px);
  padding-bottom: 5.2rem;
  background: linear-gradient(180deg, transparent 36%, #9ee9ff 62%, #ddc6ff 88%, #7b2cbf 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.4rem;
  align-items: center;
}

.eyebrow {
  font-weight: 800;
  color: var(--river);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 0.7rem;
}

h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 0.7rem; }

h1 { font-size: clamp(2.3rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
}

.btn-primary {
  background: var(--salmon);
  color: white;
  box-shadow: 0 6px 0 #c9184a;
}
.btn-primary:hover { transform: translateY(-1px); }

.btn-secondary {
  background: var(--gold);
  color: var(--ink);
  border: 0;
  box-shadow: 0 6px 0 #e09a00;
}

.hero-art {
  background: linear-gradient(180deg, #fff, #fff6c2);
  border-radius: 32px;
  padding: 0.7rem;
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
  border: 5px solid #ff4d6d;
}

.hero-art img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: top;
  border-radius: 24px;
  background: #f7f1e6;
}

.sketch-caption {
  font-family: var(--note);
  font-size: 1.2rem;
  margin: 0.55rem 0.3rem 0.2rem;
  color: var(--ink-soft);
}

/* Sections */
section { padding: 3.2rem 0; }
.band-sky,
.band-gold,
.band-mint { position: relative; }

.band-sky {
  padding: 4.4rem 0 5rem;
  margin-top: -1.6rem;
  background: linear-gradient(
    180deg,
    #9ee9ff 0%,
    #7ae0ff 18%,
    #c9f6ff 52%,
    #ffe566 100%
  );
}

.band-gold {
  padding: 4.4rem 0 5rem;
  margin-top: -0.4rem;
  background: linear-gradient(
    180deg,
    #ffe566 0%,
    #ffd54f 22%,
    #fff0a8 55%,
    #9dffc4 100%
  );
}

.band-mint {
  padding: 4.4rem 0 5.4rem;
  margin-top: -0.4rem;
  background: linear-gradient(
    180deg,
    #9dffc4 0%,
    #b7ffd4 20%,
    #e4fff0 58%,
    #c9a4ff 86%,
    #7b2cbf 100%
  );
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.muted { color: var(--ink-soft); }

.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
}

.book-card {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.book-card.upstream { background: linear-gradient(180deg, #7ae0ff, #e8fbff); }
.book-card.chew { background: linear-gradient(180deg, #ffb703, #fff3b0); }

.book-visual {
  height: 230px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.book-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.book-visual.upstream-art {
  background:
    radial-gradient(circle at 20% 20%, #fff, transparent 25%),
    linear-gradient(160deg, #4ecbff, #00c2d7 40%, #ff4d6d);
}

.fish {
  width: 78%;
  height: 92px;
  background: #ff4d6d;
  border-radius: 60px 80px 80px 60px;
  position: relative;
  box-shadow: inset -12px -10px 0 rgba(0,0,0,0.08);
}
.fish::before {
  content: "";
  position: absolute;
  right: -28px;
  top: 18px;
  border: 28px solid transparent;
  border-left-color: #ff2d55;
}
.fish::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 32px;
  width: 12px;
  height: 12px;
  background: #2a2d4a;
  border-radius: 50%;
}

.book-body { padding: 1.3rem 1.4rem 1.5rem; }
.book-body p { margin-top: 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0 1rem; }
.pill {
  background: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 800;
  border: 2px solid #ff4d6d;
  color: #c9184a;
}
.book-card.upstream .pill { border-color: #008fa3; color: #00788a; }

/* Awards */
.awards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.award {
  background: linear-gradient(135deg, #ffe566, #fff);
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  border: 3px solid var(--gold);
  display: flex;
  gap: 0.9rem;
  align-items: center;
}
.award-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--gold);
  display: grid;
  place-items: center;
  font-weight: 900;
  flex-shrink: 0;
}

/* About */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.fact-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}
.fact-list li {
  background: #d7f8ff;
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.fact-list li:nth-child(2n) { background: #ffe3ef; }
.fact-list li:nth-child(3n) { background: #e4ffe8; }
.fact-list li:nth-child(4n) { background: #fff0b8; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.gallery a,
.gallery figure {
  margin: 0;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  object-position: top;
  background: #faf6ee;
}
.gallery figcaption {
  font-family: var(--note);
  padding: 0.55rem 0.8rem 0.75rem;
  font-size: 1.15rem;
}

/* Forms */
.form {
  display: grid;
  gap: 0.8rem;
}
label { font-weight: 800; font-size: 0.92rem; }
input, textarea, select {
  width: 100%;
  font: inherit;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: white;
}
input:focus, textarea:focus {
  outline: 3px solid rgba(31, 122, 134, 0.25);
  border-color: var(--river);
}
.form-note { font-size: 0.9rem; }

.form-success {
  display: none;
  background: #e8f6ea;
  border: 2px solid var(--leaf);
  border-radius: 16px;
  padding: 1rem;
  font-weight: 700;
}
.form-success.show { display: block; }

/* Footer */
.site-footer {
  margin-top: 0;
  background: linear-gradient(120deg, #7b2cbf 0%, #ff4d6d 52%, #ffb703 100%);
  color: #fffef4;
  padding: 2.2rem 0 1.4rem;
}
.site-footer a { color: #fff8b0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}
.tiny { font-size: 0.85rem; opacity: 0.8; }

.wave {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: -1px;
}

main > section:last-of-type:not(.band-sky):not(.band-gold):not(.band-mint):not(.hero) {
  padding-bottom: 4.8rem;
  background: linear-gradient(180deg, transparent 28%, #ddc6ff 78%, #7b2cbf 100%);
}

.page-hero {
  padding: 2.4rem 0 2.8rem;
  background: linear-gradient(180deg, transparent 40%, rgba(158, 233, 255, 0.55) 100%);
}

.prose { max-width: 44rem; }
.prose p { font-size: 1.05rem; }

.sketch-frame {
  background: white;
  padding: 0.7rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.sketch-frame img {
  width: 100%;
  border-radius: 16px;
  background: #faf6ee;
}

@media (max-width: 820px) {
  .hero-grid,
  .book-grid,
  .split,
  .awards,
  .footer-grid,
  .gallery { grid-template-columns: 1fr; }
  .gallery img { height: 280px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    right: 1rem;
    top: 68px;
    background: white;
    flex-direction: column;
    padding: 1rem 1.2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    min-width: 180px;
  }
  .nav-links.open { display: flex; }
  .hero-art { transform: none; }
  .hero-art img { height: 260px; }
  .fact-list { grid-template-columns: 1fr; }
}
