/* =============================================================================
   Kawan Labs — site stylesheet (1.3 redesign, "Kawan Studio")

   Design system (UI/UX Pro Max, verified for this product: an app studio catalog):
     style    Minimalism & Swiss Style — white space, hairline borders, grid-based, high contrast
     pattern  Hero + Features + CTA — split hero with a three-phone showcase, catalog, principles, contact
     type     Plus Jakarta Sans (single family, self-hosted variable font, OFL)
     colour   neutral slate base · one deep-blue brand accent · each app's colour only as a soft tint;
              light + dark: follows the OS by default, or the visitor's choice (System / Light / Dark)
              from <html data-theme>. Every text pair meets WCAG AA (4.5:1) in both.

   No JavaScript anywhere: the catalog filter is radio inputs + :has(); the theme switch is three links
   handled by nginx (cookie → data-theme); reveal motion is a CSS scroll-driven animation behind
   @supports and prefers-reduced-motion.
   ============================================================================= */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
}

/* ---------- Tokens ----------
   One source of truth per colour: light-dark(<light>, <dark>). Which side applies follows `color-scheme`:
     <html> without data-theme, or data-theme="system"  → color-scheme: light dark → the OS setting
     <html data-theme="light">                           → color-scheme: light
     <html data-theme="dark">                            → color-scheme: dark
   nginx writes data-theme from the kl_theme cookie (theme switch in the header, no JavaScript).
   Browsers without light-dark() get the light palette from the fallback block below (kept equal by a test). */
:root {
  color-scheme: light dark;
  /* Surfaces */
  --bg: light-dark(#ffffff, #0b1120);
  --bg-soft: light-dark(#f8fafc, #0e1628);
  --surface: light-dark(#ffffff, #111a2e);
  --surface-2: light-dark(#f8fafc, #142038);
  --border: light-dark(#e2e8f0, #1e2b42);
  --border-strong: light-dark(#cbd5e1, #334155);
  --header-bg: light-dark(rgb(255 255 255 / 0.85), rgb(11 17 32 / 0.85));
  --grid-line: light-dark(rgb(15 23 42 / 0.06), rgb(148 163 184 / 0.08));
  /* Text */
  --fg: light-dark(#0f172a, #e2e8f0);
  --muted: light-dark(#475569, #a3b1c6);
  /* Brand */
  --primary: light-dark(#1d4ed8, #2563eb);
  --primary-hover: light-dark(#1e40af, #1d4ed8);
  --on-primary: #ffffff;
  --primary-text: light-dark(#1d4ed8, #93c5fd);
  --link: light-dark(#1d4ed8, #93c5fd);
  --link-hover: light-dark(#1e40af, #bfdbfe);
  --primary-soft: light-dark(#eff6ff, #172554);
  --primary-soft-fg: light-dark(#1e40af, #bfdbfe);
  --glow: light-dark(rgb(37 99 235 / 0.14), rgb(59 130 246 / 0.22));
  /* Dark panels (contact band) */
  --ink: light-dark(#0b1220, #101b33);
  --ink-border: light-dark(#0b1220, #24324d);
  --on-ink: light-dark(#f8fafc, #f1f5f9);
  --on-ink-muted: #cbd5e1;
  --bezel: light-dark(#0f172a, #020617);
  --ring: light-dark(#2563eb, #60a5fa);
  /* Logo tile outline: invisible on white, a hairline on dark so the blue square keeps its edge */
  --mark-ring: light-dark(rgb(15 23 42 / 0), rgb(191 219 254 / 0.32));
  /* Status */
  --ok: light-dark(#047857, #6ee7b7);
  --ok-soft: light-dark(#ecfdf5, #062e25);
  --dev: light-dark(#334155, #cbd5e1);
  --dev-soft: light-dark(#f1f5f9, #1e293b);
  /* Shape & depth */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --shadow-sm: 0 1px 2px light-dark(rgb(15 23 42 / 0.05), rgb(0 0 0 / 0.4));
  --shadow-md: 0 1px 3px light-dark(rgb(15 23 42 / 0.06), rgb(0 0 0 / 0.4)), 0 12px 32px -8px light-dark(rgb(15 23 42 / 0.12), rgb(0 0 0 / 0.5));
  --shadow-lg: 0 2px 6px light-dark(rgb(15 23 42 / 0.08), rgb(0 0 0 / 0.45)), 0 32px 64px -16px light-dark(rgb(15 23 42 / 0.28), rgb(0 0 0 / 0.7));
  /* Type */
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  /* Layout & motion */
  --header-h: 68px;
  --sticky-offset: var(--header-h); /* room taken by the sticky header (0 where the header scrolls away) */
  --gap: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --accent: var(--primary);
}
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }

/* Accent scope: an element that sets --accent inline (an app) derives its own soft tints here.
   App colours are only used as backgrounds and borders, never as text, so contrast never depends on them. */
:root,
[style*='--accent'] {
  --accent-tint: light-dark(color-mix(in srgb, var(--accent) 9%, var(--surface-2)), color-mix(in srgb, var(--accent) 14%, var(--surface)));
  --accent-soft: light-dark(color-mix(in srgb, var(--accent) 16%, var(--surface)), color-mix(in srgb, var(--accent) 24%, var(--surface)));
  --accent-line: color-mix(in srgb, var(--accent) 55%, var(--border));
}

/* Fallback for browsers without light-dark() (before 2024): the light palette, and no theme switch.
   Values must equal the first (light) argument above — test/assets.test.mjs checks it. */
@supports not (color: light-dark(#000, #fff)) {
  :root {
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --header-bg: rgb(255 255 255 / 0.85);
    --grid-line: rgb(15 23 42 / 0.06);
    --fg: #0f172a;
    --muted: #475569;
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-text: #1d4ed8;
    --link: #1d4ed8;
    --link-hover: #1e40af;
    --primary-soft: #eff6ff;
    --primary-soft-fg: #1e40af;
    --glow: rgb(37 99 235 / 0.14);
    --ink: #0b1220;
    --ink-border: #0b1220;
    --on-ink: #f8fafc;
    --bezel: #0f172a;
    --ring: #2563eb;
    --mark-ring: rgb(15 23 42 / 0);
    --ok: #047857;
    --ok-soft: #ecfdf5;
    --dev: #334155;
    --dev-soft: #f1f5f9;
    --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05);
    --shadow-md: 0 1px 3px rgb(15 23 42 / 0.06), 0 12px 32px -8px rgb(15 23 42 / 0.12);
    --shadow-lg: 0 2px 6px rgb(15 23 42 / 0.08), 0 32px 64px -16px rgb(15 23 42 / 0.28);
  }
  :root,
  [style*='--accent'] {
    --accent-tint: color-mix(in srgb, var(--accent) 9%, var(--surface-2));
    --accent-soft: color-mix(in srgb, var(--accent) 16%, var(--surface));
  }
  :root,
  :root[data-theme] { color-scheme: light; }
  .theme-switch { display: none; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--sticky-offset) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-sans); color: var(--fg); margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(38px, 5vw, 62px); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 3.3vw, 40px); font-weight: 750; line-height: 1.15; letter-spacing: -0.025em; }
h3 { font-size: 18px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
strong { font-weight: 700; }
.icon { flex: none; vertical-align: middle; }

.container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--fg); color: var(--bg); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.lead { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.6; color: var(--muted); max-width: 580px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.note { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 0; }

.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  color: var(--primary-text); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.kicker--on-dark { color: #93c5fd; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 24px; padding: 6px 14px 6px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--muted); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-sm);
}
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px;
  font: 600 15px/1.2 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.btn--lg { min-height: 50px; padding: 0 22px; font-size: 16px; }
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgb(15 23 42 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.12); }
.btn--primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn--secondary { background: var(--surface); color: var(--fg); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn--secondary:hover { color: var(--fg); background: var(--bg-soft); border-color: var(--muted); }
.btn--ghost { background: var(--bg-soft); color: var(--muted); border-color: var(--border); cursor: default; }
.btn--light { background: #ffffff; color: #0b1220; }
.btn--light:hover { background: #e2e8f0; color: #0b1220; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
}
.site-header__bar { display: flex; align-items: center; gap: 12px 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 750; font-size: 17px; letter-spacing: -0.01em; }
.brand:hover { color: var(--fg); }
.brand img { border-radius: 8px; box-shadow: 0 0 0 1px var(--mark-ring); }
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.site-nav a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  color: var(--muted); font-size: 15px; font-weight: 550; text-decoration: none;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.site-nav a:hover { background: var(--bg-soft); color: var(--fg); }
.site-nav .site-nav__cta { margin-left: 8px; background: var(--primary); color: var(--on-primary); font-weight: 600; padding: 0 14px; }
.site-nav .site-nav__cta:hover { background: var(--primary-hover); color: var(--on-primary); }

/* Header tools: language switch ("EN · ID") + theme switch (System / Light / Dark). Plain links, no JS.
   Every target is at least 44 × 44 px. */
.site-tools { display: flex; align-items: center; gap: 8px; padding-left: 16px; border-left: 1px solid var(--border); }
.site-lang { display: flex; align-items: center; }
.site-lang a {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 6px; border-radius: var(--r-sm);
  color: var(--muted); font-size: 14px; font-weight: 650; letter-spacing: 0.04em; text-decoration: none;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.site-lang a:hover { background: var(--bg-soft); color: var(--fg); }
.site-lang a[aria-current] {
  color: var(--fg); text-decoration: underline; text-decoration-color: var(--primary-text);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.site-lang__sep { color: var(--muted); font-weight: 700; }
.theme-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); }
.theme-switch__opt {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; color: var(--muted);
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.theme-switch__opt:hover { color: var(--fg); background: var(--surface); }
/* Active option, from the server-set <html data-theme>; "system" when the attribute is missing (e.g. dist/ opened as files). */
:root:not([data-theme='light'], [data-theme='dark']) .theme-switch__opt--system,
:root[data-theme='light'] .theme-switch__opt--light,
:root[data-theme='dark'] .theme-switch__opt--dark {
  background: var(--surface); color: var(--primary-text); box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-sm);
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(48px, 7vw, 88px) 0; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48% 52% at 78% 28%, var(--glow), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: radial-gradient(80% 70% at 60% 30%, #000 30%, transparent 80%);
  mask-image: radial-gradient(80% 70% at 60% 30%, #000 30%, transparent 80%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__copy h1 { max-width: 13ch; }
.hero__accent { color: var(--primary-text); }
.hero__trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 28px 0 0; padding: 0; color: var(--muted); font-size: 14.5px; font-weight: 550; }
.hero__trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust .icon { color: var(--ok); }

.showcase {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
  background:
    radial-gradient(60% 50% at 50% 35%, var(--glow), transparent 75%),
    radial-gradient(var(--grid-line) 1px, transparent 1.5px) 0 0 / 18px 18px,
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.showcase .phone { position: absolute; }
.showcase .phone--center { width: 40%; left: 50%; top: 6%; translate: -50% 0; z-index: 3; box-shadow: var(--shadow-lg); }
.showcase .phone--left { width: 32%; left: 5%; top: 16%; z-index: 2; }
.showcase .phone--right { width: 32%; right: 5%; top: 16%; z-index: 2; }
.showcase .phone--left, .showcase .phone--right { box-shadow: var(--shadow-md); opacity: 0.92; }
.float-card {
  position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-md);
  font-size: 12.5px; line-height: 1.3; color: var(--muted);
}
.float-card strong { display: block; color: var(--fg); font-size: 13.5px; }
.float-card > .icon { box-sizing: content-box; padding: 7px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-text); }
.float-card--top { bottom: 5%; left: 5%; }
.float-card--bottom { bottom: 5%; right: 5%; }

/* Device frame around a real 9:16 screenshot */
.phone { aspect-ratio: 9 / 16; padding: 6px; border-radius: 30px; background: var(--bezel); box-shadow: var(--shadow-md); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 24px; }

/* ---------- Stats strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: clamp(48px, 6vw, 80px) 0 0;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm);
}
.stats__item { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; padding: 24px 28px; }
.stats__item + .stats__item { border-left: 1px solid var(--border); }
.stats dt { color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.stats dd { margin: 0; font-size: clamp(30px, 3vw, 40px); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 9vw, 120px); }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section + .section--flush { padding-top: 0; }
.section__head { max-width: 680px; margin-bottom: 40px; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--split { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; }
.section__head--split > div { max-width: 640px; }
.section__intro { color: var(--muted); font-size: 17.5px; margin: 0; }

/* ---------- Catalog filter (radio + :has, no JS) ---------- */
.filter { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); }
.filter label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 14px; border-radius: 9px;
  color: var(--muted); font-size: 14.5px; font-weight: 600; cursor: pointer; user-select: none;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.filter label:hover { color: var(--fg); background: var(--surface); }
.filter__count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--border); color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }
.filter input:checked + label { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.filter input:checked + label .filter__count { background: var(--primary); color: #fff; }
.filter input:focus-visible + label { outline: 2px solid var(--ring); outline-offset: 2px; }
.catalog:has(#f-games:checked) .app-grid > li:not([data-group='games']),
.catalog:has(#f-health:checked) .app-grid > li:not([data-group='health']),
.catalog:has(#f-education:checked) .app-grid > li:not([data-group='education']),
.catalog:has(#f-sports:checked) .app-grid > li:not([data-group='sports']),
.catalog:has(#f-money:checked) .app-grid > li:not([data-group='money']),
.catalog:has(#f-other:checked) .app-grid > li:not([data-group='other']) { display: none; }

/* ---------- App cards ---------- */
.app-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.app-grid > li { display: flex; }
.app-card__link {
  display: flex; flex-direction: column; width: 100%; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm);
  color: inherit; text-decoration: none;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease), translate 200ms var(--ease);
}
.app-card__link:hover { color: inherit; border-color: var(--border-strong); box-shadow: var(--shadow-md); translate: 0 -3px; }
.app-card__link:focus-visible { outline-offset: 3px; border-radius: var(--r-lg); }
.app-card__media {
  position: relative; height: 216px; overflow: hidden; border-bottom: 1px solid var(--border);
  background:
    radial-gradient(var(--grid-line) 1px, transparent 1.5px) 0 0 / 16px 16px,
    var(--accent-tint);
}
.app-card__media .phone { position: absolute; left: 50%; top: 28px; width: 150px; translate: -50% 0; box-shadow: var(--shadow-md); transition: translate 260ms var(--ease); }
.app-card__media .phone img { border-radius: 20px; }
.app-card__link:hover .app-card__media .phone { translate: -50% -6px; }
.app-card__media > .app-icon { position: absolute; inset: 0; margin: auto; }
.app-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 20px; }
.app-card__top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.app-card__id { min-width: 0; }
.app-card__title { font-size: 18px; margin: 0; }
.app-card__category { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.app-card__tagline { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 18px; }
.app-card__highlights { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; font-size: 14.5px; }
.app-card__highlights li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.app-card__highlights .icon { color: var(--ok); margin-top: 3px; }
.app-card__foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-card__more { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-text); font-size: 14.5px; font-weight: 600; }
.app-card__more .icon { transition: transform 200ms var(--ease); }
.app-card__link:hover .app-card__more .icon { transform: translateX(3px); }

/* Wide cards (home grid gap closers): side-by-side media on the right */
.app-card--wide { grid-column: span 2; }
.app-card--wide .app-card__link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); }
.app-card--wide .app-card__media { order: 2; height: auto; min-height: 300px; border-bottom: 0; border-left: 1px solid var(--border); }
.app-card--wide .app-card__media .phone { width: 172px; top: 32px; }
.app-card--wide .app-card__body { padding: 28px; }
.app-card--wide .app-card__title { font-size: 22px; }
.catalog:has(.filter input:not(#f-all):checked) .app-card--wide { grid-column: auto; }
.catalog:has(.filter input:not(#f-all):checked) .app-card--wide .app-card__link { display: flex; }
.catalog:has(.filter input:not(#f-all):checked) .app-card--wide .app-card__media { order: 0; height: 216px; min-height: 0; border-left: 0; border-bottom: 1px solid var(--border); }
.catalog:has(.filter input:not(#f-all):checked) .app-card--wide .app-card__highlights { display: none; }

.app-icon { border-radius: 22%; box-shadow: 0 0 0 1px rgb(15 23 42 / 0.06), var(--shadow-sm); }
.app-icon--mono {
  display: inline-grid; place-items: center; width: var(--size); height: var(--size);
  background: var(--accent); color: #fff; font-weight: 800; font-size: calc(var(--size) * 0.36);
}

/* Status pill: icon + text, never colour alone */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.status--available { background: var(--ok-soft); color: var(--ok); }
.status--coming-soon { background: var(--primary-soft); color: var(--primary-soft-fg); }
.status--in-development { background: var(--dev-soft); color: var(--dev); }

/* ---------- Principles ---------- */
.principles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.principle { padding: 28px 24px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.principle h3 { margin: 20px 0 8px; }
.principle p { color: var(--muted); margin: 0; font-size: 15px; }
.principle__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-text); }

/* ---------- Contact band ---------- */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 48px;
  padding: clamp(32px, 5vw, 56px); border: 1px solid var(--ink-border); border-radius: var(--r-xl);
  background: var(--ink); color: var(--on-ink);
}
.cta-band::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 90% at 100% 0%, rgb(37 99 235 / 0.35), transparent 70%),
    linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px) 0 0 / 40px 40px;
}
.cta-band h2 { color: var(--on-ink); margin-bottom: 10px; max-width: 20ch; }
.cta-band p { margin: 0; color: var(--on-ink-muted); font-size: 17px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--fg); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--fg); font-weight: 600; }

/* ---------- Shared tile (app & document pages) ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.tile { position: relative; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }

/* ---------- App page ---------- */
.app-hero { position: relative; padding-block: 24px 8px; isolation: isolate; }
.app-hero::before {
  content: ''; position: absolute; inset: 0 0 35%; z-index: -1;
  background: linear-gradient(180deg, var(--accent-tint), transparent);
}
.app-intro { grid-column: span 7; padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.app-intro--full { grid-column: 1 / -1; }
.app-intro h1 { font-size: clamp(32px, 4.2vw, 52px); }
.app-intro__id { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.app-intro__category { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; }
.app-showcase {
  grid-column: span 5; display: grid; place-items: center; padding: 40px 24px; overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 40%, var(--accent-soft), transparent 75%),
    radial-gradient(var(--grid-line) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--surface-2);
}
.app-showcase .phone { width: min(250px, 64vw); box-shadow: var(--shadow-lg); }

.facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin: 0; }
.fact { display: flex; gap: 14px; align-items: flex-start; padding: 20px; }
.fact__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-text); }
.fact__text { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; min-width: 0; }
.fact dt { color: var(--muted); font-size: 13.5px; }
.fact dd { margin: 0; font-weight: 650; font-size: 15px; line-height: 1.45; overflow-wrap: break-word; }

.overview { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.overview__about { position: sticky; top: calc(var(--sticky-offset) + 24px); }
.overview__about .section__intro { margin-bottom: 24px; }
.overview__label { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 6px 0 16px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-weight: 550; line-height: 1.5; }
.checklist .icon { flex: none; box-sizing: content-box; padding: 3px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.feature { padding: 24px; }
.features > .feature:last-child:nth-child(odd) { grid-column: 1 / -1; }
.feature__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px; background: var(--primary-soft); color: var(--primary-text); }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: 15px; }

.shots-tile { padding: clamp(24px, 3.5vw, 40px); background: var(--surface-2); }
.shots-tile__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.shots-tile__head h2 { margin: 0; }
.shots-tile__head p { margin: 0; color: var(--muted); }
.shots {
  list-style: none; margin: 0; padding: 4px 4px 16px; display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.shots li { scroll-snap-align: start; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.steps li { counter-increment: step; position: relative; padding: 64px 22px 22px; font-weight: 550; line-height: 1.5; }
.steps li::before {
  content: counter(step); position: absolute; top: 20px; left: 22px; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--fg); color: var(--bg); font-size: 14px; font-weight: 700;
}

.privacy-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; padding: clamp(24px, 4vw, 44px); }
.privacy-card__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--ok-soft); color: var(--ok); }
.privacy-card h2 { font-size: clamp(24px, 2.6vw, 32px); }
.privacy-card p { max-width: 68ch; color: var(--muted); }
.privacy-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 20px; }
.privacy-card__actions > a:not(.btn) { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; }

/* ---------- Documents (privacy policies) ---------- */
.doc { padding-block: 28px 96px; }
.doc--narrow { width: min(860px, 100% - 48px); }
.doc__header { margin-bottom: 24px; padding: clamp(24px, 4vw, 40px); overflow: hidden; }
.doc__header::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent-line); }
.doc__header h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 0; }
.doc__grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.toc { position: sticky; top: calc(var(--sticky-offset) + 20px); max-height: calc(100vh - var(--sticky-offset) - 40px); overflow: auto; padding: 18px; font-size: 14px; }
.toc__title { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 10px; border-radius: var(--r-sm); color: var(--fg); text-decoration: none; line-height: 1.4; }
.toc a:hover { background: var(--bg-soft); color: var(--fg); }
.prose { padding: clamp(24px, 4.4vw, 56px); }
.prose > *, .prose section > * { max-width: 74ch; }
.prose h2 { font-size: 24px; margin-top: 2em; scroll-margin-top: calc(var(--sticky-offset) + 16px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin-top: 1.6em; scroll-margin-top: calc(var(--sticky-offset) + 16px); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--bg-soft); font-weight: 700; }
.prose caption { text-align: left; color: var(--muted); font-size: 14px; padding-bottom: 8px; }
.prose .meta { color: var(--muted); font-size: 15px; }
.prose .callout { background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); border-radius: var(--r-md); padding: 20px 24px; margin-block: 24px; }
.prose .callout h2, .prose .callout h3 { margin-top: 0; }
.prose .callout :last-child { margin-bottom: 0; }
.prose .lang-switch a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.prose section[lang='id'] { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border); }

.not-found { padding-block: 64px 120px; }
.not-found__tile { display: grid; justify-items: center; text-align: center; padding: clamp(36px, 6vw, 80px) 24px; }
.not-found__code { font-size: clamp(80px, 13vw, 144px); font-weight: 800; line-height: 1; letter-spacing: -0.05em; color: var(--primary-text); margin: 0 0 8px; }
.not-found .lead { margin-inline: auto; }
.not-found .actions { justify-content: center; }
.not-found__alt { margin: 28px 0 0; color: var(--muted); font-size: 15px; }
.not-found__alt a { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 8px; padding-block: 56px 28px; background: var(--bg-soft); border-top: 1px solid var(--border); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr 1.2fr; gap: 40px; }
.site-footer__brand p { color: var(--muted); font-size: 14.5px; margin-top: 14px; max-width: 340px; }
.site-footer__title { font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 4px 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; font-size: 14.5px; }
.site-footer ul a { display: inline-flex; align-items: center; min-height: 32px; color: var(--fg); text-decoration: none; }
.site-footer ul a:hover { color: var(--link); text-decoration: underline; }
.site-footer__mail { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.site-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.site-footer__bottom p { margin: 0; }
.site-footer .trust { list-style: none; display: flex; flex-wrap: nowrap; gap: 8px; margin: 0; padding: 0; }
.trust li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 12.5px; color: var(--fg); white-space: nowrap; }
.trust .icon { color: var(--ok); }

/* ---------- Motion (subtle; disabled for reduced motion) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media screen and (prefers-reduced-motion: no-preference) {
  .hero__copy, .hero__visual, .bento > .tile, .facts > .fact { animation: rise 600ms var(--ease) both; }
  .hero__visual, .bento > :nth-child(2) { animation-delay: 100ms; }
  .facts > :nth-child(2) { animation-delay: 60ms; }
  .facts > :nth-child(3) { animation-delay: 120ms; }
  .facts > :nth-child(4) { animation-delay: 180ms; }
  @supports (animation-timeline: view()) {
    .app-grid > li, .principle, .feature, .steps > li, .section__head, .cta-band, .shots-tile, .privacy-card, .stats {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .site-nav .site-nav__principles { display: none; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-card--wide { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__copy h1 { max-width: 16ch; }
  .hero__visual { width: min(560px, 100%); margin-inline: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats__item:nth-child(3) { border-left: 0; }
  .stats__item:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .app-intro, .app-showcase { grid-column: 1 / -1; }
  .overview { grid-template-columns: 1fr; }
  .overview__about { position: static; }
  .doc__grid { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; max-height: none; }
  .cta-band { grid-template-columns: 1fr; }
}
/* Small screens: brand + nav on the first row, language and theme switch on a second row. Two sticky rows
   would cover too much of a phone screen, so the header scrolls away with the page here. */
@media (max-width: 760px) {
  :root { --sticky-offset: 0px; }
  .site-header { position: relative; }
  .site-header__bar { flex-wrap: wrap; row-gap: 0; min-height: 0; }
  .brand, .site-nav { min-height: var(--header-h); }
  .site-nav .site-nav__privacy { display: none; }
  .site-tools { flex: 1 0 100%; justify-content: space-between; padding: 4px 0 6px; border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; --gap: 14px; }
  .container, .doc--narrow { width: calc(100% - 32px); }
  .site-nav a { padding: 0 10px; font-size: 14.5px; }
  .hero { padding-top: 36px; }
  .actions .btn, .privacy-card__actions .btn, .cta-band .btn { width: 100%; }
  .float-card { font-size: 11.5px; padding: 8px 10px; gap: 8px; }
  .float-card strong { font-size: 12.5px; }
  .float-card > .icon { padding: 5px; }
  .showcase .phone { padding: 4px; border-radius: 20px; }
  .showcase .phone img { border-radius: 16px; }
  .stats__item { padding: 18px 20px; }
  .app-grid, .features, .principles, .facts, .steps { grid-template-columns: 1fr; }
  .app-card--wide .app-card__link { display: flex; }
  .app-card--wide .app-card__media { order: 0; height: 216px; min-height: 0; border-left: 0; border-bottom: 1px solid var(--border); }
  .app-card--wide .app-card__media .phone { width: 150px; top: 28px; }
  .app-card--wide .app-card__body { padding: 20px 22px; }
  .app-card--wide .app-card__title { font-size: 18px; }
  .app-card--wide .app-card__highlights { display: none; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer .trust { flex-wrap: wrap; }
  .privacy-card { grid-template-columns: 1fr; }
  .shots { grid-auto-columns: 200px; gap: 16px; }
}
@media (max-width: 380px) {
  .brand span { font-size: 16px; }
  .site-nav .site-nav__cta .icon { display: none; }
}

/* ---------- Print (privacy policies are often printed or saved as PDF) ---------- */
@media print {
  :root,
  :root[data-theme] { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .toc, .skip-link, .breadcrumb { display: none !important; }
  .tile, .prose { background: #fff; color: #000; box-shadow: none; border: 0; padding: 0; }
  .prose .callout { background: #f4f4f4; }
  .doc__grid { display: block; }
  a { color: #000; }
}
