:root {
  --bg: #F3F5F7;
  --surface: #FFFFFF;
  --ink: #131722;
  --muted: #5A6170;
  --line: #D8DCE3;
  --accent: #2B44E0;
  --accent-ink: #FFFFFF;
  --radius-lg: 28px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

/* Header */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.wordmark span { font-weight: 400; color: var(--muted); }
.site-nav { display: flex; gap: 28px; }
.site-nav a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }
@media (max-width: 560px) { .site-nav { gap: 18px; } .site-nav a:nth-child(2) { display: none; } }

/* Hero */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 7vw, 88px); }
.hero h1 {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(42px, 7.2vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.hero p {
  margin: 28px 0 0;
  max-width: 58ch;
  font-size: clamp(18px, 2vw, 21px);
  color: var(--muted);
}
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px;
  font-weight: 600; font-size: 16px;
  text-decoration: none;
  border: 1.5px solid var(--ink);
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { background: var(--surface); }

/* Section headings */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 40px; }
@media (min-width: 860px) { .section-head { grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; } }
.section-head h2 {
  margin: 0; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800;
}
.section-head p { margin: 0; color: var(--muted); max-width: 52ch; }

/* App panels */
.apps { display: grid; gap: 20px; }
.app {
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4.5vw, 56px);
  display: grid;
  gap: 36px;
  overflow: hidden;
}
@media (min-width: 860px) { .app { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; } }
.app-id { display: flex; align-items: center; gap: 16px; }
.app-icon {
  width: 64px; height: 64px; border-radius: 15px; flex: none;
  display: grid; place-items: center;
  font-weight: 800; font-size: 26px; letter-spacing: -0.02em;
  overflow: hidden; position: relative;
}
.app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app-icon:has(img) { background: transparent; color: transparent; }
.app-name { margin: 0; font-size: clamp(30px, 3.6vw, 40px); line-height: 1; letter-spacing: -0.03em; font-weight: 800; }
.app-domain { margin: 6px 0 0; font-size: 15px; opacity: 0.7; }
.app-lede { margin: 28px 0 0; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; max-width: 28ch; }
.app-desc { margin: 14px 0 0; max-width: 48ch; opacity: 0.82; }
.app-meta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
  padding: 7px 14px 7px 12px; border-radius: 999px;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.app-link { font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }

/* Kazcade */
.app--kazcade { background: #070C16; color: #E6ECF7; }
.app--kazcade .app-icon { background: #0D2A23; color: #3DDBB4; }
.app--kazcade .status { background: rgba(110, 235, 221, 0.13); color: #6EEBDD; }
.board {
  justify-self: center;
  width: min(100%, 360px);
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 22px;
  background: #0B1220;
  box-shadow: inset 0 0 0 1px rgba(110, 160, 255, 0.18), 0 0 40px -10px rgba(80, 140, 255, 0.35);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}
.tile { border-radius: 9px; box-shadow: inset 0 2px 0 rgba(255,255,255,0.35); }
.tile.t1 { background: linear-gradient(#6EEBDD, #1FB5A0); }
.tile.t2 { background: linear-gradient(#8DB6FF, #3D78EE); }
.tile.t3 { background: linear-gradient(#C99BFF, #8D4DE8); }
.tile.t4 { background: linear-gradient(#86E3A6, #2FA75A); }
.tile.t0 { background: transparent; box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .board.is-ready .tile { animation: drop 0.6s cubic-bezier(.2, .9, .3, 1.15) backwards; animation-delay: calc(var(--i) * 18ms); }
  @keyframes drop { from { transform: translateY(-60px); opacity: 0; } }
}

/* LiqGuard */
.app--liqguard { background: #1C1E22; color: #ECEDEF; }
.app--liqguard .app-icon { background: #2A2D33; color: #F2A93B; }
.app--liqguard .status { background: rgba(242, 169, 59, 0.14); color: #F5B85A; }
.watch {
  justify-self: center;
  width: min(100%, 400px);
  background: #24272C;
  border-radius: 22px;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.watch-row {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 16px;
  padding: 16px 16px 18px;
  border-radius: 14px;
}
.watch-row + .watch-row { border-top: 1px solid rgba(255,255,255,0.06); }
.watch-row:first-child { background: rgba(229, 72, 77, 0.10); }
.watch-label { font-weight: 600; font-size: 15px; }
.watch-label small { display: block; font-weight: 400; font-size: 13px; color: #9A9EA6; margin-top: 2px; }
.watch-value { text-align: right; font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.watch-value small { display: block; font-size: 12px; font-weight: 600; margin-top: 2px; letter-spacing: 0; }
.watch-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.watch-bar i { display: block; height: 100%; border-radius: 3px; }
.risk-high { color: #F06A6E; } .risk-high + .watch-bar i, .bar-high { background: #E5484D; }
.risk-mid { color: #F5B85A; } .bar-mid { background: #F2A93B; }
.risk-low { color: #57C98B; } .bar-low { background: #3DBE7A; }

/* Mirmoi */
.app--mirmoi { background: #E9ECFB; color: #1F2350; }
.app--mirmoi .app-icon { background: #2A2540; color: #fff; }
.app--mirmoi .status { background: rgba(74, 110, 240, 0.12); color: #3653D6; }
.affirm {
  justify-self: center;
  width: min(100%, 340px);
  aspect-ratio: 4 / 5;
  background: #FBFAFD;
  border-radius: 28px;
  padding: 32px 28px 26px;
  display: flex; flex-direction: column;
  box-shadow: 0 1px 0 rgba(31, 35, 80, 0.06), 0 18px 40px -24px rgba(60, 80, 200, 0.4);
}
.affirm-date { margin: 0; font-size: 13px; font-weight: 600; color: #756D90; }
.affirm-line {
  margin: auto 0;
  font-size: clamp(24px, 2.6vw, 28px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1F2350;
  text-wrap: balance;
}
.affirm-actions { display: flex; gap: 8px; }
.affirm-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  background: #ECEFFD; color: #3F5BD8;
}
.affirm-next { margin: 16px 0 0; font-size: 13px; color: #756E90; }

/* Also in development */
.also {
  display: grid; gap: 8px;
  padding: 24px clamp(28px, 4.5vw, 56px);
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--line);
}
@media (min-width: 860px) { .also { grid-template-columns: 1fr auto; align-items: center; gap: 32px; } }
.also h3 { margin: 0; font-size: 20px; letter-spacing: -0.015em; font-weight: 700; }
.also p { margin: 4px 0 0; color: var(--muted); max-width: 60ch; }
.also .status { background: #E6E9EE; color: var(--muted); justify-self: start; }

/* Approach */
.approach { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principles { display: grid; gap: 36px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 860px) { .principles { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
.principles li { border-top: 2px solid var(--ink); padding-top: 20px; }
.principles h3 { margin: 0 0 10px; font-size: 21px; letter-spacing: -0.015em; font-weight: 700; }
.principles p { margin: 0; color: var(--muted); }

/* Company + contact */
.company { display: grid; gap: 48px; }
@media (min-width: 860px) { .company { grid-template-columns: 1fr 1fr; gap: 64px; } }
.company h2 { margin: 0 0 18px; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
.company p { margin: 0 0 14px; color: var(--muted); max-width: 52ch; }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.facts div:first-child { border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { margin: 0; font-weight: 600; }
.facts a { text-underline-offset: 4px; }
@media (max-width: 420px) { .facts div { grid-template-columns: 1fr; gap: 4px; } }

/* Footer */
.site-footer { padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: grid; gap: 10px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.site-footer p { margin: 0; }

/* Text pages (privacy, 404) */
.prose { max-width: 64ch; padding-bottom: clamp(56px, 8vw, 96px); }
.prose h2 { margin: 40px 0 10px; font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; font-weight: 700; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0 0 14px; color: var(--muted); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 4px 0; }
.prose a { color: var(--ink); text-underline-offset: 4px; }
