:root {
  --ink: #1c2430;
  --ink-soft: #4a5563;
  --paper: #f7f4ef;
  --paper-bright: #fffdf9;
  --sky: #6aa8c2;
  --sky-deep: #3d7f99;
  --moss: #5d7f62;
  --sun: #d9a441;
  --blush: #c97b84;
  --line: rgba(28, 36, 48, 0.12);
  --max: 1080px;
  --text: 720px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(106, 168, 194, 0.22), transparent 42%),
    radial-gradient(ellipse at 100% 8%, rgba(217, 164, 65, 0.16), transparent 36%),
    linear-gradient(180deg, #eef5f4 0%, var(--paper) 32%, #f3ebe1 100%);
  min-height: 100vh;
}

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

img { max-width: 100%; display: block; }
a { color: var(--sky-deep); }
a:hover { color: var(--ink); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(247, 244, 239, 0.86);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: flex-end;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper-bright);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.hero {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-copy {
  max-width: 18ch;
}

.eyebrow {
  margin: 0 0 0.8rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky-deep);
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 9vw, 6.2rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  animation: rise 0.9s ease both;
}

.lead {
  margin: 1.1rem 0 0;
  max-width: 28ch;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ink-soft);
  animation: rise 1s ease 0.08s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
  animation: rise 1.05s ease 0.16s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-weight: 800;
  font-size: 0.92rem;
  border: 2px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.55; transform: none; cursor: default; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--sky-deep); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(28, 36, 48, 0.18);
}
.btn-ghost:hover { background: rgba(28, 36, 48, 0.05); color: var(--ink); }

.hero-photo {
  position: relative;
  margin: 0 auto;
  width: min(320px, 72vw);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #dfe9e4;
  border: 6px solid rgba(255, 253, 249, 0.95);
  box-shadow:
    0 0 0 1px rgba(28, 36, 48, 0.08),
    0 18px 40px rgba(28, 36, 48, 0.12);
  animation: fade 1.1s ease 0.1s both;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  animation: photo-in 1.15s ease both;
}

@keyframes photo-in {
  from { transform: scale(1.08); opacity: 0.55; }
  to { transform: none; opacity: 1; }
}

.author-photos {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.9rem;
  margin: 0 0 clamp(1.8rem, 4vw, 2.8rem);
}

.author-photo {
  margin: 0;
  overflow: hidden;
  background: #dfe9e4;
  min-height: 280px;
}

.author-photo img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

.author-photo--main img {
  min-height: 360px;
  object-position: center 20%;
}

.author-photo:not(.author-photo--main) img {
  object-position: center 15%;
}

.section {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section-narrow {
  width: min(var(--text), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.section-head {
  max-width: 36ch;
  margin-bottom: 1.8rem;
}

.section-head h2,
.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-head p,
.page-intro {
  margin: 0.8rem 0 0;
  color: var(--ink-soft);
}

.story-list {
  display: grid;
  gap: 1rem;
}

.story-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.story-row:last-child { border-bottom: 1px solid var(--line); }
.story-row:hover { color: var(--sky-deep); }

.story-thumb {
  width: 96px;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.9);
  flex-shrink: 0;
}

.story-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-thumb--note {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(106, 168, 194, 0.28), rgba(93, 127, 98, 0.22));
}

.story-thumb--note span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.story-row h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
}

.story-row p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.story-meta {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--moss);
  white-space: nowrap;
}

.section-head--wide { max-width: 48ch; }

.story-toolbar {
  position: sticky;
  top: 58px;
  z-index: 30;
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.6rem;
  padding: 0.75rem 0 1rem;
  background: linear-gradient(180deg, rgba(238, 245, 244, 0.96) 0%, rgba(247, 244, 239, 0.92) 100%);
  backdrop-filter: blur(12px);
}

.story-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.story-search {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  font: inherit;
  background: var(--paper-bright);
  color: var(--ink);
}

.story-search:focus {
  outline: 2px solid rgba(106, 168, 194, 0.45);
  border-color: var(--sky);
}

.story-count {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.story-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.story-chip {
  border: 1px solid var(--line);
  background: var(--paper-bright);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
}

.story-chip:hover { color: var(--ink); }
.story-chip.is-on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.8rem;
}

.story-grid--featured {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.story-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(28, 36, 48, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.story-card:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(28, 36, 48, 0.1);
}

.story-card-cover {
  height: 132px;
  max-height: 132px;
  aspect-ratio: unset;
  background: #dfe9e4;
  overflow: hidden;
  flex: 0 0 132px;
}

.story-card-cover img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  object-position: center top;
}

.story-card-lane {
  padding: 0.38rem 0.45rem;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.25;
}

.story-card-lane--school { background: var(--sky-deep); }
.story-card-lane--magic { background: var(--blush); }
.story-card-lane--animals { background: var(--moss); }
.story-card-lane--adventure { background: #b07d28; }
.story-card-lane--kannada { background: var(--ink); }
.story-card-lane--short { background: var(--sky); }

.story-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.75rem 0.45rem;
  flex: 1;
}

.story-card h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card-credit {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.35;
}

.story-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: auto;
  padding: 0.4rem 0.75rem 0.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blush);
}

.story-card-foot span:last-child {
  color: var(--ink-soft);
  text-align: right;
}

.story-empty {
  margin: 0;
  padding: 2rem 0 1rem;
  color: var(--ink-soft);
}

.library-group {
  margin-bottom: 2.2rem;
}

.library-group h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.library-group p {
  margin: 0.4rem 0 1rem;
  color: var(--ink-soft);
}

.library-group .story-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  max-width: none;
}

.about-panel--follow { margin-top: 2rem; }
.about-panel--follow .cta-row { margin-top: 1rem; }

.series-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.series-bundle {
  padding: 1.3rem 1.35rem 1.4rem;
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid var(--line);
}

.series-bundle h3 {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.15;
}

.series-bundle > p {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
}

.series-bundle-books {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.series-book {
  display: grid;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
}

.series-book img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #dfe9e4;
}

.series-book span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--moss);
}

.series-book strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
}

.browse-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.4rem 1.5rem;
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.75);
  border: 1px solid var(--line);
}

.browse-band h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.browse-band .cta-row { margin-top: 0; }

.quote-band {
  margin: 1rem 0 0;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  background: rgba(255, 253, 249, 0.7);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quote {
  width: min(700px, calc(100% - 2rem));
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-style: italic;
  line-height: 1.35;
}

.quote cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.newsletter-hero {
  text-align: center;
  padding-top: clamp(4rem, 10vw, 7rem);
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

.newsletter-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.newsletter-hero .pitch {
  margin: 1.2rem auto 0;
  max-width: 34ch;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--ink-soft);
}

.newsletter-hero .beats {
  margin: 1.4rem auto 0;
  max-width: 28ch;
  color: var(--ink);
  font-weight: 600;
}

.newsletter-form {
  margin: 2rem auto 0;
  width: min(440px, 100%);
  display: grid;
  gap: 0.75rem;
}

.newsletter-form label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: left;
}

.newsletter-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  font: inherit;
  background: var(--paper-bright);
  color: var(--ink);
}

.newsletter-form input:focus {
  outline: 2px solid rgba(106, 168, 194, 0.45);
  border-color: var(--sky);
}

.form-note {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.form-success {
  display: none;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(93, 127, 98, 0.12);
  color: var(--moss);
  font-weight: 700;
}

.form-success.is-visible { display: block; }

.form-error {
  display: none;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(201, 123, 132, 0.14);
  color: #8a3d48;
  font-weight: 700;
}

.form-error.is-visible { display: block; }

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.about-panel {
  padding: 1.5rem;
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.75);
  border: 1px solid var(--line);
}

.about-panel h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.stat {
  text-align: center;
  padding: 1rem 0.5rem;
  border-top: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.connect-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.connect-list li {
  border-top: 1px solid var(--line);
}

.connect-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
}

.connect-list li:last-child { border-bottom: 1px solid var(--line); }
.connect-list a span { color: var(--sky-deep); font-size: 0.85rem; }

.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

/* In-story secondary links under the shared site header */
.book-tools {
  width: min(760px, calc(100% - 1.5rem));
  margin: 0.85rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  justify-content: center;
}

.book-tools a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-tools a:hover { color: var(--sky-deep); }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 860px) {
  .hero,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
    justify-items: center;
    text-align: center;
  }

  .hero-copy {
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-copy .lead { max-width: 32ch; }

  .hero-photo {
    width: min(240px, 58vw);
    order: -1;
  }

  .author-photos {
    grid-template-columns: 1fr;
  }

  .author-photo,
  .author-photo img,
  .author-photo--main img { min-height: 260px; }

  .menu-toggle { display: inline-flex; }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.4rem 0 0.8rem;
  }

  .nav.is-open { display: flex; }

  .nav-wrap { flex-wrap: wrap; }

  .stat-row { grid-template-columns: 1fr; }

  .story-row {
    grid-template-columns: 72px 1fr;
    align-items: start;
  }

  .story-thumb {
    width: 72px;
    height: 92px;
  }

  .story-meta {
    grid-column: 2;
  }

  .series-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .series-grid,
  .series-bundle-books {
    grid-template-columns: 1fr;
  }

  .story-toolbar { top: 52px; }
}
