/* TypingAtoZ website - shared styles.
   Light-blue paper background, crayon colors, origami pictures from the program. */

:root {
  --paper: #f3f8fd;          /* off-white with a touch of blue */
  --paper-2: #e4f0fb;        /* light blue band */
  --card: #ffffff;
  --ink: #17365d;            /* deep blue text, as in the program */
  --ink-soft: #4a6485;
  --crayon-red: #e8505b;
  --crayon-orange: #f39a2b;
  --crayon-yellow: #f7cf3d;
  --crayon-green: #3fae6a;
  --crayon-blue: #3b8fe0;
  --crayon-purple: #8a6fd6;
  --crayon-pink: #f08ab8;
  --radius: 22px;
  --shadow: 0 10px 28px rgba(23, 54, 93, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
  font-size: 1.12rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #1e63b5; }
h1, h2, h3 { font-family: "Fredoka", "Comic Sans MS", "Segoe UI", sans-serif; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 99; }

/* ---------- crayon effects ---------- */
/* A wobbly, waxy edge: the SVG filter in each page's <svg> block. */
.crayon { filter: url(#wobble); }

/* Crayon underline under a word: a thick, slightly rough stripe. */
.scribble { position: relative; z-index: 0; padding: 0 .12em; }
.scribble::after {            /* the crayon stripe sits behind the word, so only the stripe is roughened */
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .38em; z-index: -1;
  background: var(--c, var(--crayon-yellow)); border-radius: 6px; filter: url(#wobble);
}
.scribble.red { --c: #f6a0a6; }
.scribble.green { --c: #a6dfbd; }
.scribble.blue { --c: #a8cff4; }
.scribble.pink { --c: #f8c4dc; }
.scribble.purple { --c: #cfc3f0; }
.scribble.orange { --c: #f9cf94; }

/* Row of crayon stripes used as a divider. */
.stripes { display: flex; height: 12px; filter: url(#wobble); }
.stripes i { flex: 1; }
.stripes i:nth-child(1) { background: var(--crayon-red); }
.stripes i:nth-child(2) { background: #fff; box-shadow: inset 0 0 0 2px #cfdcec; }
.stripes i:nth-child(3) { background: var(--crayon-blue); }
.stripes i:nth-child(4) { background: var(--crayon-green); }

/* three kinds of student */
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 34px; text-align: left; }
.level { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 26px; border-top: 10px solid var(--c); }
.level .shot { border-width: 2px; box-shadow: none; margin-bottom: 18px; }
.level ul { padding-left: 1.2em; margin: 0; }
.level li { margin-bottom: .3em; }

/* ---------- header ---------- */
header.top { background: var(--paper); position: sticky; top: 0; z-index: 20; }
header.top .bar { display: flex; align-items: center; gap: 18px; padding: 10px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: "Fredoka", sans-serif; font-size: 1.6rem; font-weight: 700; }
.brand img { width: 44px; height: 44px; border-radius: 10px; }
.brand b:nth-of-type(1) { color: var(--crayon-red); }
.brand b:nth-of-type(2) { color: var(--crayon-blue); }
nav.main { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
nav.main a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 8px 12px; border-radius: 999px; font-size: 1rem; }
nav.main a:hover, nav.main a[aria-current="page"] { background: var(--paper-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.2rem;
  padding: 14px 28px; border-radius: 999px; text-decoration: none; border: 3px solid var(--ink);
  background: var(--crayon-green); color: #fff; box-shadow: 0 5px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--ink); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 4px solid var(--crayon-orange); outline-offset: 3px; }
.btn.alt { background: #fff; color: var(--ink); }
.btn.store { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 5px 0 #0b1d38; }
.btn.small { font-size: 1rem; padding: 9px 20px; box-shadow: 0 4px 0 var(--ink); }
.btn[aria-disabled="true"] { opacity: .65; cursor: default; pointer-events: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 70px; background: linear-gradient(var(--paper), var(--paper-2)); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 1.3rem; color: var(--ink-soft); max-width: 36em; }
.hero .cta { display: flex; gap: 16px; flex-wrap: wrap; margin: 26px 0 14px; }
.hero .badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding: 0; list-style: none; }
.hero .badges li { background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-weight: 800; font-size: .98rem; }
.hero .badges li:nth-child(1) { border-color: var(--crayon-green); }
.hero .badges li:nth-child(2) { border-color: var(--crayon-blue); }
.hero .badges li:nth-child(3) { border-color: var(--crayon-orange); }
.hero .badges li:nth-child(4) { border-color: var(--crayon-purple); }
.shot { background: #fff; border-radius: 16px; border: 3px solid var(--ink); box-shadow: var(--shadow); overflow: hidden; }
.shot img { width: 100%; }
.hero .shot { transform: rotate(1.6deg); }
.float { position: absolute; pointer-events: none; }
.float.bob { animation: bob 6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .float.bob { animation: none; } html { scroll-behavior: auto; } }

/* ---------- sections ---------- */
section { padding: 70px 0; }
section.band { background: var(--paper-2); }
.center { text-align: center; }
.sub { color: var(--ink-soft); max-width: 40em; margin-inline: auto; font-size: 1.2rem; }

/* promise cards */
.promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin-top: 34px; }
.card { background: var(--card); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow); border-top: 10px solid var(--c, var(--crayon-blue)); }
.card .big { font-size: 2.4rem; line-height: 1; margin-bottom: 10px; }
.card.red { --c: var(--crayon-red); } .card.orange { --c: var(--crayon-orange); } .card.yellow { --c: var(--crayon-yellow); }
.card.green { --c: var(--crayon-green); } .card.blue { --c: var(--crayon-blue); } .card.purple { --c: var(--crayon-purple); } .card.pink { --c: var(--crayon-pink); }
.card p:last-child { margin-bottom: 0; }

/* feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; margin-top: 56px; }
.feature.flip .shot { order: -1; }
.feature ul { padding-left: 1.2em; }
.feature li { margin-bottom: .35em; }
.tag { display: inline-block; font-family: "Fredoka", sans-serif; font-weight: 600; padding: 3px 14px; border-radius: 999px; color: #fff; background: var(--c, var(--crayon-blue)); margin-bottom: 10px; font-size: .95rem; }

/* games */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-top: 34px; }
.game { background: #fff; border-radius: var(--radius); padding: 14px 14px 20px; box-shadow: var(--shadow); text-align: center; border: 3px solid var(--c); }
.game .shot { border-width: 2px; box-shadow: none; margin-bottom: 14px; }
.game h3 { margin-bottom: .2em; }
.game p { font-size: 1rem; color: var(--ink-soft); margin: 0; }

/* steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin-top: 34px; padding: 0; list-style: none; }
.steps li { counter-increment: s; background: #fff; border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); position: relative; }
.steps li::before { content: counter(s); position: absolute; top: -18px; left: 20px; width: 44px; height: 44px; border-radius: 50%; background: var(--c); color: #fff; font: 700 1.4rem "Fredoka", sans-serif; display: grid; place-items: center; }
.steps li:nth-child(1) { --c: var(--crayon-red); } .steps li:nth-child(2) { --c: var(--crayon-orange); } .steps li:nth-child(3) { --c: var(--crayon-green); } .steps li:nth-child(4) { --c: var(--crayon-purple); }

/* privacy / price callout */
.callout { background: #fff; border: 4px dashed var(--crayon-green); border-radius: 28px; padding: 34px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.callout .badge { width: 120px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 24px; }
.checks li::before { content: "\2714"; color: var(--crayon-green); font-weight: 900; margin-right: 8px; }

/* certificate strip */
.paper-pair { display: flex; gap: 22px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.paper-pair .shot { width: min(300px, 100%); }
.paper-pair .shot:nth-child(1) { transform: rotate(-2.5deg); }
.paper-pair .shot:nth-child(2) { transform: rotate(1.5deg); }

/* FAQ */
details { background: #fff; border-radius: 16px; margin: 12px 0; padding: 4px 20px; box-shadow: var(--shadow); }
summary { cursor: pointer; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.2rem; padding: 12px 0; }
details p { color: var(--ink-soft); }

/* download cards */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; margin-top: 30px; }
.dl { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; border-top: 10px solid var(--c); display: flex; flex-direction: column; }
.dl .meta { font-size: .95rem; color: var(--ink-soft); margin: 0 0 14px; }
.dl .btn { margin-top: auto; align-self: flex-start; }
.dl img.art { width: 74px; margin-bottom: 8px; }
.soon { display: inline-block; background: var(--crayon-yellow); color: var(--ink); font-weight: 800; border-radius: 999px; padding: 2px 12px; font-size: .9rem; }

/* footer */
footer { background: var(--ink); color: #dbe8f7; padding: 44px 0 30px; }
footer a { color: #fff; }
footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
footer h3 { color: #fff; font-size: 1.1rem; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer small { display: block; margin-top: 26px; opacity: .8; }

/* ---------- small screens ---------- */
@media (max-width: 1180px) { .float.hide-sm { display: none; } }
@media (max-width: 860px) {
  .hero .wrap, .feature, .callout { grid-template-columns: 1fr; }
  .feature.flip .shot { order: 0; }
  .hero .shot { transform: none; }
  .callout .badge { width: 80px; }
  header.top { position: static; }
  nav.main { margin-left: 0; }
  .float.hide-sm { display: none; }
}

.promise.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
