/* Layout: a dark-blue hero band, then alternating text/phone rows on the MKG doodle paper; the four-block app icon is the recurring device. */
:root {
  --navy: #2D2E83;
  --yellow: #FFCC00;
  --sky: #00A6D1;
  --green: #AFCA0B;
  --orange: #EF7D00;

  --bg: #ffffff;
  --paper: url("../img/pattern-light.jpg");
  --paper-fade: rgba(255,255,255,.86);
  --ink: #2D2E83;
  --text: #4a4b6e;
  --muted: #7a7b96;
  --surface: #eef0f7;
  --line: #dfe1ee;
  --band: #2D2E83;
  --band-ink: #ffffff;
  --phone: #1b1c4f;
  --link: #2D2E83;

  --f-title: "Caveat Brush", "Comic Sans MS", "Marker Felt", cursive;
  --f-text: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #23246a;
    --paper: url("../img/pattern-dark.jpg");
    --paper-fade: rgba(35,36,106,.82);
    --ink: #ffffff;
    --text: #d6d8f2;
    --muted: #a9abd6;
    --surface: #33358f;
    --line: #3d3f9a;
    --band: #1a1b55;
    --band-ink: #ffffff;
    --phone: #0f1038;
    --link: #7fd6ee;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #23246a;
  --paper: url("../img/pattern-dark.jpg");
  --paper-fade: rgba(35,36,106,.82);
  --ink: #ffffff;
  --text: #d6d8f2;
  --muted: #a9abd6;
  --surface: #33358f;
  --line: #3d3f9a;
  --band: #1a1b55;
  --band-ink: #ffffff;
  --phone: #0f1038;
  --link: #7fd6ee;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

html, body { margin: 0; }
img { max-width: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-text);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.6;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--band);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

h1, h2 { font-family: var(--f-title); font-weight: 400; color: var(--ink); line-height: 1.05; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(2.4rem, 5vw, 3.4rem); }
h3 { font-family: var(--f-text); font-weight: 800; color: var(--ink); font-size: 1.15rem; line-height: 1.3; margin: 0; }
p { margin: 0; }
a { color: var(--link); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.eyebrow { font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Top bar ---------- */
.top { background: var(--band); color: var(--band-ink); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.top img { width: 34px; height: 34px; border-radius: 9px; }
.top .name { font-family: var(--f-title); font-size: 1.9rem; line-height: 1; }
.top nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { color: var(--band-ink); text-decoration: none; font-weight: 800; font-size: .85rem; padding: 6px 10px; border-radius: 10px; opacity: .85; }
.top nav a:hover { background: rgba(255,255,255,.12); opacity: 1; }
@media (max-width: 640px) { .top nav { display: none; } }

/* ---------- Hero ---------- */
.hero { background: var(--band); color: var(--band-ink); overflow: hidden; position: relative; }
.hero::after { /* the four MKG blocks as a strip under the band */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: linear-gradient(90deg, var(--yellow) 0 25%, var(--sky) 25% 50%, var(--green) 50% 75%, var(--orange) 75%);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-block: 56px 0; }
.hero-copy { min-width: 0; padding-bottom: 56px; display: grid; gap: 22px; }
.hero h1 { color: var(--band-ink); font-size: clamp(4.2rem, 11vw, 7.5rem); }
.hero .tag { font-weight: 800; font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.25; color: #fff; text-wrap: balance; }
.hero .lede { color: #d6d8f2; max-width: 34em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-weight: 800; font-size: .8rem; padding: 6px 12px; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; }
.chip i { background: var(--c); font-style: normal; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; vertical-align: 0; }

.hero-phones { position: relative; min-width: 0; display: flex; justify-content: center; align-items: flex-end; gap: 0; height: 100%; }
.hero-phones .phone { width: min(250px, 44%); }
.hero-phones .phone:first-child { transform: translateY(40px) rotate(-4deg); margin-right: -26px; z-index: 1; }
.hero-phones .phone:last-child { transform: translateY(12px) rotate(3deg); z-index: 2; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 40px 0; }
  .hero-copy { padding-bottom: 8px; }
  .hero-phones { height: auto; padding-top: 8px; }
}

/* ---------- Phone frame ---------- */
.phone {
  background: var(--phone);
  border-radius: 34px;
  padding: 10px;
  box-shadow: 0 24px 50px -18px rgba(15,16,56,.55), 0 0 0 1px rgba(255,255,255,.06) inset;
  max-width: 100%;
}
.phone img { display: block; width: 100%; height: auto; border-radius: 25px; aspect-ratio: 750 / 1334; }
figure { margin: 0; }
figcaption { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 12px; }

/* ---------- Paper sections ---------- */
.paper { background-color: var(--bg); background-image: linear-gradient(var(--paper-fade), var(--paper-fade)), var(--paper); background-size: auto, 640px auto; }
section.block { padding-block: 88px; }
section.block + section.block { border-top: 1px solid var(--line); }

.intro { display: grid; gap: 14px; max-width: 46rem; margin-bottom: 44px; }
.intro p { font-size: 1.1rem; }

/* Steps: a real sequence, so numbered. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; align-content: start; gap: 10px; }
.steps li::before {
  content: counter(s);
  font-family: var(--f-title); font-size: 2rem; line-height: 1;
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: var(--c); color: var(--on);
}
.steps p { font-size: .95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* Feature rows: text beside a phone */
.row { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: center; }
.row.flip { grid-template-columns: 300px minmax(0, 1fr); }
.row.flip .row-copy { order: 2; }
.row-copy { min-width: 0; display: grid; gap: 18px; }
.row-copy > p { max-width: 36em; }
.row figure { justify-self: center; width: 100%; max-width: 300px; }
@media (max-width: 820px) {
  .row, .row.flip { grid-template-columns: 1fr; gap: 36px; }
  .row.flip .row-copy { order: 0; }
  .row figure { max-width: 270px; }
}

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.ticks li::before { content: ""; width: 18px; height: 18px; margin-top: 4px; border-radius: 5px; background: var(--c, var(--sky)); }
.ticks b { color: var(--ink); font-weight: 800; }

/* Cover-style comparison */
.styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.style-card { background: var(--surface); border-radius: 16px; padding: 20px; display: grid; gap: 12px; }
.style-card h3 { display: flex; align-items: center; gap: 10px; }
.meter { display: flex; gap: 6px; align-items: center; }
.meter span { flex: 1; height: 8px; border-radius: 4px; background: var(--line); }
.meter span.on { background: var(--sky); }
.meter small { font-weight: 800; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.smiley { width: 26px; height: 26px; flex: none; }
.blurdot { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, #e2b48f 0 35%, rgba(226,180,143,.4) 60%, transparent 72%); filter: blur(2px); flex: none; }
@media (max-width: 560px) { .styles { grid-template-columns: 1fr; } }

/* Privacy band */
.privacy { background: var(--green); color: var(--navy); }
.privacy .wrap { padding-block: 80px; display: grid; gap: 36px; }
.privacy h2 { color: var(--navy); }
.privacy .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.privacy h3 { color: var(--navy); margin-bottom: 6px; }
.privacy p { color: #2b2c5c; }
.mark { display: inline-block; font-weight: 800; font-size: .8rem; color: #fff; background: rgba(45,46,131,.88); padding: 4px 10px; border-radius: 6px; }
@media (max-width: 760px) { .privacy .grid { grid-template-columns: 1fr; } }

/* Looks: four phones */
.looks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 900px) { .looks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.looks .phone { border-radius: 26px; padding: 8px; }
.looks .phone img { border-radius: 19px; }

/* Platforms */
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plat { border: 2px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 8px; align-content: start; background: var(--bg); }
.plat .what { font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) { .platforms { grid-template-columns: 1fr; } }

footer { background: var(--band); color: #d6d8f2; }
footer .wrap { padding-block: 36px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; font-size: .9rem; }
footer .name { font-family: var(--f-title); font-size: 2rem; color: #fff; line-height: 1; display: flex; align-items: center; gap: 10px; }
footer img { width: 36px; height: 36px; border-radius: 9px; }
.note { font-size: .82rem; color: var(--muted); }

/* The four MKG block colours, as a colour (--c) and the ink that reads on it (--on). */
.is-yellow { --c: var(--yellow); --on: var(--navy); }
.is-sky    { --c: var(--sky);    --on: #fff; }
.is-green  { --c: var(--green);  --on: var(--navy); }
.is-orange { --c: var(--orange); --on: #fff; }
.is-navy   { --c: var(--navy);   --on: #fff; }
