/* Self-hosted fonts (SIL Open Font Licence) — no requests to third parties */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); }

/* NewtonEast — shared styles
   Brand: ink navy, warm paper, apple red, east teal, a touch of sunrise gold.
   Type: Bricolage Grotesque (display), Atkinson Hyperlegible (reading), JetBrains Mono (labels). */

:root {
  --ink: #0F1B2D;
  --ink-2: #1A2940;
  --ink-3: #2A3B57;
  --paper: #FAF8F3;
  --paper-2: #F2EEE5;
  --card: #FFFFFF;
  --line: #E3DDD0;
  --muted: #586274;
  --apple: #E5484D;
  --apple-deep: #C2333A;
  --east: #12A594;
  --east-deep: #0B7366;
  --east-soft: #DDF3EF;
  --sun: #F5B83D;
  --on-ink: #F4F1EA;
  --on-ink-muted: #AEB7C7;

  /* Quizmanjaro's own colours, used only inside its panels */
  --qm-indigo: #12133A;
  --qm-cream: #FFF9F0;
  --qm-orange: #FF6B2C;
  --qm-gold: #FFC22E;
  --qm-forest: #1E6B45;
  --qm-heather: #74469B;
  --qm-ice: #9AD8F2;

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--east-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.4rem; letter-spacing: -0.015em; line-height: 1.15; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 38em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.kicker {
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--east-deep);
  margin: 0 0 14px;
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 22px; height: 2px; background: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 38px; height: 38px; }
.wordmark { font-family: var(--f-display); font-weight: 800; font-size: 1.55rem; letter-spacing: -0.04em; line-height: 1; }
.wordmark span { color: var(--east-deep); }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1rem;
}
.nav-links a:hover { background: var(--paper-2); }
.nav-links a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.menu-btn {
  display: none; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 12px; height: 44px; padding: 0 14px; font: 700 1rem var(--f-body); cursor: pointer;
  align-items: center; gap: 8px;
}
.menu-btn svg { width: 20px; height: 20px; }

@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 16px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; border-radius: 12px; font-size: 1.1rem; }
}

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 14px;
  font: 700 1.02rem/1 var(--f-body); text-decoration: none; cursor: pointer;
  border: 2px solid var(--ink); background: var(--ink); color: var(--on-ink);
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-2px); color: var(--on-ink); background: var(--ink-2); }
.btn svg { width: 18px; height: 18px; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn.east { background: var(--east-deep); border-color: var(--east-deep); }
.btn.east:hover { background: #095E54; }
.btn.qm { background: var(--qm-orange); border-color: var(--qm-orange); color: var(--qm-indigo); }
.btn.qm:hover { background: #FF8550; color: var(--qm-indigo); }
.btn.on-dark.ghost { color: var(--on-ink); border-color: rgba(244,241,234,.5); }
.btn.on-dark.ghost:hover { background: rgba(255,255,255,.08); color: var(--on-ink); }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover { transition: none; transform: none; } }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
.alt { background: var(--paper-2); }
.dark { background: var(--ink); color: var(--on-ink); }
.dark .lede, .dark .muted { color: var(--on-ink-muted); }
.dark .kicker { color: #5FD6C4; }
.dark a { color: #7FE3D3; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.muted { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 96px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--apple); }
.hero h1 .east { color: var(--east-deep); }
.hero-art { position: relative; min-height: 460px; }
.hero-art .tile { position: absolute; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.hero-art .tile.qm-tile { left: 0; top: 0; width: 80%; aspect-ratio: 16 / 10; border: 0; transform: rotate(-3deg); }
.hero-art .tile.prep-tile { right: 0; bottom: 0; width: 66%; transform: rotate(2.5deg); box-shadow: 0 18px 40px -18px rgba(15,27,45,.35); }
.hero-sun {
  position: absolute; right: -140px; top: -160px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,184,61,.32), rgba(245,184,61,0) 65%);
  pointer-events: none;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { min-height: 0; aspect-ratio: 5 / 4; max-width: 560px; }
}

/* ---------- Mini product art ---------- */
.mini-sheet { padding: 18px; font-family: var(--f-body); }
.mini-sheet .bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mini-sheet .bar b { font-family: var(--f-display); font-size: 1.05rem; letter-spacing: -0.02em; }
.mini-sheet .tabs { display: flex; gap: 6px; }
.mini-sheet .tabs span { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--paper-2); color: var(--muted); }
.mini-sheet .tabs span.on { background: var(--ink); color: var(--on-ink); }
.mini-sheet .row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .86rem; }
.mini-sheet .row .t { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-family: var(--f-mono); font-size: .66rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; }
.pill.e { background: #DDF0E6; color: #1B5E40; }
.pill.m { background: #F8EDCF; color: #6E4C00; }
.pill.h { background: #F6DFDA; color: #9A2F21; }
.pill.pdf { background: var(--paper-2); color: var(--ink-3); }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; position: relative;
}
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  margin-bottom: 18px; background: var(--east-soft); color: var(--east-deep);
}
.card .icon svg { width: 26px; height: 26px; }
.card .icon.red { background: #FCE3E3; color: var(--apple-deep); }
.card .icon.gold { background: #FDF0D2; color: #8A5B00; }
.dark .card { background: var(--ink-2); border-color: var(--ink-3); }

/* ---------- Product feature ---------- */
.product {
  display: grid; grid-template-columns: 1fr 1fr; border-radius: 32px; overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
}
.product + .product { margin-top: 28px; }
.product .art { min-height: 360px; position: relative; }
.product .art svg { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.product .body { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.product .body h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.product.qm { background: var(--qm-indigo); color: var(--qm-cream); border: 0; }
.product.qm .kicker { color: var(--qm-gold); }
.product.qm .muted { color: #C8C6DD; }
.product.prep .art { background: var(--paper-2); display: grid; place-items: center; padding: 32px; }
.product.prep .art .mini-sheet { background: var(--card); border-radius: 20px; border: 1px solid var(--line); width: 100%; max-width: 420px; position: static; }
@media (max-width: 860px) {
  .product { grid-template-columns: 1fr; }
  .product .art { min-height: 0; aspect-ratio: 16 / 10; }
  .product.prep .art { aspect-ratio: auto; }
  .product .body { padding: 32px 26px; }
}
.ticks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 4px; border-radius: 50%;
  background: var(--east) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.product.qm .ticks li::before { background-color: var(--qm-orange); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.page-hero.qm-hero { background: var(--qm-indigo); color: var(--qm-cream); border: 0; padding: 0; overflow: hidden; }
.qm-hero .grid { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; min-height: 520px; }
.qm-hero .copy { padding: 80px 24px 80px 0; display: flex; flex-direction: column; justify-content: center; }
.qm-hero .kicker { color: var(--qm-gold); }
.qm-hero .lede { color: #D2D0E4; }
.qm-hero .art { position: relative; }
.qm-hero .art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 860px) {
  .qm-hero .grid { grid-template-columns: 1fr; min-height: 0; }
  .qm-hero .copy { padding: 56px 0 32px; }
  .qm-hero .art { aspect-ratio: 4 / 3; margin: 0 -24px; }
}

/* ---------- Steps / zones ---------- */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--qm-indigo); color: var(--qm-gold); font: 800 1.3rem var(--f-display); margin-bottom: 16px;
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

.zones { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--r-lg); overflow: hidden; }
.zones div { padding: 26px 22px; min-height: 180px; display: flex; flex-direction: column; justify-content: flex-end; }
.zones b { font-family: var(--f-display); font-size: 1.35rem; letter-spacing: -0.02em; display: block; margin-bottom: 4px; }
.zones span { font-size: .95rem; }
.z1 { background: var(--qm-forest); color: var(--qm-cream); }
.z2 { background: var(--qm-heather); color: var(--qm-cream); }
.z3 { background: var(--qm-ice); color: var(--qm-indigo); }
.z4 { background: var(--qm-gold); color: var(--qm-indigo); }
@media (max-width: 760px) { .zones { grid-template-columns: 1fr 1fr; } .zones div { min-height: 140px; } }

.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .price-row { grid-template-columns: 1fr; } }
.price { border-radius: var(--r-lg); padding: 32px; border: 2px solid var(--line); background: var(--card); }
.price.full { border-color: var(--qm-orange); }
.price .amt { font: 800 2.6rem/1 var(--f-display); letter-spacing: -0.03em; margin: 6px 0 14px; }
.price .amt small { font: 700 1rem var(--f-body); color: var(--muted); letter-spacing: 0; }

/* ---------- Callout / CTA band ---------- */
.cta-band { border-radius: 32px; padding: 56px; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band h2 { margin: 0 0 8px; }
.cta-band p { color: var(--on-ink-muted); margin: 0; max-width: 34em; }
.cta-band::after {
  content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(18,165,148,.35), transparent 65%);
}
.cta-band > * { position: relative; z-index: 1; }
@media (max-width: 640px) { .cta-band { padding: 36px 26px; } }

.note {
  border-left: 4px solid var(--sun); background: #FFF6E0; border-radius: 0 12px 12px 0;
  padding: 14px 18px; font-size: .95rem; margin-top: 18px;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.email-big { font: 800 clamp(1.5rem, 3.6vw, 2.4rem)/1.1 var(--f-display); letter-spacing: -0.03em; color: var(--ink); text-decoration: none; word-break: break-word; }
.email-big:hover { color: var(--east-deep); }
dl.facts { margin: 0; display: grid; gap: 18px; }
dl.facts dt { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
dl.facts dd { margin: 2px 0 0; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-muted); padding: 64px 0 40px; font-size: .95rem; }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { color: #7FE3D3; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.foot-grid h4 { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-ink-muted); font-weight: 600; margin-bottom: 14px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .brand { color: var(--on-ink); margin-bottom: 14px; }
.site-footer .wordmark span { color: #5FD6C4; }
.foot-base { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--ink-3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.lost { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.lost .big { font: 800 clamp(5rem, 16vw, 9rem)/1 var(--f-display); letter-spacing: -0.05em; color: var(--apple); margin-bottom: 8px; }

/* Illustrations that fill their panel */
.fill-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 600px) {
  .hero { padding: 48px 0 64px; }
  .hero-art { aspect-ratio: 1 / 1; }
  .hero-art .tile.qm-tile { width: 92%; }
  .hero-art .tile.prep-tile { width: 72%; }
  .hero-art .mini-sheet { padding: 14px; }
  .hero-art .mini-sheet .row:nth-of-type(n+5) { display: none; }
  .mini-sheet .bar b { white-space: nowrap; }
  .mini-sheet .row { font-size: .8rem; }
}
.btn[aria-disabled="true"] svg { display: none; }
