/* Wht Knight Software site styles. Colors are tokens: change them here, in both themes. */
/* Fonts are hosted here (SIL Open Font License; see fonts/OFL-*.txt), so visitors never contact Google. Latin subset. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("/fonts/space-grotesk-latin.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #ffffff; --alt: #ebf1fa; --card: #ffffff;
  --fg: #161a22; --muted: #3d4556; --faint: #4a5468;
  --line: #dbe3f0; --line2: #bfcbe0;
  --accent: #1f4fd8; --onaccent: #ffffff; --link: #1f4fd8;
  --hdr: #ffffff; --hdrfg: #161a22; --hdrline: #dbe3f0;
  --ph: #e2eaf7;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e131e; --alt: #131a29; --card: #1b2336;
  --fg: #e8ecf4; --muted: #a9b4c8; --faint: #8f9bb3;
  --line: #2a3348; --line2: #3a4560;
  --accent: #8cb4ff; --onaccent: #0a1a3a; --link: #8cb4ff;
  --hdr: #1d3b7a; --hdrfg: #ffffff; --hdrline: #1d3b7a;
  --ph: #222b40;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e131e; --alt: #131a29; --card: #1b2336;
    --fg: #e8ecf4; --muted: #a9b4c8; --faint: #8f9bb3;
    --line: #2a3348; --line2: #3a4560;
    --accent: #8cb4ff; --onaccent: #0a1a3a; --link: #8cb4ff;
    --hdr: #1d3b7a; --hdrfg: #ffffff; --hdrline: #1d3b7a;
    --ph: #222b40;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, .brand-name { font-family: "Space Grotesk", Inter, system-ui, sans-serif; }
h1, h2, h3, p { margin: 0; }
a { color: var(--link); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.accent { color: var(--accent); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--card); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header { background: var(--hdr); border-bottom: 1px solid var(--hdrline); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--hdrfg); text-decoration: none; }
.brand-name { font-weight: 700; font-size: 19px; }
.header-right { display: flex; align-items: center; gap: 20px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; font-weight: 500; }
.main-nav a { color: var(--hdrfg); text-decoration: none; padding: 8px 0; }
.main-nav a:hover { text-decoration: underline; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid var(--line2); background: transparent; color: var(--hdrfg); cursor: pointer; padding: 0;
}
:root[data-theme="dark"] .theme-toggle { border-color: rgba(255,255,255,0.35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle { border-color: rgba(255,255,255,0.35); } }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* Sections */
.band { background: var(--alt); }
.section { padding: 80px 0; }
.section > .wrap { display: flex; flex-direction: column; gap: 28px; }
.section-title { font-size: 34px; letter-spacing: -0.01em; line-height: 1.2; }

/* Home hero */
.hero { padding: 96px 0; text-align: center; }
.hero .wrap { max-width: 880px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.06; letter-spacing: -0.02em; }
.hero p { font-size: 19px; max-width: 600px; }

/* Project card */
.card { border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 36px; }
.project { display: flex; flex-wrap: wrap; align-items: center; gap: 36px; }
.project-main { flex: 1 1 440px; display: flex; flex-direction: column; gap: 14px; }
.project-head { display: flex; align-items: center; gap: 16px; }
.app-icon { flex: none; border-radius: 22%; display: block; }
.project h3 { font-size: 28px; line-height: 1.2; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tag { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: var(--alt); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--faint); }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.more { font-size: 15px; font-weight: 600; padding: 8px; }
.shot { flex: none; border-radius: 18px; border: 1px solid var(--line); background: var(--ph); display: block; }
.shot-placeholder { flex: none; width: 150px; height: 310px; border-radius: 18px; border: 2px dashed var(--line2); background: var(--ph); }

/* Official store badges. Google's PNG has built-in clear space, so it's drawn taller to match Apple's. */
.badge { display: inline-block; line-height: 0; }
.badge img { display: block; width: auto; }
.badge-google img { height: 70px; margin: -9px -9px; }
.badge-apple img { height: 52px; }

/* Teaser */
.teaser { border: 1px dashed var(--line2); border-radius: 20px; padding: 32px; background: var(--alt); display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.section.band .teaser { background: var(--card); }
.teaser-mark { flex: none; width: 72px; height: 72px; border-radius: 18px; border: 2px dashed var(--line2); display: flex; align-items: center; justify-content: center; color: var(--faint); }
.teaser-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; }
.teaser h3 { font-size: 24px; }

/* Support + privacy */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.duo .card { padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.duo h2 { font-size: 30px; }
.reveal { font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--faint); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: var(--faint); }

/* App page */
.crumb { font-size: 15px; color: var(--faint); }
.crumb a { color: var(--faint); }
.app-hero { padding: 40px 0 80px; }
.app-hero .wrap { display: flex; flex-direction: column; gap: 28px; }
.app-hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.app-hero-main { flex: 1 1 480px; display: flex; flex-direction: column; gap: 20px; }
.app-hero h1 { font-size: clamp(40px, 6vw, 52px); line-height: 1; }
.tagline { font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(22px, 3vw, 28px); line-height: 1.25; font-weight: 500; }
.app-hero-shot { flex: 0 1 260px; display: flex; justify-content: center; }
.examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.example { border-radius: 16px; background: var(--card); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.calc { margin-top: auto; border-radius: 10px; background: var(--alt); border: 1px solid var(--line); padding: 14px 16px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.calc b { font-weight: 700; }
.note { font-size: 14px; color: var(--faint); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px 40px; }
.features h3 { font-size: 20px; margin-bottom: 6px; }
.shots { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; }
.faq div { padding: 22px 0; border-top: 1px solid var(--line); }
.faq h3 { font-size: 20px; margin-bottom: 6px; }

/* Policy page */
.doc-head { padding: 64px 0 56px; }
.doc-head .wrap { display: flex; flex-direction: column; gap: 12px; }
.doc-head h1 { font-size: clamp(38px, 6vw, 52px); letter-spacing: -0.02em; line-height: 1.1; }
.doc { padding: 56px 0 88px; }
.doc .wrap { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.toc { flex: 0 0 220px; position: sticky; top: 24px; display: flex; flex-direction: column; font-size: 15px; border-left: 2px solid var(--line); padding-left: 16px; }
.toc-title { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.toc a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.toc a:hover { color: var(--link); }
.doc-body { flex: 1 1 520px; max-width: 720px; display: flex; flex-direction: column; gap: 40px; }
.doc-body section { scroll-margin-top: 24px; display: flex; flex-direction: column; gap: 12px; color: var(--muted); }
.doc-body h2 { font-size: 26px; color: var(--fg); }
.doc-body p, .doc-body ul { margin: 0; }
.doc-body ul { padding-left: 20px; }
.doc-body strong { color: var(--fg); }
.summary { border-radius: 16px; background: var(--alt); border: 1px solid var(--line); padding: 28px 32px; display: flex; flex-direction: column; gap: 10px; }
.summary h2 { font-size: 22px; }
@media (max-width: 820px) { .toc { position: static; flex-basis: 100%; } }

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .section { padding: 56px 0; }
  .hero { padding: 64px 0; }
  .card, .teaser { padding: 24px; }
  .header-right { width: 100%; justify-content: space-between; }
}

/* 404 */
.lost-knight { max-width: 100%; height: auto; }
.lost-knight .sq-l { fill: var(--card); stroke: var(--line); }
.lost-knight .sq-d { fill: var(--line2); }
.lost-knight .lk-path { stroke: var(--accent); }
.lost-knight .lk-q { fill: var(--accent); font: 700 24px "Space Grotesk", sans-serif; }
.lost-knight .lk-knight { stroke: var(--fg); }
@media (prefers-reduced-motion: no-preference) {
  .lost-knight .lk-path { animation: lk-march 1.6s linear infinite; }
  @keyframes lk-march { to { stroke-dashoffset: -26; } }
}
.nf[hidden] { display: none; }
.nf-display { width: min(420px, 100%); border-radius: 18px; background: #000; padding: 22px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; box-shadow: 0 16px 40px rgba(10, 14, 30, 0.25); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: clamp(20px, 4vw, 26px); }
.nf-entry { color: #9fb3d9; }
.nf-result { color: #ffffff; font-weight: 700; align-self: flex-end; }
