/* kappsa.tech */

/* Self-hosted fonts (no requests to Google) */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/sora-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Sora"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/sora-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-logo: "Sora", "Inter", system-ui, sans-serif;

  --canvas: #f7f7f4;
  --band: #ecece8;
  --surface: #ffffff;
  --text: #0a0a0a;
  --text-2: #5c5c5c;
  --muted: #686863;   /* 4.7:1 on band, AA for small text */
  --border: #deded8;
  --cta: #0a0a0a;
  --cta-label: #ffffff;
  --accent: #2563eb;
  --focus: #2563eb;

  --paint-1: #c9d6c3;
  --paint-2: #e8d9bf;
  --paint-3: #b9cbd9;
  --paint-4: #efe6d6;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(20,20,10,.10);
  --max: 1200px;
  color-scheme: light;
}

/* Theme follows the visitor's browser / system setting. */
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0d0d0c;
    --band: #161614;
    --surface: #1b1b19;
    --text: #f2f2ee;
    --text-2: #a6a69e;
    --muted: #8f8f88;   /* 5.3:1 on surface */
    --border: #2a2a27;
    --cta: #f2f2ee;
    --cta-label: #0a0a0a;
    --accent: #5b8cff;
    --focus: #5b8cff;
    --paint-1: #1d2a2a;
    --paint-2: #2a2419;
    --paint-3: #17213a;
    --paint-4: #1a1a17;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 48px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; 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: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--cta); color: var(--cta-label); font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--canvas) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo {
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--text);
  line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--text-2); transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.menu-toggle {
  display: none; width: 40px; height: 40px; border-radius: 999px;
  place-items: center; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile: links move into a drop-down panel under the header */
@media (max-width: 720px) {
  .menu-toggle { display: inline-grid; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 16px; background: var(--canvas); border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0,0,0,.06);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 4px; font-size: 16px; color: var(--text); border-bottom: 1px solid var(--border); }
  .nav-links li:last-child a { border-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font: 500 15px/1 var(--font-sans);
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, background .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--cta); color: var(--cta-label); }
.btn-primary:hover { opacity: .88; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--band); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }
.btn.is-soon { opacity: .45; pointer-events: none; }

/* ---------- Type ---------- */
.eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: .02em; margin: 0 0 14px; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 20px; letter-spacing: -0.02em; line-height: 1.25; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); max-width: 560px; margin: 20px 0 0; }
.muted { color: var(--text-2); }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }
.band { background: var(--band); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { color: var(--text-2); margin: 16px 0 0; }

.hero { padding: 88px 0 56px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Painterly backdrop for product visuals */
.canvas-art {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 80% at 15% 20%, var(--paint-3) 0%, transparent 60%),
    radial-gradient(50% 70% at 85% 15%, var(--paint-2) 0%, transparent 65%),
    radial-gradient(70% 60% at 70% 90%, var(--paint-1) 0%, transparent 60%),
    radial-gradient(50% 50% at 20% 85%, var(--paint-2) 0%, transparent 70%),
    var(--paint-4);
}
.canvas-art::after {
  /* subtle grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.card p { color: var(--text-2); margin: 10px 0 0; font-size: 16px; }
.card .icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--band); color: var(--text); margin-bottom: 20px;
}
.card .icon svg { width: 20px; height: 20px; }

/* ---------- Phone mockup ---------- */
.phone {
  width: 260px; aspect-ratio: 1080 / 2400;
  border-radius: 38px; padding: 9px;
  background: #0b0b0b;
  box-shadow: var(--shadow), inset 0 0 0 1.5px #2b2b2b;
  position: relative; z-index: 1;
}
.phone .screen { width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: #111; }
/* <picture> picks the light or dark screenshot, so only one is downloaded */
.phone picture { display: block; width: 100%; height: 100%; }
.phone img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 40px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { margin: 0 0 12px; letter-spacing: 0; line-height: 1.4; font-size: 13px; font-weight: 500; color: var(--muted); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-2); text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { margin-top: 48px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Home ---------- */
.home-visual { margin-top: 56px; padding: 56px 24px; display: flex; justify-content: center; align-items: flex-end; gap: 28px; min-height: 420px; }
.home-visual .phone:nth-child(2) { transform: translateY(-36px); }
@media (max-width: 640px) {
  .home-visual { padding: 32px 16px; gap: 12px; min-height: 0; }
  .home-visual .phone { width: 46%; border-radius: 28px; padding: 6px; }
  .home-visual .phone .screen { border-radius: 23px; }
}

.app-feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 48px; overflow: hidden;
}
.app-feature .canvas-art { display: flex; justify-content: center; padding: 40px 20px 0; align-self: stretch; margin: -8px; }
.app-feature .canvas-art .phone { width: 240px; margin-bottom: -120px; }
.app-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px 4px 4px; margin-bottom: 20px;
}
.app-badge .app-icon { width: 24px; height: 24px; border-radius: 7px; }
.app-feature ul { margin: 24px 0 32px; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--text-2); font-size: 16px; }
.app-feature li { display: flex; gap: 10px; }
.app-feature li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text); margin-top: 10px; flex: none; }
@media (max-width: 860px) {
  .app-feature { grid-template-columns: 1fr; padding: 28px; }
  .app-feature .canvas-art { min-height: 380px; }
}

.contact-box {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
}
.contact-list { display: grid; gap: 14px; }
.contact-item { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
.contact-item span:first-child { color: var(--muted); }
.contact-item a { text-decoration: none; font-weight: 500; }
.contact-item a:hover { text-decoration: underline; }
@media (max-width: 760px) { .contact-box { grid-template-columns: 1fr; } }

.cta-final { text-align: center; padding: 120px 0; }
.cta-final h2 { font-size: clamp(36px, 5vw, 56px); }
.cta-final .hero-actions { justify-content: center; }

/* ---------- App page ---------- */
.app-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 40px; }
.app-hero-art { padding: 48px 20px; display: flex; justify-content: center; gap: 20px; min-height: 560px; align-items: center; }
.app-hero-art .phone { width: min(240px, 44%); }
.app-hero-art .phone:first-child { transform: translateY(28px) rotate(-3deg); }
.app-hero-art .phone:last-child { transform: translateY(-20px) rotate(3deg); }
@media (max-width: 960px) {
  .app-hero { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .app-hero-art { min-height: 0; padding: 32px 12px; gap: 10px; }
  .app-hero-art .phone { border-radius: 26px; padding: 6px; }
  .app-hero-art .phone .screen { border-radius: 21px; }
}

.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store-btn { height: 52px; padding: 0 20px 0 16px; border-radius: 14px; gap: 10px; }
.store-btn small { display: block; font-size: 11px; font-weight: 400; opacity: .75; line-height: 1.1; }
.store-btn strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.15; }
.store-btn .label { text-align: left; }
.store-btn svg { width: 24px; height: 24px; }
.store-btn.is-soon { opacity: .55; cursor: default; }
.store-note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.metric-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 14px; font-weight: 500;
}
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split .canvas-art { display: flex; justify-content: center; padding: 56px 20px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse > :first-child { order: 0; }
}
.check-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; color: var(--text-2); }
.check-list li strong { color: var(--text); font-weight: 500; }
.check-list svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--text); }

/* Intensity levels, as in the app: outline color plus a fill that rises with intensity */
.lv-none     { --lv: #22c55e; --fill: 0%; }
.lv-faint    { --lv: #84cc16; --fill: 20%; }
.lv-mild     { --lv: #facc15; --fill: 40%; }
.lv-moderate { --lv: #fb923c; --fill: 60%; }
.lv-loud     { --lv: #ef4444; --fill: 80%; }
.lv-severe   { --lv: #991b1b; --fill: 100%; }
.lvl {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid var(--lv);
  background: linear-gradient(to top, var(--lv) var(--fill), transparent var(--fill));
}

.scale { display: flex; gap: 6px; margin-top: 28px; }
.scale span { flex: 1; height: 10px; border-radius: 999px; background: var(--lv); }
.scale .lv-none { background: transparent; box-shadow: inset 0 0 0 2px var(--lv); }

.notice {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 24px 28px; display: flex; gap: 16px; align-items: flex-start; font-size: 15px; color: var(--text-2);
}
.notice svg { width: 22px; height: 22px; flex: none; color: var(--text); margin-top: 1px; }
.notice strong { color: var(--text); font-weight: 500; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); margin: 12px 0 0; }

/* ---------- Legal ---------- */
.legal-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 64px; padding-top: 64px; padding-bottom: 96px; align-items: start; }
.legal-toc { position: sticky; top: 96px; font-size: 14px; max-height: calc(100vh - 120px); overflow: auto; }
.legal-toc h3 { margin: 0 0 12px; letter-spacing: 0; line-height: 1.4; font-size: 13px; font-weight: 500; color: var(--muted); }
.legal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.legal-toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; line-height: 1.35; }
.legal-toc a:hover { background: var(--band); color: var(--text); }
.legal-toc a.active { background: var(--band); color: var(--text); font-weight: 500; }

.legal-head { padding-bottom: 32px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.legal-head h1 { font-size: clamp(36px, 5vw, 52px); }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.legal-switch { display: inline-flex; gap: 4px; padding: 4px; background: var(--band); border-radius: 999px; margin-bottom: 28px; }
.legal-switch a { padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--text-2); }
.legal-switch a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.legal { max-width: 720px; font-size: 16px; }
.legal section { padding: 32px 0 8px; scroll-margin-top: 88px; }
.legal h2 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.25; display: flex; gap: 12px; align-items: baseline; }
.legal h2 .num { font-size: 14px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 24px; }
.legal h3 { font-size: 17px; margin: 24px 0 0; }
.legal p { color: var(--text-2); margin: 14px 0 0; }
.legal ul { color: var(--text-2); margin: 14px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.legal ul ul { margin-top: 6px; }
.legal a { color: var(--text); text-underline-offset: 3px; word-break: break-word; }
.legal .callout {
  margin-top: 18px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--band); color: var(--text); font-size: 15px;
}
.legal .callout p { color: var(--text); margin: 0; }
.legal .callout p + p { margin-top: 8px; }
.legal .callout strong { font-weight: 600; }

@media (max-width: 900px) {
  .legal-wrap { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
  .legal-toc { display: none; }
}

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