/* Kabin landing page — clean minimal, matched to the app's neutral theme. */

:root {
  --bg: oklch(1 0 0);
  --fg: oklch(0.205 0 0);
  --muted: oklch(0.55 0 0);
  --border: oklch(0.922 0 0);
  --surface: oklch(0.985 0 0);
  --surface-2: oklch(0.97 0 0);
  --primary: oklch(0.205 0 0);
  --primary-fg: oklch(0.985 0 0);
  --accent: oklch(0.62 0.19 255);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.06), 0 8px 24px oklch(0 0 0 / 0.06);
  --radius: 14px;
  --maxw: 1080px;
}

:root[data-theme="dark"] {
  --bg: oklch(0.14 0.01 250);
  --fg: oklch(0.985 0.01 250);
  --muted: oklch(0.7 0.02 250);
  --border: oklch(0.28 0.02 250);
  --surface: oklch(0.18 0.015 250);
  --surface-2: oklch(0.21 0.018 250);
  --primary: oklch(0.922 0 0);
  --primary-fg: oklch(0.2 0.01 250);
  --accent: oklch(0.72 0.15 255);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.4), 0 12px 32px oklch(0 0 0 / 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 14px; transition: color 0.15s; }
.nav-links a:hover { color: var(--fg); }
.nav-tools { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s, opacity 0.15s, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.nav .btn { padding: 8px 14px; }

/* Hero */
.hero { text-align: center; padding: 88px 0 48px; }
.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
  font-weight: 720;
}
.hero p.sub {
  max-width: 620px;
  margin: 18px auto 0;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--muted);
}
.hero-logo { width: 76px; height: 76px; border-radius: 18px; box-shadow: var(--shadow); }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.trust { margin-top: 18px; font-size: 13px; color: var(--muted); letter-spacing: 0.01em; }

.hero-shot {
  margin: 56px auto 0;
  max-width: 940px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  line-height: 0;
}
.hero-shot img { width: 100%; height: auto; display: block; }

/* Sections */
section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 {
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -0.015em;
  margin: 0;
  font-weight: 680;
}
.section-head p { color: var(--muted); margin: 10px auto 0; max-width: 540px; }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature .ico { line-height: 1; }
.feature h3 { margin: 14px 0 6px; font-size: 16px; font-weight: 640; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* Screenshots */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.shot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.shot img { width: 100%; height: auto; display: block; }
.shot .cap { padding: 14px 18px; font-size: 14px; color: var(--muted); }
.shot .cap b { color: var(--fg); font-weight: 620; }

/* Download */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.dl-card .os { font-size: 17px; font-weight: 640; }
.dl-card .file { margin-top: 6px; font-size: 13px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dl-note {
  margin-top: 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 13px;
  color: var(--muted);
}
.dl-center { text-align: center; margin-top: 30px; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--fg); }
.footer-inner .spacer { margin-left: auto; }

/* ---- Review fixes ---- */

/* Visible keyboard focus (the page suppresses the default outline elsewhere). */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Frosted nav needs the WebKit-prefixed property for Safari. */
.nav { -webkit-backdrop-filter: saturate(1.4) blur(10px); }

/* Feature icons: monochrome line SVGs. */
.feature .ico { display: inline-flex; color: var(--fg); }
.feature .ico svg { width: 22px; height: 22px; display: block; }

/* Trust badges under the hero CTA. */
.badges { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 16px; }
.badges img { height: 20px; display: block; }

/* Download OS cards are links — signal it. */
a.dl-card {
  display: block;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
a.dl-card:hover { background: var(--surface-2); border-color: var(--muted); }
a.dl-card:active { transform: translateY(1px); }

/* Gatekeeper detail disclosure. */
.dl-note details { margin-top: 8px; }
.dl-note summary { cursor: pointer; color: var(--fg); font-weight: 600; }
.dl-note details code {
  display: inline-block;
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--fg);
}

/* The product screenshots are light-themed. In dark mode, frame them on a light
   surface so they read as app mockups instead of harsh bright slabs. */
:root[data-theme="dark"] .hero-shot,
:root[data-theme="dark"] .shot {
  background: oklch(0.95 0 0);
  border-color: oklch(0.86 0 0);
}
:root[data-theme="dark"] .hero-shot { padding: 10px 10px 0; }
:root[data-theme="dark"] .shot img { border-bottom: 1px solid oklch(0.82 0 0); }
/* The caption sits on the light frame in dark mode, so pin it to dark text. */
:root[data-theme="dark"] .shot .cap { color: oklch(0.45 0 0); }
:root[data-theme="dark"] .shot .cap b { color: oklch(0.205 0 0); }
/* shields.io badges carry their own light background; soften them in dark mode. */
:root[data-theme="dark"] .badges img { filter: brightness(0.92) saturate(0.85); }

/* Mid-range widths: drop to two columns before the single-column breakpoint. */
@media (min-width: 821px) and (max-width: 1024px) {
  .features-grid, .dl-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .features-grid, .dl-grid { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero { padding-top: 56px; }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
