:root {
  --paper: #fbfaf4;
  --paper-2: #f2f3ea;
  --ink: #10302b;
  --ink-soft: #4b625d;
  --forest: #0b3d36;
  --teal: #0c7a69;
  --teal-bright: #27b39c;
  --mint: #d9f1e8;
  --marker: #ffe675;
  --pen: #d3412b;
  --line: #d9dfd3;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --hand: "Shantell Sans", "Segoe Print", cursive;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 136px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 3px; border-radius: 4px; }

h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.028em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(2.65rem, 5.6vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-family: var(--display); font-weight: 650; font-size: 1.2rem; letter-spacing: -0.012em; line-height: 1.2; }

.wrap { width: min(100%, 1240px); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

.kicker {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--teal);
  margin-bottom: 18px;
}

/* Buttons and links */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 0 #075246;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.btn:hover { transform: translateY(1px); box-shadow: 0 2px 0 #075246; background: #0a6d5e; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 #075246; }
.btn--small { min-height: 42px; padding: 0 16px; font-size: 0.95rem; box-shadow: none; }
.btn--small:hover { box-shadow: none; transform: none; }
.btn--ink { background: var(--ink); box-shadow: 0 3px 0 #000; }
.btn--ink:hover { background: #1a433d; box-shadow: 0 2px 0 #000; }
.btn--light { background: var(--marker); color: var(--ink); box-shadow: 0 3px 0 #c8ad33; }
.btn--light:hover { background: #ffdf4d; box-shadow: 0 2px 0 #c8ad33; }
.btn--wide { width: 100%; }
.link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-color: var(--teal-bright); }
.link span { display: inline-block; transition: transform .15s ease; }
.link:hover span { transform: translateX(4px); }

/* Handwritten notes */
.note { font-family: var(--hand); font-weight: 500; color: var(--pen); line-height: 1.2; }
.note--good { color: var(--teal); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(251, 250, 244, .93); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.is-stuck { border-color: var(--line); }
.nav__row { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.2rem/1 var(--display); letter-spacing: -0.02em; }
.logo img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.logo em { font-style: normal; font-weight: 500; color: var(--ink-soft); margin-left: 5px; }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); font-size: 0.975rem; font-weight: 500; }
.nav__links a:not(.btn) { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav__links a:not(.btn):hover { border-color: var(--teal-bright); }
.nav__toggle { display: none; background: none; border: 1.5px solid var(--ink); border-radius: 8px; min-height: 42px; padding: 0 14px; font-weight: 600; cursor: pointer; }

/* Hero */
.hero { padding-top: clamp(32px, 5vw, 72px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--ink-soft); margin-top: 26px; max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; margin-top: 34px; }

.mark { background: linear-gradient(transparent 12%, var(--marker) 12%, var(--marker) 90%, transparent 90%); padding-inline: .1em; margin-inline: -.1em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.scribble { position: relative; display: inline-block; white-space: nowrap; }
.scribble svg { position: absolute; left: 0; right: 0; bottom: -.14em; width: 100%; height: .2em; overflow: visible; }
.scribble path { fill: none; stroke: var(--pen); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .8s .35s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.film { position: relative; }
.film__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--mint); box-shadow: 0 0 0 1px rgba(16, 48, 43, .12), 14px 14px 0 var(--mint); }
.film video { width: 100%; height: 100%; object-fit: cover; }
.film__play {
  position: absolute; left: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 20px 0 12px;
  background: var(--ink); color: #fff;
  border: 0; border-radius: 999px; cursor: pointer; font-weight: 600;
  transition: transform .15s ease, background .15s ease;
}
.film__play:hover { transform: scale(1.03); background: var(--teal); }
.film__play svg { width: 32px; height: 32px; padding: 7px; background: var(--marker); border-radius: 50%; fill: var(--ink); }
.film__play small { font-weight: 400; opacity: .75; margin-left: 4px; font-size: .9em; }
.film.is-playing .film__play, .film.is-playing .note--film { display: none; }
.note--film { position: absolute; right: 8px; top: -30px; font-size: 1.1rem; transform: rotate(-3deg); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(56px, 7vw, 92px); border-block: 1px solid var(--line); }
.facts > div { padding: 20px 24px; border-left: 1px solid var(--line); }
.facts > div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-size: .875rem; color: var(--ink-soft); }
.facts dd { font: 650 clamp(1.1rem, 1.7vw, 1.4rem)/1.2 var(--display); letter-spacing: -0.015em; margin-top: 4px; }
.facts small { font-size: .7em; font-weight: 500; color: var(--ink-soft); }

/* About */
.about { padding-block: var(--section); }
.about__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); }
.about__head { position: sticky; top: 112px; align-self: start; }
.about__lead { font: 500 clamp(1.3rem, 2.2vw, 1.75rem)/1.3 var(--display); letter-spacing: -0.015em; margin-bottom: 20px; }
.about__body > p:not(.about__lead) { color: var(--ink-soft); max-width: 38em; }
.reasons { margin-top: 44px; counter-reset: r; border-top: 1px solid var(--line); }
.reasons li { display: grid; grid-template-columns: 56px minmax(0, 1fr); padding: 24px 0; border-bottom: 1px solid var(--line); counter-increment: r; }
.reasons li::before { content: counter(r); grid-row: span 2; font: 500 1.5rem/1 var(--hand); color: var(--pen); }
.reasons p { color: var(--ink-soft); margin-top: 6px; max-width: 36em; }

/* Method */
.method { background: var(--forest); color: #eaf5f1; padding-block: var(--section); }
.method .kicker { color: #7fdcc8; }
.method__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.method__intro > p:not(.kicker) { margin-top: 20px; color: #bcd6cf; max-width: 28em; }
.tabs { display: inline-flex; gap: 4px; margin-top: 32px; padding: 4px; background: rgba(255, 255, 255, .08); border-radius: 12px; max-width: 100%; }
.tabs button { min-height: 44px; padding: 0 clamp(12px, 2vw, 18px); background: none; border: 0; border-radius: 9px; color: #d3e8e2; font-weight: 600; cursor: pointer; }
.tabs button:hover { color: #fff; }
.tabs button[aria-selected="true"] { background: var(--marker); color: var(--ink); }

.book {
  --grid: rgba(12, 122, 105, .13);
  position: relative;
  color: var(--ink);
  background-color: #fffef9;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px;
  border-radius: 6px 14px 14px 6px;
  padding: clamp(24px, 3.5vw, 40px) clamp(20px, 3.5vw, 44px) clamp(24px, 3vw, 32px) clamp(40px, 6vw, 76px);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .55);
  min-height: 500px;
  display: flex; flex-direction: column;
}
.book::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(24px, 4.2vw, 54px); width: 2px; background: rgba(211, 65, 43, .45); }
.example { flex: 1; }
.q { font: 650 clamp(1.25rem, 2.2vw, 1.65rem)/1.3 var(--display); letter-spacing: -0.015em; padding-bottom: 18px; }
.q span { font-weight: 500; }
.steps { margin-top: 8px; }
.steps li { padding: 16px 0; border-top: 1px dashed rgba(16, 48, 43, .22); animation: rise .35s ease both; }
.steps li[hidden] { display: none; }
.steps code { display: block; font: 600 clamp(1.25rem, 2.3vw, 1.6rem)/1.3 var(--hand); color: var(--teal); }
.steps p { margin-top: 4px; font-size: 1rem; color: var(--ink); }
.steps em { font-style: normal; background: var(--marker); padding-inline: 3px; }
.steps .note { margin-top: 6px; font-size: 1rem; transform: rotate(-1deg); transform-origin: left; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.book__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 20px; }
#next-step[hidden] { display: none; }

/* Subjects */
.subjects { padding-block: var(--section); }
.section-head { max-width: 42em; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head > p:not(.kicker) { margin-top: 16px; color: var(--ink-soft); }
.subject-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); border-top: 1px solid var(--ink); }
.subject-list a {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; grid-template-rows: auto auto;
  column-gap: 18px; align-items: center;
  padding: 20px 4px; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background .15s ease, padding .15s ease;
}
.subject-list a:hover { background: var(--mint); padding-inline: 12px; }
.tile {
  grid-row: span 2; display: grid; place-items: center; width: 76px; height: 64px;
  background: var(--paper-2); border-radius: 8px; color: var(--teal);
  font: 600 1.1rem/1 var(--hand); transition: background .15s ease;
}
.subject-list a:hover .tile { background: #fff; }
.subject-name { font: 650 clamp(1.25rem, 2vw, 1.55rem)/1.15 var(--display); letter-spacing: -0.018em; align-self: end; }
.subject-topics { grid-column: 2; color: var(--ink-soft); font-size: .975rem; align-self: start; margin-top: 3px; }
.arrow { grid-column: 3; grid-row: 1 / span 2; font-size: 1.25rem; color: var(--teal); transition: transform .15s ease; }
.subject-list a:hover .arrow { transform: translateX(4px); }

/* Pricing */
.pricing { background: var(--teal); color: #fff; padding-block: clamp(64px, 8vw, 104px); }
.pricing .kicker { color: #c9f3e7; }
.pricing__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.price { display: block; font-size: clamp(4.5rem, 11vw, 9rem); letter-spacing: -0.05em; line-height: .95; margin-top: 18px; color: var(--marker); }
.price small { font-size: .26em; letter-spacing: -0.02em; font-weight: 500; color: #fff; margin-left: .15em; }
.ticks li { position: relative; padding: 13px 0 13px 34px; border-bottom: 1px solid rgba(255, 255, 255, .28); font-weight: 500; }
.ticks li::before { content: "✓"; position: absolute; left: 2px; top: 11px; font: 600 1.2rem/1.4 var(--hand); color: var(--marker); }
.pricing__side .btn { margin-top: 28px; }

/* Reviews */
.reviews { padding-block: var(--section); }
.reviews__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0 clamp(32px, 6vw, 88px); }
.review { padding: 26px 0; border-top: 1px solid var(--line); }
.review blockquote { font-size: 1.1rem; line-height: 1.5; }
.review figcaption { margin-top: 12px; font-size: .925rem; color: var(--ink-soft); }
.review--lead { grid-row: span 3; border-top: 1px solid var(--ink); padding-top: 32px; }
.review--lead blockquote { font: 500 clamp(1.45rem, 2.7vw, 2.15rem)/1.22 var(--display); letter-spacing: -0.018em; }
.grade { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; font: 600 clamp(3.5rem, 7vw, 5.5rem)/1 var(--hand); color: var(--pen); }
.grade__old { opacity: .45; }
.grade__arrow { width: clamp(56px, 7vw, 90px); }
.grade__arrow path, .grade__new path { fill: none; stroke: var(--pen); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.grade__new { position: relative; padding-inline: .22em; }
.grade__new svg { position: absolute; inset: -6% -8%; width: 116%; height: 112%; overflow: visible; }

.leave-review { margin-top: 40px; border-block: 1px solid var(--ink); }
.leave-review summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; font-weight: 600; cursor: pointer; list-style: none; }
.leave-review summary::-webkit-details-marker { display: none; }
.leave-review summary span { font-size: 1.5rem; font-weight: 400; color: var(--teal); transition: transform .2s; }
.leave-review[open] summary span { transform: rotate(45deg); }
.leave-review .form { padding-bottom: 28px; max-width: 760px; }

/* Revision */
.revision { background: var(--paper-2); padding-block: var(--section); }
.revision__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); }
.revision header > p:not(.kicker) { margin-top: 18px; color: var(--ink-soft); max-width: 28em; }
.revision header a { color: var(--teal); font-weight: 600; text-underline-offset: 3px; }
.shelf { border-top: 1px solid var(--ink); }
.shelf__row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr; gap: 6px 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.shelf a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--teal-bright); text-decoration-thickness: 1.5px; text-underline-offset: 4px; display: inline-block; padding-block: 3px; }
.shelf a:hover { color: var(--teal); }
.shelf ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }

/* Contact */
.contact { background: var(--forest); color: #eaf5f1; padding-block: var(--section); }
.contact .kicker { color: #7fdcc8; }
.contact__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact__copy > p:not(.kicker) { margin-top: 20px; color: #bcd6cf; }
.contact__copy .contact__direct { margin-top: 32px; }
.contact__direct a { color: #fff; font-weight: 600; font-size: 1.1rem; overflow-wrap: anywhere; text-underline-offset: 4px; }

/* Forms */
.form { display: grid; gap: 18px; }
.form--card { background: var(--paper); color: var(--ink); padding: clamp(22px, 3.5vw, 40px); border-radius: 14px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form label { display: grid; gap: 7px; font-size: .95rem; font-weight: 600; }
.form input:not([type="hidden"]), .form select, .form textarea {
  width: 100%; min-height: 50px; padding: 11px 13px;
  background: #fff; border: 1.5px solid #b9c5bc; border-radius: 9px;
  font-weight: 400; font-size: 1rem; transition: border-color .15s;
}
.form textarea { resize: vertical; line-height: 1.5; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--ink-soft); }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid rgba(39, 179, 156, .35); border-color: var(--teal); }
.form ::placeholder { color: #6b7d78; }
.form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.form__status { font-weight: 600; color: var(--teal); }
.form__status:empty { display: none; }
.form__status.is-error { color: var(--pen); }
.form__status a { color: inherit; }
.form button[disabled] { opacity: .65; cursor: wait; }

/* Footer */
.footer { background: var(--forest); color: #a9c7bf; font-size: .925rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px; }

/* Tablet and below */
@media (max-width: 960px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 18px;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: 14px; min-height: 50px; }
  .hero__grid, .about__grid, .method__grid, .pricing__grid, .revision__grid, .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .about__head { position: static; }
  .film__frame { box-shadow: 0 0 0 1px rgba(16, 48, 43, .12), 8px 8px 0 var(--mint); }
  .book { min-height: 520px; }
}

/* Phones */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > div { padding: 16px 0 16px 16px; }
  .facts > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .subject-list, .reviews__grid, .form__row { grid-template-columns: minmax(0, 1fr); }
  .review--lead { grid-row: auto; }
  .shelf__row { grid-template-columns: minmax(0, 1fr); }
  .shelf ul { grid-template-columns: minmax(0, 1fr); }
  .note--film { top: -28px; }
  .tabs { display: flex; }
  .tabs button { flex: 1; padding: 0 6px; font-size: .95rem; }
  .book { min-height: 560px; }
  .film__play { left: 10px; bottom: 10px; min-height: 44px; font-size: .95rem; }
  .film__play svg { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
