/* Kage landing — static, light/dark, system fonts */

:root {
  color-scheme: light dark;
  --primary: #181E29;
  --secondary: #626B78;
  --accent: #3DC754;
  --accent-deep: #145C28;
  --accent-soft: #EAF8EE;
  --on-accent: #07130A;
  --surface: #FFFFFF;
  --surface-2: #F6F6F8;
  --surface-3: #EEF2F7;
  --surface-dark: #10131A;
  --surface-dark-2: #181E29;
  --text: #181E29;
  --text-muted: #626B78;
  --text-inverse: #FFFFFF;
  --border: #D8DEE8;
  --blue: #3873EB;
  --mark: #F0C738;
  --orange: #F28530;
  --pink: #E05EA6;
  --red: #DE3D47;
  --grey: #94949E;
  --black: #14141A;

  --r-xs: 8px; --r-sm: 12px; --r-md: 18px; --r-lg: 24px; --r-xl: 30px; --r-pill: 999px;
  --container: min(1180px, 92vw);
  --shadow-card: 0 1px 0 rgba(24,30,41,.04), 0 12px 32px -16px rgba(24,30,41,.18);
  --shadow-frame: 0 30px 80px -30px rgba(24,30,41,.45), 0 4px 14px rgba(24,30,41,.10);
  --green-text: var(--accent-deep);
  --green-surface: var(--accent-soft);
  --eyebrow-color: var(--accent-deep);
  --platform-badge-bg: var(--surface-2);
  --step-background: var(--primary);
  --step-color: #fff;
  --link-accent: var(--accent-deep);

  --font-rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-text: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #10131A;
    --surface-2: #161B25;
    --surface-3: #1E2433;
    --text: #F4F6FA;
    --text-muted: #9AA3B2;
    --border: #2A3142;
    --shadow-card: 0 1px 0 rgba(0,0,0,.3), 0 12px 32px -16px rgba(0,0,0,.6);
    --shadow-frame: 0 30px 80px -30px rgba(0,0,0,.8), 0 4px 14px rgba(0,0,0,.4);
    --green-text: #B7F0C2;
    --green-surface: color-mix(in srgb, var(--accent) 18%, transparent);
    --eyebrow-color: #8AE39D;
    --platform-badge-bg: var(--surface-3);
    --step-background: var(--accent);
    --step-color: var(--on-accent);
    --link-accent: #8AE39D;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #10131A;
  --surface-2: #161B25;
  --surface-3: #1E2433;
  --text: #F4F6FA;
  --text-muted: #9AA3B2;
  --border: #2A3142;
  --shadow-card: 0 1px 0 rgba(0,0,0,.3), 0 12px 32px -16px rgba(0,0,0,.6);
  --shadow-frame: 0 30px 80px -30px rgba(0,0,0,.8), 0 4px 14px rgba(0,0,0,.4);
  --green-text: #B7F0C2;
  --green-surface: color-mix(in srgb, var(--accent) 18%, transparent);
  --eyebrow-color: #8AE39D;
  --platform-badge-bg: var(--surface-3);
  --step-background: var(--accent);
  --step-color: var(--on-accent);
  --link-accent: #8AE39D;
}

:root[data-theme="light"] {
  color-scheme: light;
}

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

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; }

.container { width: var(--container); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff; padding: 10px 14px; border-radius: var(--r-sm);
}
.skip-link:focus { left: 12px; top: 12px; z-index: 100; }

/* ───── header ───── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-family: var(--font-rounded); font-weight: 800; font-size: 1.15rem;
}
.brand-mark { display: inline-flex; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a {
  text-decoration: none; color: var(--text-muted);
  font-family: var(--font-rounded); font-weight: 600; font-size: .95rem;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--text); }
.header-back { white-space: nowrap; }

.language-menu,
.theme-menu {
  position: relative;
  font-family: var(--font-rounded);
  font-weight: 700;
  color: var(--text);
}
.brand + .language-menu { margin-left: auto; }
.site-nav + .language-menu { margin-left: 0; }
.language-menu summary,
.theme-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  list-style: none;
  font-size: .9rem;
  white-space: nowrap;
}
.theme-menu summary {
  justify-content: center;
  min-width: 38px;
  padding-inline: 10px;
}
.language-menu summary::-webkit-details-marker,
.theme-menu summary::-webkit-details-marker { display: none; }
.language-menu[open] summary,
.theme-menu[open] summary { background: var(--surface-3); }
.theme-summary-icon {
  display: none;
  align-items: center;
  justify-content: center;
}
.theme-summary-icon[data-theme-summary-icon="system"] { display: inline-flex; }
:root[data-theme="light"] .theme-summary-icon[data-theme-summary-icon="system"],
:root[data-theme="dark"] .theme-summary-icon[data-theme-summary-icon="system"] { display: none; }
:root[data-theme="light"] .theme-summary-icon[data-theme-summary-icon="light"],
:root[data-theme="dark"] .theme-summary-icon[data-theme-summary-icon="dark"] { display: inline-flex; }
.language-list,
.theme-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  display: grid;
  min-width: 190px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  list-style: none;
}
.theme-options { min-width: 158px; }
.language-list li {
  margin: 0;
}
.language-list a {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  text-decoration: none;
  color: var(--text-muted);
  font-size: .92rem;
}
.language-list a:hover,
.language-list a:focus-visible {
  color: var(--text);
  background: var(--surface-2);
}
.language-list a[aria-current="page"] {
  color: var(--green-text);
  background: var(--green-surface);
}
.theme-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: .92rem;
  text-align: left;
  cursor: pointer;
}
.theme-option:hover,
.theme-option:focus-visible {
  color: var(--text);
  background: var(--surface-2);
}
.theme-option:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 1px;
}
.theme-option[aria-checked="true"] {
  color: var(--green-text);
  background: var(--green-surface);
}
.theme-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-nav + .language-menu { margin-left: auto; }
  .header-inner { gap: 10px; }
}

@media (max-width: 430px) {
  .site-header .brand-name { display: none; }
  .language-menu summary,
  .theme-menu summary { padding-inline: 9px; }
  .btn.header-cta { padding-inline: 9px; }
}

/* ───── buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-rounded); font-weight: 700; font-size: .95rem;
  padding: 14px 22px; border-radius: var(--r-pill);
  text-decoration: none; border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, black); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-3); }
.btn.header-cta {
  min-height: 38px;
  padding: 8px 11px;
  font-size: .9rem;
}

/* ───── hero ───── */
.hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 6vw, 72px);
  background:
    radial-gradient(900px 500px at 90% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(700px 400px at 0% 20%, color-mix(in srgb, var(--blue) 10%, transparent), transparent 60%);
}
.hero-grid {
  display: grid; gap: clamp(32px, 5vw, 64px);
  grid-template-columns: 1.05fr 1fr; align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--r-pill);
  font-family: var(--font-rounded); font-weight: 700; font-size: .85rem;
}
.hero-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.privacy-badge { background: var(--green-surface); color: var(--green-text); }
.platform-badge {
  background: var(--platform-badge-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.hero-title {
  font-family: var(--font-rounded);
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 1; font-weight: 800; letter-spacing: 0;
  margin: 18px 0 14px;
}
.hero-subhead {
  font-family: var(--font-rounded); font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.35;
  margin: 0 0 14px; color: var(--text);
}
.hero-detail { color: var(--text-muted); max-width: 56ch; margin: 0 0 28px; }

.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-actions.center { justify-content: center; }

.app-store-badge {
  display: inline-flex;
  width: 185px;
  max-width: 100%;
  line-height: 0;
  text-decoration: none;
}
.app-store-badge:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 4px;
  border-radius: 13px;
}
.app-store-badge img {
  width: 100%;
  height: auto;
}

.hero-proof {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: grid; gap: 8px;
  color: var(--text-muted); font-size: .95rem;
}
.hero-proof li { display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); display: inline-block; }

/* ───── platform showcase ───── */
.hero-visual {
  display: flex;
  justify-content: center;
  width: 100%;
}
.platform-showcase {
  position: relative;
  width: min(700px, 100%);
  aspect-ratio: 1.12 / 1;
  margin: 0;
}
.product-screenshot {
  display: block;
  width: 100%;
  height: auto;
}
.platform-window,
.platform-device {
  position: absolute;
  display: block;
}
.platform-mac {
  top: 5%;
  right: 0;
  width: 82%;
  z-index: 1;
  overflow: visible;
  filter: drop-shadow(0 28px 46px rgba(24, 30, 41, .16));
}
.platform-device {
  padding: 5px;
  overflow: hidden;
  background: var(--black);
  border: 1px solid color-mix(in srgb, var(--black) 88%, white);
  box-shadow: var(--shadow-frame);
}
.platform-ipad {
  left: 0;
  bottom: 6%;
  width: 36%;
  z-index: 2;
  padding: 7px;
  overflow: visible;
  border-radius: 28px;
}
.platform-ipad .ipad-screenshot {
  border-radius: 10px;
}
.platform-phone {
  right: 8%;
  bottom: 1%;
  width: 22%;
  z-index: 3;
  border-radius: 28px;
}
.platform-phone .phone-screenshot {
  border-radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .platform-device {
    background: color-mix(in srgb, var(--surface-2) 84%, var(--primary));
    border-color: color-mix(in srgb, var(--border) 76%, transparent);
  }
}

:root[data-theme="dark"] .platform-device {
  background: color-mix(in srgb, var(--surface-2) 84%, var(--primary));
  border-color: color-mix(in srgb, var(--border) 76%, transparent);
}

@media (max-width: 920px) {
  .platform-showcase {
    width: min(620px, 100%);
  }
}
@media (max-width: 520px) {
  .platform-showcase {
    width: min(420px, 100%);
    aspect-ratio: 1 / .9;
  }
  .platform-mac {
    top: 7%;
    width: 88%;
  }
  .platform-ipad {
    width: 39%;
  }
  .platform-phone {
    right: 5%;
    width: 25%;
  }
}

/* ───── sections ───── */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--surface-2); }

.section-head { max-width: 760px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.eyebrow {
  display: inline-block; margin: 0 0 10px;
  font-family: var(--font-rounded); font-weight: 800; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--eyebrow-color);
}
.eyebrow.on-dark { color: #8AE39D; }

.section h2 {
  font-family: var(--font-rounded); font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 12px;
}
.section-lede { color: var(--text-muted); font-size: 1.05rem; margin: 0; }

/* ───── privacy strip ───── */
.privacy-strip {
  padding: clamp(28px, 4vw, 40px) 0;
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.three-col {
  display: grid; gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 880px) { .three-col { grid-template-columns: 1fr; } }

.privacy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.privacy-card .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-sm);
  background: var(--green-surface); color: var(--green-text);
  margin-bottom: 12px;
}
.privacy-card h3 { font-family: var(--font-rounded); font-weight: 700; font-size: 1.1rem; margin: 0 0 6px; }
.privacy-card p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ───── availability strip ───── */
.availability-strip {
  padding: clamp(40px, 6vw, 64px) 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.availability-panel {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.availability-panel h2 {
  font-family: var(--font-rounded);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 10px;
}
.availability-panel p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ───── workflow ───── */
.workflow {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 18px;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: step;
}
@media (max-width: 980px) { .workflow { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .workflow { grid-template-columns: 1fr; } }

.workflow-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--step-background); color: var(--step-color);
  font-family: var(--font-rounded); font-weight: 800; font-size: .9rem;
  margin-bottom: 12px;
}
.workflow-step h3 { font-family: var(--font-rounded); font-weight: 700; font-size: 1.1rem; margin: 0 0 6px; }
.workflow-step p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ───── tags grid ───── */
.tag-grid {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-rounded); font-weight: 700; font-size: .9rem;
  color: var(--text);
}

/* ───── tools grid ───── */
.tools-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 980px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tools-grid { grid-template-columns: 1fr; } }

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.tool-card h3 { font-family: var(--font-rounded); font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; }
.tool-card p { margin: 0; color: var(--text-muted); font-size: .92rem; }

/* ───── two-col split ───── */
.two-col {
  display: grid; gap: clamp(28px, 5vw, 56px);
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
}
@media (max-width: 920px) { .two-col { grid-template-columns: 1fr; } }
.two-col h2 { margin-top: 8px; }

.metadata-copy {
  max-width: 780px;
}
.metadata-copy h2 { margin-top: 8px; }

.check-list {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: grid; gap: 8px;
}
.check-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  column-gap: 10px;
  color: var(--text);
}
.check-list li::before {
  content: "";
  margin-top: .28em;
  width: 16px; height: 16px; border-radius: 999px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
}

/* ───── feature rows ───── */
.feature-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
}
.feature-row h3 { font-family: var(--font-rounded); font-weight: 700; font-size: 1.1rem; margin: 0 0 6px; }
.feature-row p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ───── privacy section dark ───── */
.section-privacy {
  background: var(--surface-dark);
  color: var(--text-inverse);
}
.privacy-wrap { max-width: 760px; margin: 0 auto; text-align: center; }
.on-dark { color: var(--text-inverse); }
.dim { color: color-mix(in srgb, white 70%, transparent); }
.link-on-dark {
  color: #8AE39D; text-decoration: none;
  font-family: var(--font-rounded); font-weight: 700;
}
.link-on-dark:hover { text-decoration: underline; }

/* ───── final cta ───── */
.section-cta { background: var(--surface-2); }
.cta-wrap { text-align: center; max-width: 720px; margin: 0 auto; }
.cta-wrap h2 { margin: 0 0 8px; }
.cta-wrap p { color: var(--text-muted); margin: 0 0 20px; }

/* ───── footer ───── */
.site-footer {
  padding: 40px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 24px;
}
.footer-brand .muted { margin: 8px 0 0; color: var(--text-muted); max-width: 38ch; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-nav a {
  text-decoration: none; color: var(--text-muted);
  font-family: var(--font-rounded); font-weight: 600; font-size: .92rem;
}
.footer-nav a:hover { color: var(--text); }
.muted { color: var(--text-muted); }
.small { font-size: .85rem; }

.text-page {
  max-width: 760px;
}
.text-page-wide {
  max-width: 920px;
}
.text-page a:not(.btn) {
  color: var(--link-accent);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.text-page-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 8px 0 16px;
}
.text-page-hero {
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.text-page-lede {
  color: var(--text-muted);
  font-size: 1.08rem;
  margin: 0 0 22px;
}
.text-section {
  margin-top: clamp(32px, 5vw, 52px);
}
.text-section h2,
.text-page > h2 {
  font-family: var(--font-rounded);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
  margin: 30px 0 10px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 clamp(28px, 4vw, 44px);
}
.policy-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 560px;
}
.detail-card {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.detail-card.compact {
  padding: 16px 18px;
}
.detail-card dt {
  margin: 0 0 5px;
  color: var(--text-muted);
  font-family: var(--font-rounded);
  font-size: .82rem;
  font-weight: 800;
}
.detail-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}
.content-list {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--text);
}
.content-list li + li {
  margin-top: 8px;
}
.faq-stack {
  display: grid;
  gap: 14px;
}
.faq-item {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.faq-item h3 {
  margin: 0 0 8px;
  font-family: var(--font-rounded);
  font-size: 1.08rem;
  line-height: 1.25;
}
.faq-item p {
  margin: 0;
  color: var(--text-muted);
}
.text-page-note {
  margin-top: 32px;
}

@media (max-width: 780px) {
  .detail-grid,
  .policy-meta {
    grid-template-columns: 1fr;
  }
}
