/* The Golden Brothers — Van Arsdale Publishing
   Palette: sky #2E9BF0, fairway #5DB82E, deep green #2F7A1F,
   gold #E8A33D, sunshine #FFD93B, flag red #E63B2E (CTAs only),
   cream #FFF8E7, ink #1F2A1A.
   Link text uses a darkened sky so it meets WCAG AA on cream.
   Header is cream with a sky band: white-on-#2E9BF0 failed contrast. */

@font-face {
  font-family: Fredoka;
  src: url("../fonts/Fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Nunito;
  src: url("../fonts/Nunito.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Nunito;
  src: url("../fonts/Nunito-Italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --sky: #2E9BF0;
  --sky-ink: #0C5794;
  --fairway: #5DB82E;
  --fairway-deep: #3F9A1C;
  --green: #2F7A1F;
  --gold: #E8A33D;
  --gold-deep: #C4841F;
  --sun: #FFD93B;
  --flag: #E63B2E;
  --cream: #FFF8E7;
  --cream-deep: #F3E6C4;
  --paper: #FFFcf6;
  --ink: #1F2A1A;
  --ink-soft: #3A4A32;
  --line: 3px;
  --radius: 1.15rem;
  --font-display: "Fredoka", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --max: 70rem;
  --header-h: 4.35rem;
  --shadow: 0 10px 24px rgba(31, 42, 26, 0.08);
  --focus: 0 0 0 3px var(--cream), 0 0 0 6px var(--sky-ink);
}

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

html {
  scroll-behavior: smooth;
}

html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 450;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--sky-ink);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--sky-ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--ink);
  color: var(--cream);
  padding: 0.5rem 0.9rem;
  border-radius: 0.4rem;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
  color: var(--cream);
}

/* Header
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: var(--line) solid var(--ink);
  box-shadow: 0 8px 0 0 var(--sky);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.65rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.logo img.logo-mark,
.logo-mark {
  width: min(17.5rem, 64vw);
  height: auto;
  flex: 0 0 auto;
  display: block;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.15rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--green);
}

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

.nav-menu {
  position: relative;
}

.nav-menu > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
}

.nav-menu > summary::-webkit-details-marker { display: none; }

.nav-menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  min-width: 14rem;
  padding: 0.55rem;
  box-shadow: var(--shadow);
}

.nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-menu a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  border-radius: 0.6rem;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  background: var(--cream-deep);
  color: var(--green);
}

.nav-menu a[aria-current="page"] {
  box-shadow: inset 4px 0 0 var(--gold);
}

@media (min-width: 800px) {
  .logo-text { font-size: 1.35rem; }

  .nav-menu > summary { display: none; }

  .nav-menu nav {
    position: static;
    border: 0;
    background: transparent;
    box-shadow: none;
    min-width: 0;
    padding: 0;
    display: block;
  }

  .nav-menu ul {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
  }

  .nav-menu a {
    padding: 0.4rem 0.75rem;
  }

  .nav-menu a[aria-current="page"] {
    box-shadow: inset 0 -4px 0 var(--gold);
    background: transparent;
  }
}

/* Layout
   ------------------------------------------------------------ */
main { flex: 1 0 auto; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.15rem 3rem;
}

.page-hero,
.section { margin-bottom: 2.75rem; }

.section-head {
  max-width: 40rem;
  margin-bottom: 1.25rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--green);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  font-weight: 650;
}

h1 { font-size: clamp(2.1rem, 6vw, 3.35rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.15rem); }
h3 { font-size: 1.25rem; }

.lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  max-width: 38rem;
}

.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.45rem;
}

/* Buttons
   ------------------------------------------------------------ */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.15rem 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.125rem;
  line-height: 1;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  border: 3px solid var(--ink);
  cursor: pointer;
}

.btn-cta {
  background: var(--flag);
  color: #fff;
}

.btn-cta:hover {
  color: #fff;
  filter: brightness(0.94);
}

.btn-cta[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.85;
  filter: none;
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
}

.btn-secondary:hover { background: var(--cream-deep); color: var(--ink); }

.btn-green {
  background: var(--green);
  color: #fff;
}

.btn-green:hover { color: #fff; filter: brightness(1.08); }

/* Cards
   ------------------------------------------------------------ */
.card {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.3rem 1.4rem;
}

.grid-2 {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

/* Home hero
   ------------------------------------------------------------ */
.hero {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

.hero-copy { padding: 0.2rem 0 0.4rem; }

.hero-art {
  margin: 0;
  border: var(--line) solid var(--ink);
  border-radius: 1.35rem;
  overflow: hidden;
  background: var(--sky);
  box-shadow: var(--shadow);
}

.hero-art img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 28%;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1.05fr;
    gap: 2rem;
    padding-top: 0.5rem;
  }

  .hero-art img { aspect-ratio: 1 / 1; object-position: center 30%; }
}

/* Brothers
   ------------------------------------------------------------ */
.brother {
  text-align: center;
  padding: 1.5rem 1.2rem 1.6rem;
}

.brother-fig {
  width: min(13.5rem, 70%);
  margin: 0 auto 0.85rem;
}

.brother h3 {
  margin-bottom: 0.15rem;
}

.age {
  margin: 0 0 0.6rem;
  font-weight: 800;
  color: var(--gold-deep);
}

.brother p { margin: 0; color: var(--ink-soft); }

/* Books
   ------------------------------------------------------------ */
.book-card {
  display: grid;
  gap: 1.1rem;
  max-width: 46rem;
}

@media (min-width: 720px) {
  .book-card {
    grid-template-columns: 16rem 1fr;
    align-items: start;
    max-width: none;
    padding: 1.15rem;
  }
}

.cover {
  margin: 0;
  border: var(--line) solid var(--ink);
  border-radius: 0.9rem;
  overflow: hidden;
  background: var(--sky);
  position: relative;
  aspect-ratio: 3 / 4;
}

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

.cover-label {
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.6rem;
  background: rgba(255, 248, 231, 0.95);
  border: 2px solid var(--ink);
  border-radius: 0.65rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
}

.muted { color: var(--ink-soft); margin: 0 0 0.8rem; }

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

/* Placeholder flag
   ------------------------------------------------------------ */
.flag-placeholder {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  margin: 0 0 0.65rem;
}

.placeholder-box {
  position: relative;
}

/* Newsletter
   ------------------------------------------------------------ */
.newsletter {
  background:
    linear-gradient(var(--cream), var(--cream)),
    var(--cream);
  border: var(--line) solid var(--ink);
  border-radius: 1.4rem;
  padding: 1.5rem 1.2rem 1.6rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.newsletter::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 12px;
  background: repeating-linear-gradient(
    90deg,
    var(--fairway) 0 28px,
    var(--fairway-deep) 28px 56px
  );
}

.newsletter > * { position: relative; }
.newsletter h2 { margin-top: 0.7rem; }

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 0.6rem;
  max-width: 36rem;
}

.signup label { flex: 1 1 14rem; }

.signup input[type="email"] {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 0.8rem;
  padding: 0.7rem 0.85rem;
}

.signup input[type="email"]:disabled {
  background: #f6f0de;
}

.form-status {
  margin: 0.35rem 0 0;
  font-weight: 700;
  color: var(--green);
  min-height: 1.4em;
}

/* Contact
   ------------------------------------------------------------ */
.email-link {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 650;
  color: var(--sky-ink);
  word-break: break-word;
}

.contact-block p { margin: 0 0 0.55rem; }

.social-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

/* About
   ------------------------------------------------------------ */
.prose { max-width: 42rem; }
.prose p { margin: 0 0 1rem; }
.prose .card { margin: 1.2rem 0; }

/* Privacy
   ------------------------------------------------------------ */
.policy h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.policy p, .policy li { color: var(--ink); }
.policy ul { padding-left: 1.2rem; }
.policy li { margin: 0 0 0.4rem; }

/* Footer — mown fairway stripes, then deep green
   ------------------------------------------------------------ */
.site-footer { margin-top: auto; }

.fairway-stripe {
  height: 42px;
  border-top: var(--line) solid var(--ink);
  background: repeating-linear-gradient(
    90deg,
    var(--fairway) 0 36px,
    #6BC83A 36px 72px
  );
  box-shadow: inset 0 8px 10px rgba(31, 42, 26, 0.08);
}

.footer-inner {
  background: var(--green);
  color: var(--cream);
  padding: 1.6rem 1.15rem 2rem;
}

.footer-inner a { color: var(--cream); }

.footer-inner a:hover { color: var(--sun); }

.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.footer-inner .wordmark {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.25rem;
  color: var(--cream);
  margin: 0 0 0.4rem;
}

.footer-inner p { margin: 0 0 0.45rem; }

.footer-legal {
  font-size: 0.95rem;
  opacity: 0.95;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.footer-nav a { text-decoration: none; font-weight: 700; }
.footer-nav a:hover { text-decoration: underline; }

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

.imprint-kicker {
  font-weight: 700;
}

/* Imprint: a calmer variant. Less sky, more cream and deep green.
   No flag-red buttons on this site. */
body.imprint {
  background:
    linear-gradient(180deg, #FFFDF6 0 18rem, var(--cream) 18rem);
}

body.imprint .site-header {
  box-shadow: 0 4px 0 0 var(--gold);
}

body.imprint .logo-text { font-size: 1.2rem; }

@media (min-width: 800px) {
  body.imprint .logo-text { font-size: 1.4rem; }
}

body.imprint .banner-art {
  margin: 0 0 2rem;
  border: var(--line) solid var(--ink);
  border-radius: 1.35rem;
  overflow: hidden;
  background: var(--sky);
  box-shadow: var(--shadow);
}

body.imprint .banner-art img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center 30%;
}

@media (max-width: 699px) {
  body.imprint .banner-art img { aspect-ratio: 16 / 10; }
}

body.imprint .intro {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

body.imprint .series-card {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 720px) {
  body.imprint .series-card {
    grid-template-columns: 16rem 1fr;
    align-items: center;
    padding: 1.15rem;
  }
}

body.imprint .series-thumb {
  margin: 0;
  border: var(--line) solid var(--ink);
  border-radius: 0.9rem;
  overflow: hidden;
  background: var(--sky);
}

body.imprint .series-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 30%;
}

body.imprint #privacy {
  margin-top: 3rem;
  padding-top: 0.5rem;
  border-top: 2px dashed var(--cream-deep);
}

body.imprint .header-inner nav .footer-nav {
  justify-content: flex-end;
}
body.imprint .header-inner nav a {
  color: var(--sky-ink);
  font-size: 0.95rem;
}
body.imprint .header-inner nav a:hover { color: var(--ink); }
@media (max-width: 699px) {
  body.imprint .header-inner {
    flex-wrap: wrap;
  }
  body.imprint .header-inner nav {
    width: 100%;
  }
  body.imprint .header-inner nav .footer-nav {
    justify-content: flex-start;
  }
}

body.imprint .logo {
  max-width: min(28rem, 100%);
  gap: 0.85rem;
}
body.imprint .logo-mark {
  width: min(12.5rem, 42vw);
}
body.imprint .series-thumb {
  background: #183B1E;
}
body.imprint .series-thumb img {
  aspect-ratio: 2355 / 2397;
  object-fit: contain;
}
/* The generic fairway banner was removed; no need for a huge top image. */

body.imprint .logo > img:not(.logo-mark) {
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
}
body.imprint .logo { max-width: none; }

/* Keep the cover from stretching wide and overlapping the text
   when the book card is a 2-column grid. */
.book-card {
  align-items: start;
}
.book-card > .cover {
  width: 100%;
  max-width: 16rem;
  justify-self: start;
}
.book-card > div {
  min-width: 0;
}

/* Series grid, cover row, and tags
   ------------------------------------------------------------ */
.series-grid,
.cover-row {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 640px) {
  .series-grid,
  .cover-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .cover-row { grid-template-columns: repeat(4, 1fr); }
}

.series-book {
  display: flex;
  flex-direction: column;
  max-width: none;
  padding: 0.85rem 0.85rem 1.15rem;
  scroll-margin-top: 5.5rem;
}

.series-book > .cover {
  width: 100%;
  max-width: none;
  aspect-ratio: 1 / 1;
  background: #183B1E;
}

.series-book h2 {
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0 0 0.4rem;
}

.series-book p { margin: 0 0 0.7rem; }

.series-book .btn-row { margin-top: auto; }

.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.8rem 0 0.5rem;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  background: var(--cream);
  margin: 0;
}

.tag-type { background: #E7F6D8; }
.tag-age { background: #DCECFF; }
.tag-soon { background: var(--cream); }
.tag-now { background: var(--sun); }

.cover-link .tag {
  margin: 0.45rem auto 0;
  width: fit-content;
}

.isbn {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

.cover-link {
  display: block;
  text-decoration: none;
  color: inherit;
  text-align: center;
  border-radius: 0.9rem;
}

.cover-link .cover {
  width: 100%;
  max-width: none;
  aspect-ratio: 1 / 1;
  background: #183B1E;
}

.cover-link:hover .cover,
.cover-link:focus-visible .cover {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.cover-link h3 {
  font-size: 1rem;
  line-height: 1.25;
  margin: 0.65rem 0 0;
}

.cover-row-actions { margin-top: 1.25rem; }

.alphabet-detail { margin-top: 2.25rem; }

.detail-card {
  display: grid;
  gap: 1.15rem;
  max-width: none;
  align-items: start;
}

@media (min-width: 720px) {
  .detail-card {
    grid-template-columns: 16.5rem 1fr;
    padding: 1.15rem;
  }
}

.detail-card > .cover {
  width: 100%;
  max-width: 16.5rem;
  aspect-ratio: 1 / 1;
  background: #183B1E;
}

.imprint-cover-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}

@media (min-width: 720px) {
  .imprint-cover-row { grid-column: 1 / -1; }
}

.imprint-cover-row .cover {
  margin: 0;
  width: 100%;
  max-width: none;
  aspect-ratio: 1 / 1;
  border-radius: 0.65rem;
  background: #183B1E;
}

.imprint-cover-row a {
  display: block;
  border-radius: 0.65rem;
}

.imprint-cover-row a:hover .cover,
.imprint-cover-row a:focus-visible .cover {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.isbn-num { white-space: nowrap; }

.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.15);
}
