/* Miauw website. Colours and type follow docs/brand/LOGO.md and the app (Geist). */

@font-face { font-family: "Geist"; src: url("../fonts/geist_regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist_medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist_semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist_bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ginger: #C9661F;
  --ginger-light: #E8904A;
  --ginger-deep: #A9521A;
  --cream: #FFF1DC;
  --night: #24180F;
  --night-2: #2F2116;
  --night-3: #3B2A1D;

  --bg: #FBF6EE;
  --surface: #FFFFFF;
  --surface-2: #F4ECDF;
  --text: #1F1B16;
  --muted: #6B5E50;
  --line: #E6DBCB;
  --accent: #B5581A;          /* ginger darkened for 4.5:1 text on --bg */
  --accent-strong: var(--ginger);

  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(36, 24, 15, .06), 0 8px 24px rgba(36, 24, 15, .08);
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  /* One vertical rhythm: every section gets the same space, and the gaps inside follow from it. */
  --section-y: clamp(56px, 7vw, 96px);
  --head-gap: clamp(28px, 4vw, 48px);
  --block-gap: clamp(24px, 3vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A120C;
    --surface: #24180F;
    --surface-2: #2F2116;
    --text: #F6EBDD;
    --muted: #BDAA95;
    --line: #3B2A1D;
    --accent: #E8904A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "kern", "liga", "calt";
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ginger-deep); }
@media (prefers-color-scheme: dark) { a:hover { color: var(--cream); } }
:focus-visible { outline: 3px solid var(--ginger-light); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
p, li { text-wrap: pretty; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .9rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 40em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--night) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(255, 241, 220, .08);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-weight: 700; letter-spacing: .18em; font-size: .95rem; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand:hover { color: var(--cream); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: rgba(255, 241, 220, .78); text-decoration: none; font-size: .95rem; font-weight: 500; padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--cream); background: rgba(255, 241, 220, .08); }
.nav .btn { margin-left: 8px; }
@media (max-width: 1000px) {
  .nav a[href="/#themes"], .nav a[href="/privacy/"] { display: none; }
}
@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 1rem/1 "Geist", system-ui, sans-serif; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ginger); color: #fff; }
.btn-primary:hover { background: var(--ginger-deep); color: #fff; }
.btn-ghost { color: var(--cream); border-color: rgba(255, 241, 220, .28); }
.btn-ghost:hover { color: var(--cream); background: rgba(255, 241, 220, .08); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.btn svg { width: 20px; height: 20px; flex: none; }
.nav .btn-primary, .nav .btn-primary:hover { color: #fff; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(232, 144, 74, .22), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(201, 102, 31, .18), transparent 60%),
    var(--night);
  color: var(--cream);
  padding: clamp(56px, 9vw, 112px) 0 clamp(48px, 7vw, 96px);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { color: var(--cream); }
.hero h1 span { color: var(--ginger-light); }
.hero .lead { color: rgba(255, 241, 220, .78); }
.hero .eyebrow { color: var(--ginger-light); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; color: rgba(255, 241, 220, .72); font-size: .95rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: var(--ginger-light); }
.hero-art { position: relative; min-height: 520px; }
.device-tv {
  position: absolute; right: -6%; top: 6%; width: 108%;
  border-radius: 14px; overflow: hidden; border: 6px solid #0E0A07;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5); opacity: .9;
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; aspect-ratio: 16 / 12; }
}

/* Value strip */
.strip { background: var(--night-2); color: var(--cream); border-top: 1px solid rgba(255, 241, 220, .06); }
.strip ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; list-style: none; margin: 0; padding: 0; }
.strip li { padding: 22px 16px; text-align: center; font-weight: 600; font-size: .98rem; border-left: 1px solid rgba(255, 241, 220, .08); }
.strip li:first-child { border-left: 0; }
.strip small { display: block; font-weight: 400; color: rgba(255, 241, 220, .62); font-size: .85rem; margin-top: 2px; }
@media (max-width: 760px) {
  .strip ul { grid-template-columns: repeat(2, 1fr); }
  .strip li:nth-child(3) { border-left: 0; }
  .strip li:nth-child(n+3) { border-top: 1px solid rgba(255, 241, 220, .08); }
}

/* Sections */
section { padding: var(--section-y) 0; }
.section-head { max-width: 720px; margin-bottom: var(--head-gap); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.alt { background: var(--surface-2); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ginger) 14%, transparent); color: var(--accent); margin-bottom: 18px;
}
.icon svg { width: 24px; height: 24px; }

/* Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split, .split.reverse { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.checks svg { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.checks strong { display: block; }
.checks span { color: var(--muted); font-size: .97rem; }

/* TV */
.tv { background: var(--night); color: var(--cream); }
.tv .lead, .tv .checks span { color: rgba(255, 241, 220, .72); }
.tv .eyebrow, .tv .checks svg { color: var(--ginger-light); }
/* Two screenshots per view, scrolled sideways. */
.tv-grid {
  --gap: clamp(18px, 2.4vw, 28px);
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - var(--gap)) / 2); gap: var(--gap);
  margin-top: var(--head-gap); padding: 4px 4px 18px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: rgba(255, 241, 220, .3) transparent;
}
.tv-grid figure { margin: 0; scroll-snap-align: start; }
.tv-grid figcaption { margin-top: 12px; font-size: .95rem; font-weight: 600; color: rgba(255, 241, 220, .8); }
.tv-grid::-webkit-scrollbar { height: 8px; }
.tv-grid::-webkit-scrollbar-thumb { background: rgba(255, 241, 220, .25); border-radius: 999px; }
.tv-hint { margin: 10px 0 0; font-size: .88rem; color: rgba(255, 241, 220, .55); }
@media (max-width: 600px) { .tv-grid { grid-auto-columns: 86%; } }
/* TV frame: a thin bezel with a slim rim, like a current flat TV. */
.tv-frame { padding: .7%; border-radius: 10px; background: #050505; box-shadow: 0 0 0 1px #34302C, 0 18px 40px -14px rgba(0, 0, 0, .7); }
.tv-frame img { width: 100%; border-radius: 4px; }
.tv-frame-lg { padding: .9%; border-radius: 12px; box-shadow: 0 0 0 1px #34302C, 0 30px 70px -20px rgba(0, 0, 0, .8); }

/* Privacy band */
.privacy-band { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 36px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.privacy-band .icon { margin: 0; width: 64px; height: 64px; border-radius: 18px; }
.privacy-band .icon svg { width: 32px; height: 32px; }
.privacy-band h2 { font-size: 1.6rem; margin-bottom: .3em; }
.privacy-band p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .privacy-band { grid-template-columns: 1fr; text-align: left; } }

 /* CTA: a night panel with the copy on the left and the Miauw mark on the right. */
.cta {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 40px;
  padding: clamp(36px, 5vw, 64px) clamp(24px, 5vw, 72px); border-radius: var(--radius-lg); color: var(--cream);
  background: radial-gradient(600px 360px at 85% 50%, rgba(232, 144, 74, .22), transparent 70%), var(--night);
  box-shadow: 0 0 0 1px rgba(255, 241, 220, .06), var(--shadow);
}
.cta .eyebrow { color: var(--ginger-light); }
.cta h2 { color: var(--cream); margin-bottom: .35em; }
.cta-copy > p:not(.eyebrow) { color: rgba(255, 241, 220, .75); max-width: 30em; margin: 0; font-size: 1.08rem; }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 28px; }
.cta-link { color: var(--ginger-light); font-weight: 600; text-decoration: none; }
.cta-link:hover { color: var(--cream); text-decoration: underline; }
.cta-mark { width: 100%; max-width: 260px; justify-self: center; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35)); }
@media (max-width: 760px) {
  .cta { grid-template-columns: 1fr; text-align: left; }
  .cta-mark { position: absolute; right: -40px; bottom: -30px; width: 200px; opacity: .14; filter: none; }
}

/* Document pages (privacy, support, releases) */
.page-hero { background: var(--night); color: var(--cream); padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--cream); }
.page-hero p { color: rgba(255, 241, 220, .75); margin: 0; max-width: 42em; }
.page-hero .eyebrow { color: var(--ginger-light); }
.doc { padding: clamp(40px, 6vw, 72px) 0; }
.doc .wrap { max-width: 820px; }
.doc h2 { font-size: 1.5rem; margin-top: 2.2em; padding-top: .2em; scroll-margin-top: 84px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin-top: 1.6em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: .35em 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: .95rem; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 600; background: var(--surface-2); }
.doc .meta { color: var(--muted); font-size: .95rem; }
.summary { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ginger); border-radius: 12px; padding: 20px 22px; margin: 0 0 2em; }
.summary p:last-child { margin: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 2em; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: .9rem; }
.toc a:hover { background: var(--line); color: var(--text); }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin: 0 0 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 20px 18px; color: var(--muted); }
.faq .answer p:last-child { margin: 0; }
.contact-card { margin-top: 40px; }

/* Releases */
.release { position: relative; padding: 0 0 36px 28px; border-left: 2px solid var(--line); margin-left: 6px; }
.release::before { content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ginger); }
.release:last-child { padding-bottom: 0; }
.release h2 { margin: 0 0 .2em; font-size: 1.35rem; padding: 0; }
.release time { color: var(--muted); font-size: .92rem; }
.release ul { margin: .8em 0 0; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--ginger); padding: 3px 9px; border-radius: 999px; vertical-align: middle; margin-left: 8px; }

/* Footer */
.site-footer { background: var(--night); color: rgba(255, 241, 220, .7); padding: clamp(48px, 6vw, 64px) 0 32px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: var(--cream); font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.site-footer li a { display: inline-block; padding: 6px 0; }
.site-footer a { color: rgba(255, 241, 220, .8); text-decoration: none; }
.site-footer a:hover { color: var(--cream); text-decoration: underline; }
.site-footer .brand { margin-bottom: 14px; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 241, 220, .1); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .88rem; color: rgba(255, 241, 220, .55); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.page-hero a { color: var(--ginger-light); }
.page-hero a:hover { color: var(--cream); }

/* Phone frame: a flat 19.5:9 phone with a slim metal rim, thin even bezels and a punch-hole camera centred on the
   status bar row. The screenshots carry a status bar padded like a real phone's (tools/website/screenshots.py), so
   the rounded corners never cut into it. */
.phone {
  position: relative; width: 100%;
  padding: 2%; border-radius: 9.6% / 4.45%;
  background: #08080A;
  box-shadow:
    0 0 0 1px #3A3A40,                 /* metal rim */
    0 0 0 2.5px #121214,
    0 2px 4px rgba(20, 12, 6, .18),
    0 22px 50px -12px rgba(20, 12, 6, .45);
}
.phone .screen {
  position: relative; aspect-ratio: 1080 / 2340; overflow: hidden;
  border-radius: 7.6% / 3.5%; background: #000;
}
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone .screen::after { /* front camera, on the status bar row (y 42 of 2340) */
  content: ""; position: absolute; z-index: 2; left: 50%; top: 1.795%; width: 3.3%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #1d2633 0 22%, #000 46%);
}

/* Theme switcher: radio buttons drive which screenshot shows, so it needs no JavaScript. */
.themer { position: relative; text-align: center; }
.theme-stage { text-align: left; }
.themer input { position: absolute; opacity: 0; pointer-events: none; }
.theme-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.theme-chips label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .95rem; color: var(--muted); transition: background-color .3s ease, color .3s ease; user-select: none; }
.theme-chips label:hover { color: var(--text); }
.theme-chips .swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); }
.swatch.light { background: #F0E6CD; } .swatch.dark { background: #0B1014; } .swatch.eink { background: #F1EFE8; box-shadow: inset 0 0 0 3px #F1EFE8, inset 0 0 0 5px #111; } .swatch.einkdark { background: #111; box-shadow: inset 0 0 0 3px #111, inset 0 0 0 5px #EEE; }
#t-light:checked ~ .theme-chips [for="t-light"],
#t-dark:checked ~ .theme-chips [for="t-dark"],
#t-eink:checked ~ .theme-chips [for="t-eink"],
#t-einkdark:checked ~ .theme-chips [for="t-einkdark"] { background: var(--ginger); color: #fff; }
#t-light:focus-visible ~ .theme-chips [for="t-light"],
#t-dark:focus-visible ~ .theme-chips [for="t-dark"],
#t-eink:focus-visible ~ .theme-chips [for="t-eink"],
#t-einkdark:focus-visible ~ .theme-chips [for="t-einkdark"] { outline: 3px solid var(--ginger-light); outline-offset: 2px; }

.theme-stage {
  margin-top: var(--block-gap); padding: clamp(28px, 4vw, 48px) clamp(16px, 4vw, 48px); border-radius: var(--radius-lg);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2.4vw, 32px); align-items: start;
  background: #E9DFC6; transition: background-color .7s ease;
}
.theme-stage figure { margin: 0; }
.theme-stage figure:nth-child(even) { margin-top: 48px; }
.theme-stage figcaption { margin-top: 14px; text-align: center; font-size: .9rem; font-weight: 600; color: #4E4336; transition: color .7s ease; }
.theme-stage .screen img { opacity: 0; transform: scale(1.02); transition: opacity .6s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.theme-stage figure:nth-child(2) .screen img { transition-delay: .06s; }
.theme-stage figure:nth-child(3) .screen img { transition-delay: .12s; }
.theme-stage figure:nth-child(4) .screen img { transition-delay: .18s; }
#t-light:checked ~ .theme-stage .t-light,
#t-dark:checked ~ .theme-stage .t-dark,
#t-eink:checked ~ .theme-stage .t-eink,
#t-einkdark:checked ~ .theme-stage .t-einkdark { opacity: 1; transform: none; }
#t-dark:checked ~ .theme-stage { background: #0E1418; }
#t-eink:checked ~ .theme-stage { background: #DEDCD4; }
#t-einkdark:checked ~ .theme-stage { background: #1A1A1A; }
#t-dark:checked ~ .theme-stage figcaption, #t-einkdark:checked ~ .theme-stage figcaption { color: #D9D2C6; }
@media (max-width: 900px) {
  .theme-stage { grid-template-columns: repeat(2, 1fr); }
  .theme-stage figure:nth-child(even) { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-stage, .theme-stage figcaption, .theme-stage .screen img { transition: none; }
}

/* Hero and feature phones use the frame too. */
.hero-art .phone { position: absolute; left: 2%; bottom: -2%; width: 40%; }
.shot-phone-frame { max-width: 320px; margin: 0 auto; }

/* Screenshot viewer (assets/js/lightbox.js) */
a.zoom { display: block; cursor: zoom-in; border-radius: inherit; }
a.zoom:focus-visible { outline-offset: 4px; }
html.lb-open { overflow: hidden; }
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(10, 7, 5, .94); color: var(--cream); overflow: hidden;
}
.lightbox::backdrop { background: rgba(10, 7, 5, .6); }
.lightbox[open] { animation: lb-in .25s ease; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; grid-template-rows: 100%; height: 100%;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-width: none;
}
.lb-track::-webkit-scrollbar { display: none; }
.lb-track:focus { outline: none; }
.lb-slide { margin: 0; min-width: 0; min-height: 0; height: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 72px clamp(16px, 7vw, 96px) 112px; scroll-snap-align: center; }
/* Fit the whole screenshot in the space left by the buttons and caption, centred both ways. */
.lb-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 0 0 1px #34302C, 0 30px 80px rgba(0, 0, 0, .6); cursor: default; }
.lb-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: baseline; gap: 16px; padding: 18px var(--gutter) 26px; pointer-events: none; }
.lb-caption { margin: 0; font-weight: 600; }
.lb-count { color: rgba(255, 241, 220, .6); font-size: .92rem; font-variant-numeric: tabular-nums; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255, 241, 220, .2); background: rgba(36, 24, 15, .7); color: var(--cream); cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease;
}
.lb-btn:hover { background: var(--ginger); border-color: var(--ginger); }
.lb-btn:disabled { opacity: .3; pointer-events: none; }
.lb-btn svg { width: 26px; height: 26px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: clamp(8px, 2vw, 24px); }
.lb-next { right: clamp(8px, 2vw, 24px); }
.lb-close { top: 16px; right: 16px; }
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
  .lb-slide { padding: 64px 12px 84px; }
  .lb-bar { bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } }
.lb-phone img { border-radius: clamp(18px, 3.4vh, 40px); }
a.zoom .phone { transition: transform .25s ease; }
a.zoom:hover .phone { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { a.zoom .phone { transition: none; } }

/* "And much more" */
.more-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
.more-list li { padding: 18px 0 18px 30px; border-top: 1px solid var(--line); position: relative; }
.more-list li::before { content: ""; position: absolute; left: 4px; top: 25px; width: 10px; height: 10px; border-radius: 50%; background: var(--ginger); }
.more-list strong { display: block; font-weight: 600; }
.more-list span { color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .more-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .more-list { grid-template-columns: 1fr; } }

/* Android Auto */
.car-frame { padding: 1.4%; border-radius: 22px; background: linear-gradient(160deg, #1b1b1d, #050505 60%); box-shadow: 0 0 0 1px #2E2B28, 0 18px 40px -16px rgba(20, 12, 6, .55); }
.car-frame img { width: 100%; border-radius: 16px; }
.car-frame-lg { max-width: 520px; margin-left: auto; box-shadow: 0 0 0 1px #2E2B28, 0 30px 70px -24px rgba(20, 12, 6, .6); }
.auto-grid { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
.shots-light figcaption { color: var(--text); }
.shots-light { scrollbar-color: var(--line) transparent; }
.shots-light::-webkit-scrollbar-thumb { background: var(--line); }
#auto .tv-hint { color: var(--muted); }
@media (max-width: 900px) { .auto-grid { grid-auto-columns: calc((100% - var(--gap)) / 2); } .car-frame-lg { margin: 0 auto; } }
@media (max-width: 600px) { .auto-grid { grid-auto-columns: 72%; } }
.grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 780px; margin: 0 auto; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
.lb-car img { border-radius: 20px; }

/* The hero and the strip under it fit the first screen, whatever its height. */
.first-screen { display: flex; flex-direction: column; min-height: calc(100svh - 64px); }
.first-screen .hero { flex: 1; display: flex; align-items: center; padding: clamp(24px, 6vh, 96px) 0; }
.first-screen .hero h1 { font-size: clamp(2.2rem, min(6vw, 8vh), 4.2rem); }
.first-screen .hero .lead { font-size: clamp(1rem, min(1.6vw, 2.3vh), 1.25rem); }
.first-screen .hero-actions { margin: clamp(16px, 3vh, 28px) 0 clamp(12px, 2.4vh, 22px); }
.first-screen .hero .eyebrow { margin-bottom: clamp(.4rem, 1.4vh, .9rem); }
.first-screen .hero-art { min-height: clamp(300px, 54vh, 520px); }
.first-screen .strip li { padding: clamp(12px, 2.2vh, 22px) 16px; }
@media (max-width: 900px) { .first-screen { min-height: 0; } .first-screen .hero-art { min-height: 0; } }

/* Official Google Play badge (unchanged, from play.google.com/intl/en_us/badges), with clear space around it. */
.play-badge { display: inline-block; line-height: 0; border-radius: 9px; transition: transform .15s ease; }
.play-badge:hover { transform: translateY(-1px); }
.play-badge img { width: auto; height: 56px; }
.hero-actions { align-items: center; gap: 16px; }

/* Back to top: the logo's rounded bars stepped into an upward chevron (docs/brand/icons/to-top.svg). */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 40;
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ginger); color: var(--cream); box-shadow: 0 8px 24px rgba(36, 24, 15, .3), 0 0 0 1px rgba(255, 241, 220, .12);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .15s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--ginger-deep); color: var(--cream); }
.to-top svg { width: 26px; height: auto; transition: transform .2s ease; }
.to-top:hover svg { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .to-top, .to-top svg { transition: none; } }

/* Theme chips: two by two on narrow screens instead of a ragged wrap. */
@media (max-width: 520px) {
  .theme-chips { display: grid; grid-template-columns: repeat(2, 1fr); border-radius: 26px; width: 100%; max-width: 360px; }
  .theme-chips label { justify-content: center; }
}

/* Jumps from the menu land below the sticky header. */
section[id] { scroll-margin-top: 64px; }
.closing .cta { margin-top: var(--block-gap); }

/* Blogdoang, the developer's mark (docs/brand/blogdoang) */
.site-footer .with-icon { display: inline-flex; align-items: center; gap: 8px; }
.site-footer .with-icon img { border-radius: 5px; box-shadow: 0 0 0 1px rgba(255, 241, 220, .14); }
.made-by { display: inline-flex; align-items: center; gap: 8px; }
.made-by img { border-radius: 5px; box-shadow: 0 0 0 1px rgba(255, 241, 220, .14); }
.made-by a { color: inherit; }
