/* Mathoo microsite — mathoo.itdcsystems.com
   Brand kit 1.0 (docs/UI_MATHOO_MOBILE_ADDENDUM.md): Spring teal, Yuzu, Deep water ink on Steam.
   Light and dark: the page follows the device's setting (prefers-color-scheme); there is no switch, so no script and no storage.
   Everything is self-hosted: no CDN, no third-party script, no cookie. */

@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/BricolageGrotesque-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/BricolageGrotesque-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: light dark;
  /* Brand constants: the same in light and dark (the teal blocks, the yuzu buttons and what is written on them). */
  --teal: #0B6E69;
  --teal-deep: #084F4C;
  --teal-100: #D7F0EC;
  --steam: #F2F9F7;
  --yuzu: #FFB01F;
  --yuzu-ink: #5C3600;
  --on-yuzu: #12302D;
  /* Roles: these change with the device's setting. Light values here, dark values in the block below. */
  --page: #F2F9F7;
  --surface: #FFFFFF;
  --panel: #12302D;
  --panel-rule: transparent;
  --frame: #12302D;
  --ink: #12302D;
  --ink-2: #3D5C58;
  --ink-3: #56716D;
  --rule: #D5E6E2;
  --rule-strong: #C3DAD5;
  --link: #0B6E69;
  --link-hover: #084F4C;
  --btn: #0B6E69;
  --btn-hover: #084F4C;
  --on-btn: #FFFFFF;
  --tonal: #D7F0EC;
  --on-tonal: #0B6E69;
  --on-tonal-strong: #084F4C;
  --accent-soft: #FFF1CF;
  --on-accent-soft: #5C3600;
  --on-accent-soft-2: #3D2A00;
  --alert-tint: #FBE5E1;
  --on-alert-tint: #8F271E;
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Dark mode: the app's own dark colours (src/Mathoo.Mobile/Resources/Styles/ColorsDark.xaml). */
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0E1F1D;
    --surface: #16302C;
    --panel: #16302C;
    --panel-rule: #2A4743;
    --frame: #2A4743;
    --ink: #E6F2EF;
    --ink-2: #A9C4BF;
    --ink-3: #8FAEA8;
    --rule: #2A4743;
    --rule-strong: #3B5D58;
    --link: #4FC2B8;
    --link-hover: #8ADBD3;
    --btn: #4FC2B8;
    --btn-hover: #6FD3CA;
    --on-btn: #06302D;
    --tonal: #1E4A45;
    --on-tonal: #4FC2B8;
    --on-tonal-strong: #8ADBD3;
    --accent-soft: #3A2E10;
    --on-accent-soft: #FFD98A;
    --on-accent-soft-2: #F1E2BD;
    --alert-tint: #3E1E1A;
    --on-alert-tint: #FF9A8B;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--yuzu); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); }
section[id], div[id] { scroll-margin-top: 24px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--page); padding: 12px 18px; border-radius: 999px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap--narrow { max-width: 820px; }
.section { padding-top: 96px; }
.section--tight { padding-top: 48px; }
.eyebrow { font-family: var(--body); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 15px; color: var(--link); }
.h2 { margin-top: 12px; font-weight: 800; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.08; max-width: 760px; }
.h3 { font-weight: 700; font-size: 30px; line-height: 1.15; }
.lead { margin-top: 16px; color: var(--ink-2); max-width: 560px; }
.lead + .lead { margin-top: 16px; }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-top: 20px; padding-bottom: 20px; }
.site-header .logo { display: flex; align-items: center; min-height: 44px; }
.site-header .logo img { height: 44px; width: auto; display: block; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-weight: 500; }
.nav a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.nav a:hover { color: var(--link); }
.nav a[aria-current="page"] { color: var(--link); font-weight: 700; }

/* Buttons */
.btn { display: inline-block; text-decoration: none; font-weight: 700; font-size: 17px; padding: 14px 22px; border-radius: 999px; line-height: 1.2; }
.btn--teal, .nav a.btn--teal { background: var(--btn); color: var(--on-btn); padding: 11px 22px; }
.btn--teal:hover, .nav a.btn--teal:hover { background: var(--btn-hover); color: var(--on-btn); }
.btn--yuzu { background: var(--yuzu); color: var(--on-yuzu); }
.btn--yuzu:hover { color: var(--on-yuzu); background: #F5A300; }
.btn--deep { background: var(--teal-deep); color: #fff; }
.btn--deep:hover { color: #fff; background: #063B39; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { background: var(--teal); color: #fff; border-radius: 40px; padding: 56px 48px 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 40px; overflow: hidden; }
.hero__text { flex: 999 1 420px; min-width: 0; padding-bottom: 56px; }
.hero .eyebrow { color: var(--teal-100); }
.hero h1 { margin-top: 16px; font-weight: 800; font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -0.01em; }
.hero__lead { margin-top: 24px; font-size: 21px; line-height: 1.5; color: var(--steam); max-width: 520px; }
.hero .btn-row { margin-top: 32px; }
.hero__art { flex: 1 1 360px; min-width: 0; display: flex; align-items: flex-end; justify-content: center; }
.hero__mascot { width: 190px; height: 190px; object-fit: contain; margin-right: -28px; margin-bottom: 8px; position: relative; z-index: 1; }

/* Phone frame around a real screenshot (720 × 1600; the emulator status bar is cropped off the top) */
.phone { width: 100%; max-width: 300px; aspect-ratio: 720 / 1460; border: 8px solid var(--frame); border-radius: 36px; overflow: hidden; background: var(--steam); margin: 0 auto; }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; display: block; }
.phone--peek { width: 270px; aspect-ratio: 720 / 1300; border-bottom: 0; border-radius: 36px 36px 0 0; margin: 0; flex: none; }
.phone--peek img { object-position: 50% 47%; }

/* At a glance */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding: 32px 0 0; list-style: none; margin: 0; }
.stat { min-width: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.stat__icon { flex: none; width: 48px; height: 48px; border-radius: 16px; background: var(--tonal); color: var(--on-tonal); display: grid; place-items: center; }
.stat__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat__icon svg .fill { fill: currentColor; stroke: none; }
.stat__text { min-width: 0; }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--link); }
.stat b small { font-size: 0.5em; font-weight: 700; margin-left: 3px; }
.stat__text span { display: block; margin-top: 8px; color: var(--ink-2); font-size: 16px; line-height: 1.4; }
/* The promise (nothing to pay, nothing to sign up for) is the one card in the accent colour. */
.stat--promise { background: var(--accent-soft); border-color: transparent; }
.stat--promise .stat__icon { background: var(--yuzu); color: var(--yuzu-ink); }
.stat--promise b { color: var(--on-accent-soft); }
.stat--promise .stat__text span { color: var(--on-accent-soft-2); }
/* Five cards never leave one alone on a row: three and two on a tablet, two and two and the promise across on a phone. */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(6, 1fr); }
  .stat { grid-column: span 2; }
  .stat:nth-child(n+4) { grid-column: span 3; }
}

/* Feature rows */
.feature { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 48px 72px; margin-top: 88px; }
.feature:first-of-type { margin-top: 56px; }
.feature--flip { flex-wrap: wrap-reverse; }
.feature__media { flex: 0 1 300px; }
.feature__text { flex: 0 1 560px; min-width: 0; }
.card-shot { width: 100%; max-width: 300px; display: block; margin: 0 auto; border-radius: 28px; border: 1px solid var(--rule); }

.checks { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.checks li { position: relative; padding-left: 36px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 24px; height: 24px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314693A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain; }
@media (prefers-color-scheme: dark) {
  .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236FD39A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
}

.chips { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; max-width: 600px; }
.chips li { background: var(--tonal); color: var(--on-tonal-strong); font-weight: 500; padding: 8px 16px; border-radius: 999px; }
.chips li.chip--life { background: var(--accent-soft); color: var(--on-accent-soft); }

/* Bands */
.band { border-radius: 40px; padding: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 32px 48px; }
.band__text { flex: 999 1 420px; min-width: 0; }
.band--yuzu { background: var(--accent-soft); }
.band--yuzu .eyebrow { color: var(--on-accent-soft); }
.band--yuzu .h2 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; }
.band--yuzu .lead { color: var(--on-accent-soft-2); max-width: 600px; }
.band__mascot { flex: 0 1 220px; width: 220px; height: 220px; object-fit: contain; margin: 0 auto; }
.band--ink { background: var(--panel); border: 1px solid var(--panel-rule); color: #fff; display: block; }
.band--ink .eyebrow { color: var(--yuzu); }
.band--ink .h2 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; }
.band--ink a { color: var(--yuzu); font-weight: 700; display: inline-block; padding: 10px 0; }
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px 32px; margin: 32px 0; }
.promises h3 { font-family: var(--body); font-size: 20px; font-weight: 700; }
.promises p { margin-top: 8px; color: var(--teal-100); }
.band--teal { background: var(--teal); color: #fff; padding: 56px 48px; }
.band--teal .lead { color: var(--steam); }
.band--teal .btn-row { margin-top: 28px; }
.band--teal .note { margin-top: 24px; color: var(--teal-100); font-size: 16px; }
.app-icon { width: 128px; height: 128px; border-radius: 28px; flex: none; }
.soon { cursor: default; }

/* Early-access download: how to install, and what to expect */
.early { margin-top: 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 32px; padding: 32px 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px 56px; }
.early h3 { font-weight: 700; font-size: 24px; }
.early ol, .early ul { margin: 12px 0 0; padding-left: 22px; color: var(--ink-2); display: flex; flex-direction: column; gap: 10px; }
.early strong { color: var(--ink); }
.hash { margin-top: 16px; color: var(--ink-3); font-size: 14px; }
.hash code { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }

/* Who it's for */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; margin-top: 48px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 32px; padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.card img { width: 120px; height: 120px; object-fit: contain; }
.card h3 { font-weight: 700; font-size: 26px; }
.card p { color: var(--ink-2); }
.card ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }

/* Questions */
.faq { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; padding: 12px 24px; }
.faq summary { font-weight: 700; font-size: 20px; cursor: pointer; padding: 8px 0; }
.faq p { margin-top: 4px; padding-bottom: 8px; color: var(--ink-2); }

/* About ITDC Systems */
.about { background: var(--surface); border: 1px solid var(--rule); border-radius: 32px; padding: 36px 40px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 56px; }
.about__text { flex: 999 1 380px; min-width: 0; }
/* The maker's logo sits beside its name, and above it when the name would not fit on one line (narrow phones). */
.about__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.about__brand img { flex: none; width: 60px; height: 65px; }
.about__brand div { flex: 1 1 232px; min-width: 0; }
.about__text h2 { margin-top: 8px; font-weight: 800; font-size: 32px; line-height: 1.1; }
.about__text .btn { margin-top: 20px; padding: 13px 24px; }
.contact { flex: 1 1 300px; min-width: 0; font-style: normal; display: flex; flex-direction: column; gap: 16px; }
.contact a { display: inline-block; padding: 8px 0; }
.contact p span { display: block; font-weight: 700; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }

/* Footer */
.site-footer { padding-top: 72px; padding-bottom: 48px; }
.site-footer__row { border-top: 1px solid var(--rule-strong); padding-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.made { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.made a { font-weight: 700; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.site-footer nav a { padding: 10px 0; }
.small { margin-top: 24px; color: var(--ink-3); font-size: 15px; }

/* Legal pages */
.legal { padding-top: 32px; line-height: 1.6; }
.legal h1 { margin-top: 12px; font-weight: 800; font-size: clamp(38px, 5vw, 56px); line-height: 1.05; }
.legal .intro { margin-top: 16px; color: var(--ink-2); }
.legal h2 { margin-top: 48px; font-weight: 700; font-size: 28px; line-height: 1.2; }
.legal h2 + p, .legal p + p, .legal ul + p, .legal p + ul, .legal p + address { margin-top: 12px; }
.legal ul { margin-bottom: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.summary { margin-top: 32px; border-radius: 32px; padding: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.summary > div { flex: 999 1 360px; min-width: 0; }
.summary h2 { margin-top: 0; font-weight: 800; font-size: 28px; line-height: 1.15; }
.summary p { margin-top: 12px; }
.summary img { flex: none; width: 130px; height: 130px; object-fit: contain; margin: 0 auto; }
.summary--teal { background: var(--teal); color: #fff; }
.summary--teal p { color: var(--steam); }
.summary--yuzu { background: var(--accent-soft); }
.summary--yuzu p { color: var(--on-accent-soft-2); }
.contact-card { font-style: normal; background: var(--surface); border: 1px solid var(--rule); border-radius: 24px; padding: 24px 28px; display: flex; flex-direction: column; gap: 8px; }
.contact-card strong { font-weight: 700; }

/* A decision still open before launch: shown loudly so it cannot ship by accident (see site/README.md). */
mark.todo { background: var(--alert-tint); color: var(--on-alert-tint); font-weight: 700; padding: 2px 8px; border-radius: 8px; }

@media (max-width: 720px) {
  body { font-size: 17px; }
  .section { padding-top: 72px; }
  .hero { padding: 40px 24px 0; border-radius: 32px; gap: 24px; }
  .hero__text { padding-bottom: 8px; }
  .hero__lead { font-size: 19px; }
  .hero__mascot { width: 130px; height: 130px; margin-right: -20px; }
  .phone--peek { width: 220px; }
  .band, .band--teal { padding: 32px 24px; border-radius: 32px; }
  .about, .early { padding: 28px 24px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat, .stat:nth-child(n+4) { grid-column: auto; padding: 18px; gap: 14px; }
  .stat b { font-size: 34px; }
  .stat.stat--promise { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 16px; }
  .card { padding: 24px; }
  .feature { gap: 32px; margin-top: 64px; }
  .h3 { font-size: 26px; }
  .nav { gap: 0 16px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .site-header .logo img { height: 36px; }
  /* The page is short enough to scroll on a phone: keep the header to the logo, Privacy and the app button. */
  .nav__more { display: none; }
}
