/* ============================================================
   HEIMWALL — site-wide styles
   Tokens + nav + footer + shared components.
   Pages: index.html, virtual-appliance.html, contact.html
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-raise: #0b101a;
  --ink: #e8eef7;
  --body: #aab4c5;
  --muted: #8694ab;
  --faint: #5b6a82;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #545fc5;
  --accent2: #7c83f0;
  --accent-ink: #f4f6ff;
  /* readable tint of accent for small text/links on dark bg */
  --accent-text: #9aa3f2;
  --threat: #ff3b53;
  --maxw: 1180px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--font-mono); }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent-text);
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); flex: none; }
.eyebrow.center { justify-content: center; }
.eyebrow.center::after { content: ""; width: 26px; height: 1px; background: var(--accent); flex: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.5px; text-wrap: balance; }
.h-xl { font-size: clamp(40px, 5.6vw, 68px); }
.h-lg { font-size: clamp(30px, 3.6vw, 44px); }
.h-md { font-size: 22px; }
.lead { color: var(--body); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65; max-width: 56ch; text-wrap: pretty; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin: 16px 0 0; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- section rhythm ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section.raise { background: var(--bg-raise); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 28px; border-radius: 12px;
  font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: 0.3px;
  cursor: pointer; border: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease, background .2s ease, border-color .2s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary {
  color: var(--accent-ink);
  background: linear-gradient(100deg, var(--accent), color-mix(in oklab, var(--accent) 55%, var(--accent2)));
  box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--accent) 60%, transparent);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 16px 40px -12px color-mix(in oklab, var(--accent) 70%, transparent); }
.btn-ghost {
  color: var(--ink); background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: color-mix(in oklab, var(--accent) 50%, transparent); color: var(--accent); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 72px; flex-wrap: nowrap; }
.nav-brand { display: flex; align-items: center; color: var(--ink); }
.nav-brand img { height: 28px; width: auto; filter: drop-shadow(0 0 9px color-mix(in oklab, var(--accent) 55%, transparent)); }
.nav-brand .logo-mark { display: none; }
.nav-brand .wm { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 2.5px; }
.nav-brand .wm b { color: var(--accent); font-weight: 700; }
.nav-links { display: flex; gap: 2px; margin-left: 6px; flex: 1; }
.nav-links a {
  color: var(--muted); font-size: 14px; padding: 7px 11px; border-radius: 9px;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.nav-links a.active { color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: 10px; flex: none; }
.nav-cta .signin { color: var(--muted); font-size: 14.5px; transition: color .15s; }
.nav-cta .signin:hover { color: var(--ink); }
.nav-cta .btn { height: 42px; padding: 0 20px; font-size: 14px; }
.nav-burger { display: none; background: none; border: 1px solid var(--line); border-radius: 9px; width: 42px; height: 42px; color: var(--ink); cursor: pointer; font-size: 18px; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.03);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238694ab' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  border: 1px solid var(--line); border-radius: 9px;
  color: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px;
  height: 42px; padding: 0 32px 0 14px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.lang-select:hover, .lang-select:focus { color: var(--ink); border-color: color-mix(in oklab, var(--accent) 50%, transparent); outline: none; }
.lang-select option { background: var(--bg-raise); color: var(--ink); }

/* below ~1120px the full nav gets tight — drop the secondary "Sign In" link */
@media (max-width: 1120px) { .nav-cta .signin { display: none; } }

@media (max-width: 920px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--bg-raise); border-bottom: 1px solid var(--line); padding: 12px 20px 20px; margin: 0; }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .nav-burger { display: grid; place-items: center; margin-left: auto; }
  .nav-cta .signin { display: none; }
  .nav-inner { gap: 14px; }
  .nav-brand .logo-full { display: none; }
  .nav-brand .logo-mark { display: block; height: 32px; }
}

/* ---------- cards ---------- */
.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.card:hover { border-color: color-mix(in oklab, var(--accent) 35%, transparent); transform: translateY(-3px); background: rgba(255, 255, 255, 0.03); }
.card .ic {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: color-mix(in oklab, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
  color: var(--accent);
}
.card .ic svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.65; margin: 0; }
.card .more { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-size: 14px; font-weight: 500; font-family: var(--font-display); }
.card .more svg { width: 15px; height: 15px; transition: transform .15s; }
.card:hover .more svg { transform: translateX(3px); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 980px) { .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }
.stat { border-left: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); padding: 6px 0 6px 22px; }
.stat .num { font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 4vw, 52px); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .num b { color: var(--accent); font-weight: 600; }
.stat .lbl { font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-top: 10px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 980px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,0.02); }
.step .n {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px; color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.step .n::after { content: ""; width: 34px; height: 1px; background: color-mix(in oklab, var(--accent) 50%, transparent); }
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ---------- feature list (compact) ---------- */
.feature {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,0.02);
  transition: border-color .2s;
}
.feature:hover { border-color: color-mix(in oklab, var(--accent) 35%, transparent); }
.feature .fic { color: var(--accent); flex: none; margin-top: 2px; }
.feature .fic svg { width: 20px; height: 20px; }
.feature h4 { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 0 0 5px; }
.feature p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
  border-radius: 20px;
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  background:
    radial-gradient(90% 120% at 50% 0%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 60%),
    var(--bg-raise);
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band .lead { margin: 0 auto 30px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- forms ---------- */
.field label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-family: var(--font-body); font-size: 15px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #4d5a70; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: color-mix(in oklab, var(--accent) 70%, transparent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 14%, transparent);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238694ab' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-raise); padding: clamp(48px, 6vw, 72px) 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 48px; }
@media (max-width: 920px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand img { height: 24px; width: auto; filter: drop-shadow(0 0 8px color-mix(in oklab, var(--accent) 45%, transparent)); }
.footer-brand .wm { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 2px; }
.footer-brand .wm b { color: var(--accent); }
.footer p.about { color: var(--muted); font-size: 13.5px; line-height: 1.7; margin: 0 0 18px; max-width: 32ch; }
.footer h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); margin: 0 0 16px; font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--muted); font-size: 14px; transition: color .15s; }
.footer ul a:hover { color: var(--accent); }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--muted);
  transition: color .15s, border-color .15s;
}
.socials a:hover { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 50%, transparent); }
.socials svg { width: 16px; height: 16px; }
.footer-legal {
  border-top: 1px solid var(--line); padding-top: 26px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.5px; color: var(--faint);
}
.footer-legal .legal-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-legal .legal-links a { color: var(--muted); }
.footer-legal .legal-links a:hover { color: var(--accent); }

/* ---------- scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rv { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
  .rv.in { opacity: 1; transform: none; }
}

/* ---------- page hero (subpages) ---------- */
.page-hero { padding: clamp(56px, 8vw, 100px) 0 clamp(40px, 5vw, 64px); position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 90% at 80% -20%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 60%);
}
.crumb { font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.5px; color: var(--faint); margin-bottom: 22px; display: flex; gap: 10px; align-items: center; text-transform: uppercase; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }

/* ---------- spec table ---------- */
.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec th, .spec td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.spec th { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.spec td { color: var(--body); }
.spec td:first-child { color: var(--ink); font-weight: 500; font-family: var(--font-display); }
.spec tr:hover td { background: rgba(255,255,255,0.015); }
.tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; color: var(--accent); border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent); border-radius: 999px; padding: 3px 10px; }

/* ---------- included list ---------- */
.incl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 26px; margin-top: 8px; }
@media (max-width: 820px) { .incl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .incl-grid { grid-template-columns: 1fr; } }
.incl-grid li { list-style: none; display: flex; align-items: flex-start; gap: 11px; color: var(--body); font-size: 14.5px; padding: 7px 0; }
.incl-grid { padding: 0; margin-left: 0; }
.incl-grid .chk { flex: none; margin-top: 2px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 16%, transparent); color: var(--accent); }
.incl-grid .chk svg { width: 11px; height: 11px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.02); margin-bottom: 12px; overflow: hidden; }
.faq details[open] { border-color: color-mix(in oklab, var(--accent) 35%, transparent); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-family: var(--font-display); font-weight: 500; font-size: 16px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .caret { flex: none; transition: transform .2s; color: var(--accent); }
.faq details[open] summary .caret { transform: rotate(45deg); }
.faq .ans { padding: 0 22px 20px; color: var(--muted); font-size: 14.5px; line-height: 1.7; margin: 0; }

/* ---------- legal pages ---------- */
.legal { max-width: 820px; }
.legal .updated { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.5px; color: var(--faint); margin: 0 0 30px; }
.legal h2 { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin: 38px 0 12px; }
.legal p { color: var(--body); margin: 0 0 14px; }
.legal ul { color: var(--body); margin: 0 0 16px; padding-left: 22px; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--accent-text); text-decoration: underline; }
.legal .todo { display: inline-block; font-family: var(--font-mono); font-size: 11.5px; color: var(--threat); border: 1px solid color-mix(in oklab, var(--threat) 40%, transparent); border-radius: 6px; padding: 1px 7px; }

/* ---------- inline form/info note ---------- */
.form-note { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.5px; color: var(--faint); display: flex; align-items: flex-start; gap: 8px; margin: 0; line-height: 1.5; }
.form-note svg { width: 14px; height: 14px; min-width: 14px; color: var(--accent); flex: none; margin-top: 1px; }
