/* Gramma Jujoo Books — one stylesheet for every page */
:root {
  --orange: #f26a3d;
  --orange-big: #e8582a;  /* brand orange for large text: passes contrast on cream */
  --orange-text: #c2410c; /* small orange text */
  --yellow: #f6d644;
  --gold: #e0c400;
  --blue: #5865ae;
  --ink: #2b2b2b;
  --muted: #5d5d5d;
  --cream: #fffaf0;
  --tint: #fff6d6;
  --white: #fff;
  --radius: 22px;
  --shadow: 0 10px 28px rgba(0, 0, 0, .12);
  --book: var(--orange);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Dark under the page = footer colour, so a phone's end-of-page bounce shows dark, not a cream strip. No bounce where supported. */
html { scroll-behavior: smooth; background: var(--ink); overscroll-behavior-y: none; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: clip; /* clip, not hidden: hidden turns body into its own scroll box (odd scrolling, breaks the sticky nav) */
  /* footer always at the bottom, even on a short page or a tall screen */
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
h1, h2, h3, .brand, .btn, .badge, .pill, .step-num { font-family: 'Comfortaa', 'Poppins', system-ui, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; } /* .btn sets display, which would beat the hidden attribute */
a { color: var(--blue); }
.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Buttons ── */
.btn {
  display: inline-block; border: 3px solid transparent; border-radius: 999px;
  padding: .65em 1.5em; font: inherit; font-weight: 700; font-size: 1.2rem; /* >=18.7px bold = 'large text' for contrast */
  text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-book { background: var(--book); color: var(--white); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.text-link { color: var(--ink); font-weight: 600; font-size: .95rem; }
.text-link:hover { color: var(--book); }

/* ── Nav ── */
.site-nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 250, 240, .95); backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--yellow);
}
.brand { font-weight: 700; font-size: 1.35rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--orange-text); }
.site-nav nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav nav a { color: var(--ink); font-weight: 600; text-decoration: none; }
.site-nav nav a:hover { color: var(--orange); }
.site-nav .nav-cta { background: var(--yellow); padding: .45em 1.1em; border-radius: 999px; }

/* ── Hero ── */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  max-width: 1180px; margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 5vw, 3rem);
}
.hero-text { text-align: left; }
.hero-logo { width: min(380px, 80%); }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); line-height: 1.12; margin: .8rem 0 1rem; }
.hero h1 span { color: var(--orange-big); }
.hero-tagline { color: var(--orange-big); font-style: italic; font-weight: 700; font-size: clamp(1.3rem, 3.5vw, 2rem); margin-top: .6rem; }
.hero-lead { max-width: 520px; font-size: 1.12rem; color: var(--muted); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }
.hero-book { position: relative; max-width: 380px; margin: 0 auto; }
.hero-book::before {
  content: ''; position: absolute; z-index: -1; width: 80%; aspect-ratio: 1; border-radius: 50%;
  background: var(--yellow); right: -18%; top: 8%;
}
.hero-book img { position: relative; border-radius: 8px; box-shadow: 0 18px 40px rgba(0,0,0,.22); transform: rotate(3deg); }
body > main { isolation: isolate; overflow-x: clip; } /* circle stays above the page background and never causes sideways scroll */

/* ── Sections ── */
.section { padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 5vw, 3rem); max-width: 1180px; margin: 0 auto; }
.section-tint { max-width: none; background: var(--tint); }
.section-title { text-align: center; font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: 2rem; }
.section-title.small { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
.section-lead { text-align: center; max-width: 640px; margin: -1rem auto 2.4rem; color: var(--muted); font-size: 1.08rem; }

/* ── Book grid ── */
.book-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.8rem; }
.book-grid > * { flex: 0 1 320px; min-width: 250px; }
.book-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: color-mix(in srgb, var(--book) 9%, var(--cream)); border-radius: var(--radius); padding: 1.8rem 1.4rem;
}
.book-card.coming-soon { background: none; border: 3px dashed color-mix(in srgb, var(--book) 45%, transparent); }
.book-cover { width: 210px; aspect-ratio: 450 / 597; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 1.1rem; }
.cover-placeholder { display: grid; place-items: center; background: color-mix(in srgb, var(--book) 16%, white); box-shadow: none; }
.cover-placeholder img { width: 82%; max-height: 92%; object-fit: contain; }
.book-card h3 { font-size: 1.5rem; color: var(--book); }
.book-subtitle { font-weight: 700; margin-bottom: .4rem; }
.book-card p { color: var(--muted); }
.book-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: auto; padding-top: 1.1rem; }
.badge { background: var(--yellow); color: var(--ink); font-weight: 700; font-size: .78rem; padding: .2em .8em; border-radius: 999px; margin-bottom: .4rem; }
.book-actions { flex-direction: column; align-items: center; }

/* ── More from the UP Series ── */
.more { padding-top: 0; }
.more-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem; }
.more-grid > * { flex: 0 1 380px; min-width: 280px; }
.more-card { display: flex; gap: 1.1rem; align-items: center; background: color-mix(in srgb, var(--book) 9%, var(--cream)); border-radius: var(--radius); padding: 1rem; }
.more-cover { width: 92px; flex: none; aspect-ratio: 450 / 597; object-fit: cover; border-radius: 8px; box-shadow: 0 6px 14px rgba(0,0,0,.15); }
.more-card h3 { font-size: 1.2rem; color: var(--book); }
.more-card .book-subtitle { font-size: .92rem; color: var(--muted); }
.more-card .text-link { display: block; margin-top: .2rem; }

/* ── Steps ── */
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.6rem; max-width: 1080px; margin: 0 auto; }
.steps li { padding-left: 1.2rem; border-left: 3px solid var(--gold); }
.step-num { display: block; font-size: 3.2rem; line-height: 1; font-weight: 700; color: var(--orange-big); margin-bottom: .4rem; }
.steps li:nth-child(2) .step-num { color: #8a6500; } /* darker gold: readable on the yellow band */
.steps li:nth-child(3) .step-num { color: var(--blue); }
.steps h3 { font-size: 1.3rem; margin-bottom: .3rem; }

/* ── About ── */
.about { display: grid; grid-template-columns: minmax(160px, 280px) 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.about .section-title { text-align: left; }
.about p { font-size: 1.12rem; margin-bottom: 1rem; }
.signoff { color: var(--orange-text); }

/* ── Newsletter / forms ── */
.newsletter { text-align: center; max-width: 700px; }
.newsletter > p { margin-bottom: 1.4rem; font-size: 1.1rem; }
.signup-form { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; max-width: 440px; margin: 0 auto; }
.input {
  width: 100%; padding: .9em 1.2em; font: inherit; font-size: 1.05rem;
  border: 3px solid var(--book); border-radius: 999px; background: var(--white);
}
.newsletter .input { border-color: var(--yellow); }
.input:focus { outline: none; box-shadow: 0 0 0 4px rgba(246, 214, 68, .5); }
.form-note { font-size: .85rem; color: var(--muted); text-align: center; }
.form-message:empty { display: none; }
.form-message { font-weight: 600; padding: .6em 1em; border-radius: 12px; }
.form-message.error { background: #fde4dc; color: #a33612; }
.form-message.success { background: #e5f6e0; color: #2c6b1f; }
.form-message.info { background: var(--tint); }
.form-message a { display: block; margin-top: .3rem; }

/* ── Activity page ── */
.activity {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
  max-width: 1180px; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 5vw, 3rem);
}
.activity-text { text-align: center; }
.activity-logo { width: min(420px, 85%); margin: 0 auto; }
.cta-text { font-size: 1.25rem; margin-top: 1.4rem; }
.cta-highlight { color: var(--book); font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.2; margin: .3rem 0 1.4rem; }
.book-line { margin-top: 1.6rem; font-weight: 600; font-size: 1.15rem; }
.activity-art img { margin: 0 auto; max-height: 640px; width: auto; }

/* ── Review page ── */
.review { max-width: 760px; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) 1rem; text-align: center; }
.review-cover { margin: 2rem auto 1.5rem; width: 240px; }
.review-art { width: 260px; }
.review h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.3; margin-bottom: 1rem; }
.review h1 span { color: var(--book); }
.review p { font-size: 1.2rem; margin-bottom: .6rem; }
.review .signoff { color: var(--book); margin-bottom: 1.5rem; }
.review .btn { margin: .4rem 0 1.4rem; }
.up-icon { display: inline; height: 1.6em; width: auto; vertical-align: middle; }

/* ── Footer ── */
.site-footer { text-align: center; padding: 3rem 1rem 2rem; background: var(--ink); color: #ddd; }
.site-footer .brand { color: var(--white); }
.site-footer .brand span { color: var(--orange); } /* brand orange passes on the dark footer (4.66) */
.footer-tagline { color: var(--yellow); font-style: italic; margin-bottom: 1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; margin-bottom: 1.4rem; }
.site-footer nav a { color: var(--white); text-decoration: none; font-weight: 600; }
.copyright { font-size: .9rem; color: #aaa; }

/* ── Small screens ── */
@media (max-width: 860px) {
  .site-nav nav a:not(.nav-cta) { display: none; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-text { text-align: center; }
  .hero-logo { margin: 0 auto; }
  .hero-lead { margin: 0 auto; }
  .hero-ctas { justify-content: center; }
  .hero-book { max-width: 260px; }
  .about { grid-template-columns: 1fr; text-align: center; }
  .about-img { width: 200px; margin: 0 auto; }
  .about .section-title { text-align: center; }
  .activity { grid-template-columns: 1fr; }
  .activity-art img { max-height: 300px; }
}
@media (max-width: 420px) {
  .brand { font-size: 1.1rem; }
  .site-nav .nav-cta { font-size: .9rem; padding: .4em .8em; }
  .g-recaptcha { transform: scale(.9); transform-origin: center; }
}

/* Art files have white (not transparent) backgrounds: blend them into tinted sections. */
.hero-logo, .activity-logo, .about-img, .activity-art img, .up-icon { mix-blend-mode: multiply; }
