/* Klaa Interactive — site styles */

:root {
  --ink: #0b1324;          /* headings, dark surfaces */
  --ink-2: #131d33;        /* raised dark surface */
  --text: #3a4559;         /* body copy */
  --muted: #6b7489;        /* secondary copy */
  --line: #e4e7ee;         /* borders */
  --line-strong: #cfd5e1;
  --bg: #ffffff;
  --surface: #f6f7fa;      /* alternate section background */
  --brand: #fd4b2d;        /* logo colour, decorative use only */
  --link: #c9361c;         /* brand tone with AA contrast on white */
  --brand-tint: #fff1ee;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 19, 36, 0.04), 0 8px 24px -12px rgba(11, 19, 36, 0.12);
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}
.brand img { height: 22px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--surface); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a.nav-cta {
  margin-left: 8px;
  background: var(--ink);
  color: #fff;
}
.nav a.nav-cta:hover { background: var(--ink-2); color: #fff; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.02em; }
h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.08; font-weight: 700; }
h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.18; font-weight: 700; }
h3 { font-size: 19px; line-height: 1.35; font-weight: 650; letter-spacing: -0.01em; }
p + p { margin-top: 14px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--text); max-width: 60ch; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(2px); }

.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 52px; width: auto; }
.store-badge:hover { opacity: .88; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 88px;
  background:
    radial-gradient(800px 380px at 85% 0%, rgba(253, 75, 45, 0.07), transparent 70%),
    linear-gradient(180deg, #fbfbfd 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 80% 30%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse 60% 70% at 80% 30%, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.hero h1 { margin-top: 18px; max-width: 16ch; }
.hero .lead { margin-top: 22px; }
.page-hero { padding: 80px 0 64px; }
.page-hero h1 { max-width: 22ch; }

/* At-a-glance panel */
.glance {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.glance-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.glance-head::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.glance dl { padding: 8px 24px 12px; }
.glance dl div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; }
.glance dl div + div { border-top: 1px solid var(--line); }
.glance dt { font-size: 14px; color: var(--muted); }
.glance dd { font-size: 15px; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Sections ---------- */
main { flex: 1; }
.section { padding: 96px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { margin-top: 14px; }
.section-head p { margin-top: 16px; font-size: 17px; }

.grid-3 { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 1px 2px rgba(11, 19, 36, 0.03);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text); font-size: 15.5px; }
.card .card-link { display: inline-block; margin-top: 16px; font-weight: 600; font-size: 15px; }

.icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--link);
  margin-bottom: 22px;
}
.icon svg { width: 22px; height: 22px; }

/* ---------- Product feature ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.product-body { padding: 44px; }
.product-body h3 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.02em; margin: 14px 0 14px; }
.product-body p { font-size: 16.5px; }
.product-side {
  padding: 44px;
  background: linear-gradient(160deg, var(--ink) 0%, #18233d 100%);
  color: #c9d1e2;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.product-side dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.09); font-size: 15px; }
.product-side dt { color: #8f9ab3; }
.product-side dd { color: #fff; font-weight: 500; text-align: right; }
.product-side a { color: #fff; }
.product-side .side-links { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.product-side .side-links a { display: inline-flex; align-items: center; gap: 6px; color: #e3e8f2; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #146c43;
  background: #e8f6ee;
  border: 1px solid #c5e8d4;
  padding: 4px 12px;
  border-radius: 999px;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #1f9d5b; }
.status.status-dev { color: #8a4b08; background: #fdf3e4; border-color: #f4dcb4; }
.status.status-dev::before { background: #d98a1c; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}
.product-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 30px; }

/* ---------- Facts table ---------- */
.facts {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.facts div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 18px 28px; }
.facts div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Contact channels ---------- */
.channel h3 { margin-bottom: 6px; }
.channel .channel-mail { display: inline-block; margin-top: 14px; font-weight: 600; overflow-wrap: anywhere; }
.channel .channel-sub { margin-top: 10px; font-size: 14.5px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(135deg, var(--ink) 0%, #17223b 100%);
  color: #c9d1e2;
  border-radius: 20px;
  padding: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta::after {
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 75, 45, 0.28), transparent 65%);
  pointer-events: none;
}
.cta h2 { color: #fff; }
.cta p { margin-top: 12px; font-size: 17px; }
.cta .actions { margin-top: 0; position: relative; z-index: 1; }
.cta .btn { background: #fff; border-color: #fff; color: var(--ink); }
.cta .btn:hover { background: #eef1f6; }
.cta .btn-ghost { background: transparent; border-color: rgba(255,255,255,0.3); color: #fff; }
.cta .btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: #fff; }

/* ---------- Prose (legal pages) ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 24px; margin-top: 48px; margin-bottom: 14px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 22px; display: grid; gap: 10px; margin-top: 12px; }
.prose li::marker { color: var(--brand); }
.updated { margin-top: 18px; font-size: 15px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #9aa5bd; font-size: 15px; margin-top: auto; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 40px;
  padding-top: 72px;
  padding-bottom: 56px;
}
.footer-brand img { height: 22px; width: auto; margin-bottom: 20px; }
.footer-brand p { line-height: 1.7; }
.site-footer h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { color: #c9d1e2; overflow-wrap: break-word; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  padding-bottom: 32px;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .product, .cta { grid-template-columns: 1fr; }
  .hero-grid { gap: 48px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 20px; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 14px; padding-bottom: 12px; min-height: 0; }
  .nav { width: 100%; overflow-x: auto; margin-left: -10px; }
  .nav a { padding: 6px 10px; font-size: 14.5px; }
  .nav a.nav-cta { margin-left: auto; }
  .hero { padding: 56px 0 56px; }
  .page-hero { padding: 48px 0 40px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 26px; }
  .product-body, .product-side { padding: 28px; }
  .cta { padding: 36px 28px; }
  .facts div, .glance dl div { grid-template-columns: 1fr; gap: 2px; }
  .facts div { padding: 16px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 56px; }
}
