/* I.M. Awkward: bright, friendly, easy to read for parents and grandparents.
   Colors come from the book cover. Motion is gentle and switches off for anyone who asks. */

@font-face { font-family: "Fredoka"; src: url("fonts/fredoka-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito";  src: url("fonts/nunito-latin-wght-normal.woff2")  format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --blue: #1f5fe0;
  --navy: #0b2a6b;
  --sky: #eaf2ff;
  --sun: #ffd23f;
  --sun-dark: #d9a400;
  --sun-soft: #fff6d6;
  --orange: #ff7a1a;
  --orange-ink: #b84a05;
  --green: #12935f;
  --pink: #e0457b;
  --purple: #6f4bd8;
  --ink: #14213d;
  --muted: #3f4b66;
  --white: #ffffff;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(11, 42, 107, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0; background: #f7faff; color: var(--ink);
  font-family: "Nunito", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 1.15rem; line-height: 1.65;
}
h1, h2, h3, .brand, .btn, .eyebrow, .sticker, summary { font-family: "Fredoka", "Trebuchet MS", "Segoe UI", Arial, sans-serif; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.6rem); line-height: 1.08; font-weight: 600; margin: 0 0 1.1rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1.15; font-weight: 600; margin: 0 0 1rem; color: var(--navy); }
h2::after { content: ""; display: block; width: 72px; height: 8px; border-radius: 8px; margin-top: .55rem; background: linear-gradient(90deg, var(--sun), var(--orange)); }
h3 { font-size: 1.35rem; font-weight: 600; margin: 0 0 .45rem; color: var(--navy); }
a { color: var(--blue); font-weight: 700; }
a:hover { color: var(--navy); }
:focus-visible { outline: 4px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Header */
.site-header { background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid #dbe6fb; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .7rem; padding-bottom: .7rem; flex-wrap: wrap; }
.brand { font-size: 1.6rem; font-weight: 700; color: var(--navy); text-decoration: none; }
.brand:hover { color: var(--blue); }
.site-header nav { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; font-size: 1.02rem; }
.site-header nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 700; position: relative; }
.site-header nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 3px; background: var(--orange); transform: scaleX(0); transition: transform .25s ease; }
.site-header nav a:not(.btn):hover::after { transform: scaleX(1); }

/* Buttons */
.btn {
  display: inline-block; background: var(--sun); color: var(--navy); border: 0;
  padding: .85rem 1.7rem; border-radius: 999px; font-size: 1.15rem; font-weight: 600;
  text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 var(--sun-dark);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { background: #ffdc5e; color: var(--navy); transform: translateY(-3px); box-shadow: 0 8px 0 var(--sun-dark); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--sun-dark); }
.btn-small { padding: .5rem 1.2rem; font-size: 1.02rem; box-shadow: 0 4px 0 var(--sun-dark); }
.btn-outline { background: transparent; color: #fff; box-shadow: inset 0 0 0 3px rgba(255,255,255,.85); }
.btn-outline:hover { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 3px #fff; }
.btn-pulse { animation: pulse 2.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 5px 0 var(--sun-dark), 0 0 0 0 rgba(255,210,63,.55); } 50% { box-shadow: 0 5px 0 var(--sun-dark), 0 0 0 14px rgba(255,210,63,0); } }

/* Hero */
.hero { position: relative; overflow: hidden; color: #fff; padding: 4rem 0 7rem; background: radial-gradient(1200px 600px at 85% 10%, #3a82ff 0%, transparent 60%), linear-gradient(160deg, var(--blue) 0%, var(--navy) 100%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; background: #f7faff; clip-path: ellipse(75% 100% at 50% 100%); }
.blob { position: absolute; border-radius: 50%; opacity: .22; filter: blur(2px); animation: drift 14s ease-in-out infinite; pointer-events: none; }
.blob.b1 { width: 260px; height: 260px; background: var(--sun); top: -60px; left: -70px; }
.blob.b2 { width: 180px; height: 180px; background: var(--orange); bottom: 40px; left: 38%; animation-duration: 17s; animation-delay: -4s; }
.blob.b3 { width: 120px; height: 120px; background: #7fb0ff; top: 30px; right: 36%; animation-duration: 11s; animation-delay: -7s; }
@keyframes drift { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(24px,-28px) scale(1.08); } }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.5rem; align-items: center; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .09em; font-size: .95rem; font-weight: 600; color: var(--navy); background: var(--sun); padding: .3rem .9rem; border-radius: 999px; margin: 0 0 1.1rem; }
.hero h1 { color: #fff; }
.hl { background: var(--sun); color: var(--navy); padding: 0 .35em .05em; border-radius: .3em; display: inline-block; transform: rotate(-1.5deg); box-decoration-break: clone; -webkit-box-decoration-break: clone; animation: pop .8s .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.6) rotate(-6deg); opacity: 0; } to { transform: scale(1) rotate(-1.5deg); opacity: 1; } }
.lead { font-size: 1.3rem; color: #e6efff; margin: 0 0 1.6rem; }
.cta-row { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.fine { font-size: .97rem; color: var(--muted); margin: .6rem 0 0; }
.hero .fine { color: #cfe0ff; }

/* Cover */
.cover-wrap { position: relative; justify-self: center; max-width: 350px; width: 100%; animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-14px) rotate(-1deg); } }
.cover-img { display: block; width: 100%; height: auto; border-radius: 10px 18px 18px 10px; box-shadow: 0 28px 50px rgba(3, 14, 48, .5), 0 0 0 6px rgba(255,255,255,.9); }
.sticker { position: absolute; top: -22px; right: -26px; width: 108px; height: 108px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; text-align: center; font-weight: 700; font-size: 1.02rem; line-height: 1.12; box-shadow: 0 8px 18px rgba(0,0,0,.3); border: 4px dashed #fff; animation: wobble 4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(10deg) scale(1); } 50% { transform: rotate(-6deg) scale(1.07); } }

/* Strip of highlights */
.strip { background: #f7faff; padding: 0 0 1rem; margin-top: -2.2rem; position: relative; z-index: 2; }
.strip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.strip p { position: relative; margin: 0; background: #fff; border-radius: 999px; padding: .95rem 1.4rem .95rem 4.2rem; box-shadow: var(--shadow); font-size: 1.02rem; line-height: 1.4; border: 2px solid #e2ecff; min-height: 4.4rem; display: block; }
.strip p::before { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; background: var(--sun-soft); }
.strip p:nth-child(1)::before { content: "\2705"; }
.strip p:nth-child(2)::before { content: "\1F44D"; background: #e3f7ee; }
.strip p:nth-child(3)::before { content: "\1F604"; background: #ffe9dc; }

/* Sections */
.section { padding: 4.5rem 0; }
.section.alt { background: var(--sky); }
.section-lead { font-size: 1.22rem; color: var(--muted); margin: 0 0 2.2rem; max-width: 760px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.card { position: relative; background: #fff; border-radius: var(--radius); padding: 2rem 1.6rem 1.6rem; box-shadow: var(--shadow); border-top: 8px solid var(--blue); transition: transform .25s ease, box-shadow .25s ease; }
.card:nth-child(2) { border-top-color: var(--orange); }
.card:nth-child(3) { border-top-color: var(--green); }
.card:hover { transform: translateY(-8px) rotate(-.6deg); box-shadow: 0 20px 38px rgba(11, 42, 107, .18); }
.card p { margin: 0; }
.ico { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; font-size: 1.7rem; background: var(--sky); margin-bottom: .9rem; transition: transform .3s ease; }
.card:nth-child(2) .ico { background: #ffe9dc; }
.card:nth-child(3) .ico { background: #e3f7ee; }
.card:hover .ico { transform: scale(1.18) rotate(-10deg); }

.chapters { list-style: none; counter-reset: ch; padding: 0; margin: 0 0 1.6rem; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.4rem; }
.chapters li { counter-increment: ch; position: relative; background: #fff; border-radius: 18px; padding: .9rem 1rem .9rem 4rem; box-shadow: 0 4px 14px rgba(11,42,107,.08); transition: transform .2s ease; line-height: 1.5; }
.chapters li:hover { transform: translateX(6px); }
.chapters li::before { content: counter(ch); position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.15rem; background: var(--blue); }
.chapters li:nth-child(5n+2)::before { background: var(--orange-ink); }
.chapters li:nth-child(5n+3)::before { background: var(--green); }
.chapters li:nth-child(5n+4)::before { background: var(--pink); }
.chapters li:nth-child(5n+5)::before { background: var(--purple); }
.note { background: var(--sun-soft); border-left: 8px solid var(--sun); padding: 1rem 1.3rem; border-radius: 14px; margin: 0; }

.ticks { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.ticks li { position: relative; padding-left: 3rem; margin-bottom: 1.1rem; }
.ticks li::before { content: "\2713"; position: absolute; left: 0; top: .1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* Sign-up and forms */
.signup { background: linear-gradient(180deg, var(--sun-soft), #ffeaa8); }
.form { background: #fff; border-radius: var(--radius); padding: 2rem; display: grid; gap: .55rem; box-shadow: var(--shadow); border: 3px solid #fff; }
.form label { font-weight: 800; margin-top: .6rem; color: var(--navy); }
.form input[type="text"], .form input[type="email"], .form select { width: 100%; padding: .9rem 1.1rem; font-size: 1.1rem; font-family: inherit; border: 3px solid #cbd9f5; border-radius: 14px; background: #fff; color: var(--ink); transition: border-color .2s ease, box-shadow .2s ease; }
.form input:focus, .form select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 5px rgba(31,95,224,.2); }
.form .btn { margin-top: 1.1rem; justify-self: start; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.msg { padding: 1rem 1.3rem; border-radius: 14px; font-weight: 800; margin: 0 0 1.3rem; }
.msg.ok { background: #e3f7ee; color: #0b5c3b; border: 3px solid #8fd6b7; }
.msg.err { background: #ffe5ea; color: #8a1230; border: 3px solid #f2a5b6; }
.msg[hidden] { display: none; }

/* FAQ */
details { background: #fff; border-radius: 18px; padding: .3rem 1.3rem; margin-bottom: 1rem; box-shadow: 0 4px 14px rgba(11,42,107,.08); border: 3px solid transparent; transition: border-color .2s ease, background .2s ease; }
details[open] { background: var(--sun-soft); border-color: var(--sun); }
summary { cursor: pointer; font-weight: 500; font-size: 1.25rem; color: var(--navy); padding: .85rem 2.4rem .85rem 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 2rem; height: 2rem; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 1.4rem; line-height: 1; transition: transform .3s ease, background .2s ease; }
details[open] summary::after { transform: translateY(-50%) rotate(135deg); background: var(--orange-ink); }
details p { margin: 0 0 1rem; animation: fadeDown .35s ease both; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Footer */
.site-footer { background: var(--navy); color: #fff; padding: 3rem 0; }
.site-footer a { color: var(--sun); }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.footer-inner .fine { grid-column: 1 / -1; color: #c3d3f5; }

/* Thank-you page */
.party { display: inline-block; animation: bounce 1.2s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-12px) rotate(8deg); } }

/* Reviews */
.review { text-align: center; background: linear-gradient(180deg, #fff 0%, #fff7d6 100%); }
.review h2::after { margin-left: auto; margin-right: auto; }
.review .section-lead { margin-left: auto; margin-right: auto; }
.review-btns { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin: 1.6rem 0 1rem; }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 6px 0 var(--navy); }
.btn-blue:hover { background: #3a74ea; color: #fff; box-shadow: 0 8px 0 var(--navy); }
.btn-blue:active { box-shadow: 0 2px 0 var(--navy); }
.fine-note { color: var(--muted); font-size: .98rem; margin: 0; }

/* Scroll reveal (only active when JavaScript is on) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.js .card.reveal.in:hover { transform: translateY(-8px) rotate(-.6deg); transition-delay: 0s; }

@media (max-width: 860px) {
  body { font-size: 1.1rem; }
  .hero { padding: 2.5rem 0 6rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .cover-wrap { order: -1; max-width: 250px; }
  .sticker { width: 88px; height: 88px; font-size: .88rem; right: -14px; top: -16px; }
  .cards, .strip-grid, .footer-inner, .chapters { grid-template-columns: 1fr; }
  .strip p { border-radius: 24px; }
  .site-header nav a:not(.btn) { display: none; }
  .section { padding: 3.2rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
