@font-face { font-family: "Gaegu"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/gaegu-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Patrick Hand"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/patrick-hand-latin-400-normal.woff2") format("woff2"); }

:root {
  --yellow: #ffc81f;
  --orange: #ff7a1a;
  --coral: #ff5c4d;
  --red: #e63323;
  --green: #2f9e3f;
  --grass: #4cb944;
  --turq: #17b3d3;
  --sky: #cfe9f7;
  --sky-deep: #aedcf3;
  --blue: #1766c8;
  --navy: #14308a;
  --purple: #8e4dc9;
  --paper: #fffaf0;
  --ink: #1c2a55;
  --radius: 22px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: "Patrick Hand", "Comic Sans MS", "Segoe Print", cursive, sans-serif;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .55  0 0 0 0 .45  0 0 0 0 .3  0 0 0 .14 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
section { position: relative; }
h1, h2, h3 { font-family: "Gaegu", "Patrick Hand", cursive; font-weight: 700; line-height: 1.05; letter-spacing: -.03em; -webkit-text-stroke: 1.4px currentColor; }
h1, h2, h3 { text-wrap: balance; }
h3 { -webkit-text-stroke-width: .8px; letter-spacing: -.02em; }
.sr { position: absolute; left: -9999px; }

/* Rainbow crayon strip */
.rainbow {
  height: 16px;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--grass), var(--turq), var(--blue), var(--purple), var(--coral));
  filter: url(#crayon);
  margin: -4px 0 0;
  clip-path: inset(0 0 -10px 0);
}

/* Header */
header { position: sticky; top: 0; z-index: 30; background: rgba(255, 250, 240, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 84px; }
.logo { font-family: "Gaegu", cursive; font-weight: 700; font-size: 2.4rem; line-height: 1; text-decoration: none; white-space: nowrap; letter-spacing: -.03em; -webkit-text-stroke: 1px currentColor; filter: url(#rough); }
.logo span:nth-child(1) { color: var(--red); }
.logo span:nth-child(2) { color: var(--orange); }
.logo span:nth-child(3) { color: #f2b300; }
.logo span:nth-child(4) { color: var(--grass); }
.logo span:nth-child(5) { color: var(--turq); }
.logo span:nth-child(6) { color: var(--blue); }
.logo span:nth-child(7) { color: var(--purple); }
.logo span:nth-child(8) { color: var(--coral); }
.logo .simple { color: var(--navy); margin-left: .25em; }
nav ul { list-style: none; display: flex; gap: 34px; align-items: center; }
nav a { text-decoration: none; font-size: 1.2rem; position: relative; }
nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: var(--yellow); border-radius: 4px; transform: scaleX(0); transition: transform .2s; filter: url(#rough); }
nav a:not(.btn):hover::after { transform: scaleX(1); }
.menu-toggle { display: none; background: none; border: 3px solid var(--navy); color: var(--navy); font: inherit; font-weight: 700; padding: 6px 16px; border-radius: 14px; cursor: pointer; }

/* Crayon buttons */
.btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 10px; padding: 14px 32px; font: inherit; font-weight: 400; font-size: 1.3rem; -webkit-text-stroke: .5px currentColor; color: var(--navy); text-decoration: none; border: 0; background: none; cursor: pointer; transition: transform .15s; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--yellow); border-radius: 18px 22px 16px 24px; filter: url(#crayon-soft); }
.btn:hover { transform: translateY(-2px) rotate(-1deg); }
.btn:active { transform: translateY(0); }
.btn.blue { color: #fff; }
.btn.blue::before { background: var(--blue); }
.btn.coral { color: #fff; }
.btn.coral::before { background: var(--coral); }
.btn[aria-disabled="true"] { cursor: default; color: var(--navy); }
.btn[aria-disabled="true"]::before { background: #d9e2ee; }
.btn[aria-disabled="true"]:hover { transform: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible { outline: 3px dashed var(--navy); outline-offset: 4px; }
nav .btn { padding: 8px 22px; font-size: 1.15rem; }

/* Decorative crayons */
.crayon { position: absolute; width: 150px; height: auto; pointer-events: none; filter: url(#rough); z-index: 2; }
.crayon use { }

/* Hero */
.hero {
  padding: 64px 0 96px;
  background:
    repeating-linear-gradient(112deg, rgba(255,255,255,.38) 0 7px, transparent 7px 17px),
    linear-gradient(180deg, var(--sky-deep), var(--sky) 70%, #e3f3fb);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; position: relative; z-index: 3; }
.hero h1 { font-size: clamp(3rem, 6.2vw, 5.4rem); filter: url(#rough); }
.hero h1 span { display: block; }
.hero h1 .l1 { color: var(--blue); }
.hero h1 .l2 { color: var(--orange); }
.hero h1 .l3 { color: var(--green); }
.scribble { display: block; width: 240px; height: 14px; margin: 14px 0 18px; }
.hero p.sub { font-size: 1.4rem; max-width: 460px; margin-bottom: 30px; }
.hero-art { position: relative; transform: rotate(1.2deg); }
.hero-art img { width: 100%; border: 11px solid #fff; border-radius: 26px; box-shadow: 0 18px 40px rgba(20, 48, 138, .25); }
.hero-art::before, .hero-art::after { content: ""; position: absolute; width: 96px; height: 30px; background: rgba(255, 200, 31, .78); z-index: 2; filter: url(#rough); }
.hero-art::before { top: -10px; left: 36px; transform: rotate(-8deg); }
.hero-art::after { bottom: -8px; right: 40px; transform: rotate(-5deg); }
.sun { position: absolute; top: 18px; left: -22px; width: 74px; z-index: 1; opacity: .95; }

/* Feature strip */
.features { padding: 56px 0 48px; }
.features ul { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.features li { text-align: center; padding: 0 12px; position: relative; }
.features li + li::before { content: ""; position: absolute; left: -10px; top: 14px; bottom: 14px; width: 2px; background: rgba(20, 48, 138, .15); }
.blob { position: relative; width: 96px; height: 96px; margin: 0 auto 14px; display: grid; place-items: center; }
.blob::before { content: ""; position: absolute; inset: 0; background: var(--c); border-radius: 56% 44% 52% 48% / 48% 54% 46% 52%; filter: url(#crayon); }
.blob svg { position: relative; width: 44px; height: 44px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.features p { font-size: 1.3rem; line-height: 1.2; color: var(--navy); }

/* Section heads */
.head { text-align: center; max-width: 900px; margin: 0 auto 44px; }
.head h2 { font-size: clamp(2.6rem, 5vw, 3.8rem); color: var(--blue); display: inline-block; position: relative; padding: 0 56px; filter: url(#rough); }
.head h2::before, .head h2::after { content: ""; position: absolute; top: 50%; width: 34px; height: 24px; background:
  linear-gradient(var(--orange), var(--orange)) 0 0 / 100% 5px no-repeat,
  linear-gradient(var(--grass), var(--grass)) 0 50% / 100% 5px no-repeat,
  linear-gradient(var(--coral), var(--coral)) 0 100% / 100% 5px no-repeat; border-radius: 4px; }
.head h2::before { left: 0; transform: translateY(-50%) rotate(-24deg); }
.head h2::after { right: 0; transform: translateY(-50%) rotate(24deg); }
.head p { font-size: 1.35rem; margin-top: 10px; }

/* Books */
.books { padding: 72px 0 120px; background: linear-gradient(180deg, #e3f3fb, #d4ecf9); overflow: hidden; }
.book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
.book { text-align: center; }
.cover { display: inline-block; background: #fff; padding: 8px; border-radius: 6px; box-shadow: 0 12px 26px rgba(20, 48, 138, .22); transform: rotate(var(--r, 0deg)); transition: transform .25s, box-shadow .25s; }
.book:hover .cover { transform: rotate(0deg) translateY(-8px) scale(1.03); box-shadow: 0 20px 36px rgba(20, 48, 138, .28); }
.cover img { width: 100%; }
.book h3 { font-size: 1.9rem; color: var(--navy); margin: 20px 0 14px; }
.book .btn { font-size: 1.15rem; padding: 10px 26px; }
.books .grass { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; }
/* Grass blades: tall triangles (tips up) sitting on a thin solid strip */
.grass {
  background: var(--grass);
  -webkit-mask: linear-gradient(#000 0 0) bottom / 100% 12px no-repeat, conic-gradient(from 169.4deg at 50% 0, #000 21.2deg, #0000 0) 0 0 / 24px 100%;
  mask: linear-gradient(#000 0 0) bottom / 100% 12px no-repeat, conic-gradient(from 169.4deg at 50% 0, #000 21.2deg, #0000 0) 0 0 / 24px 100%;
  filter: url(#rough);
}
.grass.back {
  background: #86d97a; height: 92px !important;
  -webkit-mask: linear-gradient(#000 0 0) bottom / 100% 12px no-repeat, conic-gradient(from 168.6deg at 50% 0, #000 22.8deg, #0000 0) 0 0 / 34px 100%;
  mask: linear-gradient(#000 0 0) bottom / 100% 12px no-repeat, conic-gradient(from 168.6deg at 50% 0, #000 22.8deg, #0000 0) 0 0 / 34px 100%;
}

/* Peek inside */
.inside {
  padding: 88px 0 100px;
  background:
    repeating-linear-gradient(60deg, rgba(255, 200, 31, .16) 0 8px, transparent 8px 20px),
    #fff0b3;
  overflow: hidden;
}
.pages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin: 20px 0 52px; position: relative; z-index: 3; }
.page { position: relative; background: #fff; padding: 10px 10px 42px; box-shadow: 0 12px 26px rgba(80, 60, 0, .25); transform: rotate(var(--r, 0deg)); transition: transform .25s; }
.page:hover { transform: rotate(0) scale(1.04); z-index: 4; }
.page::before { content: ""; position: absolute; top: -12px; left: 50%; width: 80px; height: 26px; margin-left: -40px; background: rgba(255, 92, 77, .6); transform: rotate(-4deg); filter: url(#rough); }
.page:nth-child(even)::before { background: rgba(23, 179, 211, .6); transform: rotate(5deg); }
.page img { width: 100%; aspect-ratio: 1 / 1.02; object-fit: cover; object-position: 50% 30%; }
.page figcaption { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 1.15rem; color: var(--navy); }
.inside .cta { text-align: center; position: relative; z-index: 3; }

/* About */
.about { padding: 96px 0; }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: center; }
.about h2 { font-size: clamp(2.6rem, 5vw, 3.8rem); color: var(--blue); margin-bottom: 18px; filter: url(#rough); }
.about h2 em { font-style: normal; color: var(--orange); }
.about p { font-size: 1.4rem; margin-bottom: 16px; max-width: 560px; }
.stack { position: relative; min-height: 400px; }
.stack .page { position: absolute; width: 50%; padding-bottom: 14px; }
.stack .page:nth-child(1) { left: 2%; top: 0; --r: -6deg; }
.stack .page:nth-child(2) { right: 2%; top: 70px; --r: 5deg; }

/* Signup */
.signup { padding: 90px 0 140px; background: linear-gradient(180deg, #d4ecf9, var(--sky-deep)); overflow: hidden; }
.signup-card { position: relative; z-index: 3; max-width: 760px; margin: 0 auto; background: #fff; border-radius: 30px; padding: 44px 44px 40px; box-shadow: 0 18px 40px rgba(20, 48, 138, .2); text-align: center; border: 4px dashed rgba(23, 102, 200, .35); }
.signup-card h2 { font-size: clamp(2.4rem, 5vw, 3.4rem); color: var(--coral); margin-bottom: 8px; filter: url(#rough); }
.signup-card p { font-size: 1.35rem; margin-bottom: 24px; }
.signup-form { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.signup-form input[type="email"] { flex: 1 1 280px; font: inherit; font-size: 1.25rem; padding: 14px 20px; border: 3px solid var(--sky-deep); border-radius: 18px; background: #f7fbfe; color: var(--ink); }
.signup-form input[type="email"]:focus { border-color: var(--blue); outline: none; background: #fff; }
.hp { position: absolute; left: -9999px; }
.form-msg { margin-top: 10px; margin-bottom: 0 !important; font-size: 1.3rem; min-height: 1.2em; color: var(--green); }
.signup .grass { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; }

/* Footer */
footer { position: relative; background: var(--blue); color: #fff; padding: 56px 0 40px; margin-top: -2px; overflow-x: clip; }
footer::before { content: ""; position: absolute; left: -20px; right: -20px; top: -26px; height: 60px; background: var(--blue); border-radius: 50% 50% 0 0 / 100% 100% 0 0; filter: url(#rough); }
.foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer .logo { font-size: 2.2rem; }
footer .logo span { color: #fff !important; }
footer .logo span:nth-child(1), footer .logo span:nth-child(3), footer .logo span:nth-child(5), footer .logo span:nth-child(7) { color: var(--yellow) !important; }
.tag { font-family: "Gaegu", cursive; font-weight: 700; font-size: 1.9rem; text-align: center; }
.tag small { display: block; font-family: "Patrick Hand", cursive; font-weight: 400; font-size: 1.1rem; opacity: .85; }
.social { display: flex; gap: 14px; list-style: none; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.16); transition: background .2s, transform .15s; }
.social a:hover { background: rgba(255,255,255,.32); transform: translateY(-2px) rotate(-6deg); }
.social svg { width: 22px; height: 22px; fill: #fff; }
.copy { position: relative; margin-top: 26px; text-align: center; font-size: 1rem; opacity: .8; }

/* Responsive */
@media (max-width: 980px) {
  body { font-size: 20px; }
  .hero { padding: 36px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { max-width: 640px; margin: 0 auto; }
  .features ul { grid-template-columns: 1fr 1fr; gap: 34px 10px; }
  .features li + li::before { display: none; }
  .book-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .pages { grid-template-columns: 1fr 1fr; gap: 36px 22px; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .stack { min-height: 260px; max-width: 420px; }
  .menu-toggle { display: block; }
  nav ul { display: none; position: absolute; top: 84px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); padding: 10px 24px 24px; border-bottom: 4px solid var(--yellow); }
  nav ul.open { display: flex; }
  nav li a:not(.btn) { display: block; padding: 14px 0; font-size: 1.35rem; }
  nav a:not(.btn)::after { display: none; }
  nav li:last-child { padding-top: 10px; }
  nav li:last-child .btn { display: flex; justify-content: center; }
  .crayon.hide-sm { display: none; }
  .signup-card { padding: 32px 22px; }
}
@media (max-width: 520px) {
  .logo { font-size: 1.9rem; }
  .head h2 { padding: 0 30px; font-size: 2.4rem; }
  .head h2::before, .head h2::after { width: 22px; }
  .book h3 { font-size: 1.55rem; margin: 16px 0 12px; }
  .book .btn { font-size: 1.05rem; padding: 10px 14px; gap: 6px; white-space: nowrap; }
  .stack { min-height: 300px; }
  .features p { font-size: 1.15rem; }
  .blob { width: 80px; height: 80px; }
  .blob svg { width: 38px; height: 38px; }
  .foot { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .cover, .page, .social a, nav a::after { transition: none; }
}
