/* ============================================================
   Kommanda — Premium Dark Mac Utility / AI Command Center
   Shared design system
   ============================================================ */

:root {
  /* Surfaces */
  --bg: #05070D;
  --bg-2: #080B12;
  --surface: #0F1420;
  --surface-2: #151B2A;
  --surface-3: #1B2335;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --text: #F8FAFC;
  --muted: #AAB4C3;
  --faint: #667085;

  /* Accents */
  --blue: #3B82F6;
  --cyan: #38BDF8;
  --violet: #8B5CF6;
  --green: #22C55E;

  --grad-cta: linear-gradient(135deg, #3B82F6 0%, #38BDF8 100%);
  --grad-ai: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);

  /* Type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Monaco, Consolas, monospace;

  /* Rhythm */
  --maxw: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(56, 189, 248, 0.28); color: #fff; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 120px 0; position: relative; }
.section--tight { padding: 84px 0; }
.center { text-align: center; }
.stack-sm > * + * { margin-top: 14px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 18px;
  font-weight: 500;
}

h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.04; margin: 0; font-weight: 650; }
h1 { font-size: clamp(40px, 6.2vw, 74px); }
h2 { font-size: clamp(30px, 4.4vw, 50px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.02em; }

.lead {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--muted);
  line-height: 1.55;
  max-width: 60ch;
}
.section-head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.section-head .lead { margin: 20px auto 0; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 560;
  letter-spacing: -0.01em;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  color: #04101f;
  background: var(--grad-cta);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 28px -8px rgba(56,189,248,.55);
  font-weight: 620;
}
.btn--primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 14px 40px -8px rgba(56,189,248,.7); transform: translateY(-1px); }

.btn--ghost {
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.22); }

.btn--sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.btn--lg { padding: 16px 28px; font-size: 17px; border-radius: 13px; }

/* ---------- Keyboard / mono pills ---------- */
kbd, .kbd {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-bottom-color: rgba(0,0,0,0.5);
  border-radius: 7px;
  padding: 3px 8px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.4);
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.pill {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.pill .dot--green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.pill .dot--violet { background: var(--violet); box-shadow: 0 0 8px var(--violet); }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 7px 7px 14px;
  backdrop-filter: blur(8px);
  text-align: left;
}
.badge .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #04101f;
  background: var(--grad-cta);
  border-radius: 999px;
  padding: 3px 9px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, #0C111B 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color .25s ease, box-shadow .3s ease, transform .25s ease;
}
.card:hover {
  border-color: rgba(56,189,248,0.30);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.06), 0 24px 60px -30px rgba(56,189,248,0.35);
  transform: translateY(-3px);
}
.card .ic {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  color: var(--cyan);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; font-size: 15.5px; }

/* line icon defaults */
.ic svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.6; fill: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5,7,13,0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand .logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--grad-ai);
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; color: #fff; font-size: 16px;
  box-shadow: 0 4px 14px -4px rgba(139,92,246,.7);
}
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-size: 14.5px; color: var(--muted); transition: color .18s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.menu-btn { display: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 64px 0 40px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin: 0 0 16px; font-weight: 600; }
.footer-grid a { display: block; color: var(--muted); font-size: 14.5px; margin-bottom: 11px; transition: color .15s; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; color: var(--faint); font-size: 13.5px; flex-wrap: wrap; gap: 12px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); }
.footer-social a:hover { border-color: var(--border-strong); color: var(--text); }
.footer-social svg { width: 16px; height: 16px; }

/* ---------- macOS window frame ---------- */
.mac {
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 120px -40px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.03);
  overflow: hidden;
}
.mac__bar {
  height: 40px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 14px;
  background: linear-gradient(180deg, #161C2A, #11161F);
  border-bottom: 1px solid var(--border);
}
.mac__dots { display: flex; gap: 8px; }
.mac__dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.mac__dots i:nth-child(1){ background:#FF5F57; }
.mac__dots i:nth-child(2){ background:#FEBC2E; }
.mac__dots i:nth-child(3){ background:#28C840; }
.mac__title { font-family: var(--mono); font-size: 12px; color: var(--faint); margin: 0 auto; }
.mac img { width: 100%; display: block; }

/* glow wrapper for hero/screens */
.glow-wrap { position: relative; }
.glow-wrap::before {
  content: ""; position: absolute; inset: -2% -2% -8%;
  background: radial-gradient(60% 60% at 50% 0%, rgba(59,130,246,0.35), transparent 70%);
  filter: blur(40px); z-index: -1; opacity: .8;
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 4px 24px;
  margin-bottom: 12px;
  transition: border-color .2s;
}
.faq details[open] { border-color: rgba(56,189,248,0.25); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 0;
  font-size: 17.5px; font-weight: 540; letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { transition: transform .25s; color: var(--faint); flex-shrink: 0; }
.faq details[open] summary .chev { transform: rotate(45deg); color: var(--cyan); }
.faq .faq-a { color: var(--muted); padding: 0 0 22px; font-size: 16px; max-width: 64ch; margin: 0; }

/* ---------- utility ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

.glass {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

/* reveal on scroll — content is always full-opacity; the entrance animates
   transform ONLY, so a paused/throttled timeline (or failed script) can never
   hide anything. Subtle upward rise on enter. */
.js .reveal.in { animation: reveal-in .7s cubic-bezier(.2,.7,.2,1); }
@keyframes reveal-in { from { transform: translateY(22px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal.in { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split--rev .split__media { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .section { padding: 88px 0; }
  .nav-links { display: none; }
  .menu-btn {
    display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text);
  }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 68px 0; }
  .wrap { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .card { padding: 24px; }
  .nav-cta .btn--ghost { display: none; }
}
