/* Tiny Crayon Club — site styles
   Plain CSS, no build step. Self-hosted Fredoka variable font. */

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

:root {
  /* pastel backgrounds, matched to the book covers */
  --mint: #cfeee0;
  --lilac: #e6d9f5;
  --lemon: #fff3b0;
  --peach: #ffd9c2;
  --sky: #cfe6f7;
  --pink: #ffd6e7;

  /* wordmark letter colours */
  --c1: #ff6a5c;
  --c2: #ffb224;
  --c3: #56bf6c;
  --c4: #458fdb;
  --c5: #ff6ba3;
  --c6: #9b6cd2;

  --ink: #231e28;
  --white: #ffffff;

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow: 0 12px 28px rgba(35, 30, 40, 0.14);
  --shadow-sm: 0 6px 14px rgba(35, 30, 40, 0.1);
  --gutter: 16px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", Verdana, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Wordmark (brand name, multi-colour letters) ---------- */

.wordmark {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  margin: 0;
  line-height: 1;
  letter-spacing: 0.5px;
}

.wordmark span:nth-child(6n + 1) { color: var(--c1); }
.wordmark span:nth-child(6n + 2) { color: var(--c2); }
.wordmark span:nth-child(6n + 3) { color: var(--c3); }
.wordmark span:nth-child(6n + 4) { color: var(--c4); }
.wordmark span:nth-child(6n + 5) { color: var(--c5); }
.wordmark span:nth-child(6n)     { color: var(--c6); }

.wordmark--lg {
  font-size: clamp(2.4rem, 8vw, 4.6rem);
}

.wordmark--sm {
  font-size: 1.5rem;
}

/* ---------- Header ---------- */

.site-header {
  padding: 18px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-header a.brand-link {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  padding: 8px 4px;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus {
  border-bottom-color: var(--c4);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--c1);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.btn-primary:focus {
  background: #e85748;
}

.btn-big {
  font-size: 1.3rem;
  padding: 18px 40px;
}

.btn-disabled {
  background: #e4e1e6;
  color: #8a8590;
  cursor: not-allowed;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--mint);
  padding: 64px 0 56px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.hero-tagline {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(1.2rem, 3.4vw, 1.6rem);
  margin: 18px 0 10px;
}

.hero-desc {
  font-size: 1.05rem;
  margin: 0 auto 28px;
  max-width: 560px;
}

.hero-stickers img {
  position: absolute;
  z-index: 1;
  filter: drop-shadow(0 6px 10px rgba(35, 30, 40, 0.18));
}

.sticker-a { width: 92px; top: 6%; left: 4%; transform: rotate(-12deg); }
.sticker-b { width: 84px; top: 12%; right: 5%; transform: rotate(10deg); }
.sticker-c { width: 96px; bottom: 4%; left: 9%; transform: rotate(8deg); }
.sticker-d { width: 88px; bottom: 8%; right: 4%; transform: rotate(-10deg); }

/* hide stickers on narrow screens so they never crowd the text,
   and reduce/thin them out on medium screens */
@media (max-width: 700px) {
  .hero-stickers {
    display: none;
  }
}

@media (min-width: 701px) and (max-width: 980px) {
  .hero-stickers img {
    width: 60px !important;
  }
  .sticker-c,
  .sticker-d {
    display: none;
  }
}

/* ---------- Generic section ---------- */

section {
  padding: 56px 0;
}

.section-lilac { background: var(--lilac); }
.section-lemon { background: var(--lemon); }
.section-peach { background: var(--peach); }
.section-sky { background: var(--sky); }
.section-pink { background: var(--pink); }
.section-white { background: var(--white); }

.section-title {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  text-align: center;
  margin: 0 0 36px;
}

/* ---------- Book cards ---------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.book-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.book-cover {
  aspect-ratio: 600 / 776;
  overflow: hidden;
  background: var(--sky);
}

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

.book-body {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.badge {
  align-self: flex-start;
  background: var(--c2);
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.book-title {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0;
}

.book-age {
  font-weight: 700;
  color: var(--c4);
  margin: 0;
  font-size: 0.95rem;
}

.book-desc {
  margin: 0 0 6px;
}

.peek-label {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  margin: 4px 0 8px;
  color: #574f60;
}

.peek-thumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.peek-thumbs img {
  width: 33.3%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.book-body .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ---------- Why us ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.why-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 26px 22px;
  text-align: center;
}

.why-card .why-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 10px;
}

.why-card h3 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.why-card p {
  margin: 0;
  font-size: 0.96rem;
}

/* ---------- About ---------- */

.about-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 34px 30px;
  text-align: center;
}

.about-card p {
  margin: 0 0 14px;
}

.about-card a {
  font-weight: 700;
  color: var(--c4);
  text-decoration: underline;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #efeaf5;
  text-align: center;
  padding: 26px 0;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--pink);
  text-decoration: underline;
  font-weight: 600;
}

/* ---------- Review page ---------- */

.review-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sky);
  padding: 40px 0;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-width: 520px;
  margin: 0 auto;
  padding: 44px 32px;
  text-align: center;
}

.review-card h1 {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  margin: 0 0 16px;
}

.review-card p {
  margin: 0 0 26px;
}

.review-card .btn-big {
  display: block;
  margin: 0 auto 20px;
}

.review-back {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
}

/* ---------- 404 page ---------- */

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lemon);
  padding: 40px 0;
  text-align: center;
}

.error-card {
  max-width: 480px;
  margin: 0 auto;
}

.error-card img {
  width: 130px;
  margin: 0 auto 18px;
}

.error-card h1 {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  margin: 0 0 12px;
}

.error-card p {
  margin: 0 0 24px;
}

@media (max-width: 480px) {
  .book-body {
    padding: 18px 16px 22px;
  }
  .about-card,
  .review-card {
    padding: 30px 20px;
  }
}
