/* =========================================================
   Boschlogic.nl — landing page
   Theme: balanced blue-gray, restrained Boschlogic blue. OKLCH tokens.
   ========================================================= */

:root {
  /* Color */
  --bg:            oklch(0.94 0.008 232);
  --bg-elevated:   oklch(0.96 0.006 232);
  --surface:       oklch(0.97 0.005 232);
  --surface-2:     oklch(0.95 0.007 232);
  --border:        oklch(0.48 0.022 235 / 0.22);
  --border-strong: oklch(0.40 0.055 244 / 0.36);
  --ink:           oklch(0.22 0.038 252);
  --ink-soft:      oklch(0.32 0.033 248);
  --muted:         oklch(0.42 0.028 246);
  --accent:        oklch(0.48 0.13 246);
  --accent-strong: oklch(0.40 0.13 250);
  --accent-bright: oklch(0.58 0.12 231);
  --accent-ink:    oklch(0.97 0.012 235);
  --violet-glow:   oklch(0.62 0.08 282);

  /* Type */
  --font-display: "Satoshi", "Satoshi Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Satoshi", "Satoshi Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Fluid type scale (ratio ~1.25) */
  --fs-hero:  clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem);
  --fs-h2:    clamp(1.9rem, 1.35rem + 2.4vw, 3rem);
  --fs-h3:    clamp(1.2rem, 1.02rem + 0.7vw, 1.5rem);
  --fs-lead:  clamp(1.05rem, 0.98rem + 0.45vw, 1.3rem);
  --fs-body:  1rem;
  --fs-sm:    0.875rem;

  /* Spacing rhythm */
  --space-section: clamp(4.5rem, 3rem + 7vw, 9rem);
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 2.5rem);
  --maxw: 1200px;

  --radius:    16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.10);
  --shadow-md: 0 6px 12px -8px oklch(0.18 0.03 250 / 0.28);
  --shadow-glow: 0 0 0 1px var(--border-strong);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* z-index scale */
  --z-base: 1;
  --z-sticky: 100;
  --z-drawer: 200;
  --z-skip: 300;
}

/* Metric-matched fallback — width-tuned to the web font (measured vs Arial)
   so the page doesn't reflow when Satoshi swaps in. */
@font-face {
  font-family: "Satoshi Fallback";
  src: local("Arial");
  size-adjust: 97%;
  ascent-override: 98%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-optical-sizing: auto;
  font-synthesis: none; /* never fake weights/italics from the fallback */
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--space-section); }

.skip-link {
  position: absolute;
  left: 50%; top: -100px;
  transform: translateX(-50%);
  z-index: var(--z-skip);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s var(--ease-out-quart);
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--fs-hero); font-weight: 700; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.12; letter-spacing: 0; }
p { text-wrap: pretty; }

.kicker {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.section-head {
  max-width: 46ch;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}
.section-lead {
  margin-top: 1rem;
  font-size: var(--fs-lead);
  color: var(--muted);
  max-width: 52ch;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-py: 0.8rem;
  --btn-px: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--btn-py) var(--btn-px);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.005em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out-expo),
              background-color 0.25s var(--ease-out-quart),
              box-shadow 0.25s var(--ease-out-quart),
              border-color 0.25s var(--ease-out-quart),
              color 0.2s;
  will-change: transform;
}
.btn-sm { --btn-py: 0.55rem; --btn-px: 1rem; font-size: 0.875rem; }
.btn-lg { --btn-py: 0.95rem; --btn-px: 1.8rem; font-size: 1.05rem; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 24px -16px oklch(0.33 0.12 248 / 0.7);
}
.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -18px oklch(0.33 0.12 248 / 0.78);
}
.btn-primary:active { transform: translateY(0) scale(0.97); transition-duration: 0.09s; }
.btn-ghost:active { transform: translateY(0) scale(0.97); transition-duration: 0.09s; }

.btn-ghost {
  background: oklch(0.97 0.005 232 / 0.56);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.btn-arrow { width: 16px; height: 16px; transition: transform 0.25s var(--ease-out-expo); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: background-color 0.3s var(--ease-out-quart),
              border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: oklch(0.96 0.006 232 / 0.86);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand-tld { color: var(--accent); }

.primary-nav { display: flex; gap: 0.4rem; }
.primary-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.primary-nav a:hover { color: var(--ink); background: oklch(0.97 0.005 232 / 0.62); }

.header-actions { display: flex; align-items: center; gap: 0.9rem; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: oklch(0.97 0.005 232 / 0.52);
}
.lang-btn {
  background: none;
  border: none;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.lang-btn.is-active { color: var(--accent-ink); background: var(--accent); }
.lang-btn:not(.is-active):hover { color: var(--ink); }
.lang-sep { color: var(--border-strong); font-size: 0.8rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: oklch(0.97 0.005 232 / 0.58);
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem var(--gutter) 1.5rem;
  background: oklch(0.96 0.006 232 / 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav.is-open { display: flex; animation: drawer 0.3s var(--ease-out-expo); }
.mobile-nav nav { display: flex; flex-direction: column; }
.mobile-nav nav a {
  padding: 0.85rem 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--border);
}
.mobile-nav .btn { margin-top: 1rem; }
@keyframes drawer { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero (responsive split, animated retro grid) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(3.5rem, 2rem + 6vw, 7rem);
  padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem);
}

/* Top spotlight glow */
.hero-topglow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 130%);
  height: 65vh;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 48% 75% at 50% 0%, oklch(0.58 0.12 231 / 0.22), transparent 72%);
}

/* Retro perspective grid */
.retro-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  perspective: 200px;
  opacity: 0.34;
  pointer-events: none;
}
.retro-grid__plane {
  position: absolute;
  inset: 0;
  transform: rotateX(65deg);
}
.retro-grid__lines {
  position: absolute;
  top: -50%; left: 0;
  height: 300vh;
  width: 600vw;
  margin-left: -200%;
  transform-origin: 100% 0 0;
  background-image:
    linear-gradient(to right, oklch(0.39 0.08 246 / 0.26) 1px, transparent 0),
    linear-gradient(to bottom, oklch(0.39 0.08 246 / 0.26) 1px, transparent 0);
  background-repeat: repeat;
  background-size: 50px 50px;
  animation: retro-grid 22s linear infinite;
  will-change: transform;
}
@keyframes retro-grid {
  0% { transform: translateY(0); }
  100% { transform: translateY(50px); }
}
.retro-grid__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 55%, transparent 90%, var(--bg) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.75rem, 1.5rem + 5vw, 5rem);
  align-items: center;
  text-align: center;
}

.hero-copy {
  width: 100%;
  max-width: 48rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: linear-gradient(to top right, oklch(0.97 0.005 232 / 0.68), transparent);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.hero-badge:hover { color: var(--ink-soft); border-color: var(--border-strong); }
.hero-badge__chev { width: 15px; height: 15px; transition: transform 0.3s var(--ease-out-expo); }
.hero-badge:hover .hero-badge__chev { transform: translateX(3px); }

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 oklch(0.48 0.13 246 / 0.42);
  animation: pulse 2.4s var(--ease-out-quart) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 oklch(0.48 0.13 246 / 0.42); }
  70% { box-shadow: 0 0 0 7px oklch(0.48 0.13 246 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(0.48 0.13 246 / 0); }
}

.hero-title {
  margin-top: 1.7rem;
  width: 100%;
  max-width: min(17.5ch, 100%);
  line-height: 1.08;
  letter-spacing: -0.012em;
}
.cascade-text {
  display: block;
  cursor: default;
  color: var(--ink);
  transition: color 0.35s var(--ease-out-quart);
}
.cascade-text:hover {
  color: var(--accent);
}
.cascade-text__word {
  display: inline-flex;
  white-space: nowrap;
}
.cascade-text__clip {
  display: inline-block;
  overflow: visible;
  line-height: 1;
  vertical-align: baseline;
}
.cascade-text__glyph {
  display: inline-block;
  position: relative;
  line-height: 1;
  transform: translateY(0);
  transition: transform 280ms var(--ease-out-quart);
  transition-delay: var(--cascade-delay, 0ms);
  will-change: transform;
}
.cascade-text__face {
  display: inline-block;
  line-height: 1;
}
.cascade-text__face--next {
  display: none;
}
.cascade-text:hover .cascade-text__glyph {
  transform: translateY(-0.08em);
}

.hero-sub {
  margin-top: 1.4rem;
  font-size: var(--fs-lead);
  color: var(--muted);
  max-width: 56ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 2.2rem;
  width: 100%;
}

/* Spinning conic-border CTA */
.btn-spin {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  padding: 1.5px;
  border-radius: var(--radius-pill);
}
.btn-spin__border {
  position: absolute;
  inset: -150%;
  background: conic-gradient(from 90deg at 50% 50%, var(--accent-bright) 0%, var(--accent-strong) 50%, var(--accent-bright) 100%);
  animation: spin 2.6s linear infinite;
  will-change: transform;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-spin__inner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.005em;
  transition: background-color 0.25s var(--ease-out-quart);
}
.btn-spin__inner:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn-spin:active { transform: scale(0.97); transition: transform 0.09s; }

/* Custom dashboard preview */
.hero-preview {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(960px, 100%);
  min-width: 0;
  overflow: hidden;
}
.hero-preview__frame {
  width: 100%;
  border: 1px solid oklch(0.58 0.030 235 / 0.28);
  border-radius: clamp(12px, 0.5rem + 1vw, 18px);
  background: linear-gradient(180deg, oklch(0.91 0.016 232), oklch(0.85 0.020 233));
  box-shadow: 0 8px 24px -12px oklch(0.35 0.06 248 / 0.18);
  overflow: hidden;
}
.dash { display: flex; flex-direction: column; min-width: 0; }
.dash__topbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid oklch(0 0 0 / 0.07);
  background: oklch(0.89 0.018 232 / 0.9);
}
.dash__dot { width: 8px; height: 8px; border-radius: 50%; background: oklch(0.72 0.018 235); }
.dash__dot:first-child { background: var(--accent); }
.dash__url {
  margin-left: 0.7rem;
  font-size: 0.7rem;
  color: oklch(0.44 0.030 248);
  letter-spacing: 0.02em;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius-pill);
  background: oklch(0 0 0 / 0.05);
  font-variant-ligatures: none;
}
.dash__body { display: flex; min-height: 230px; text-align: left; }
.dash__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  width: 58px;
  padding: 1rem 0;
  border-right: 1px solid oklch(0 0 0 / 0.07);
  background: oklch(0.86 0.022 233 / 0.7);
}
.dash__logo {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  margin-bottom: 0.5rem;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}
.dash__navitem { width: 22px; height: 22px; border-radius: 7px; background: oklch(0 0 0 / 0.08); }
.dash__navitem.is-active { background: oklch(0.48 0.13 246 / 0.20); }
.dash__navitem--foot { margin-top: auto; }
.dash__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
}
.dash__head { display: flex; align-items: center; justify-content: space-between; }
.dash__title { width: 140px; height: 13px; border-radius: 6px; background: oklch(0 0 0 / 0.10); }
.dash__pill { width: 74px; height: 26px; border-radius: var(--radius-pill); background: oklch(0.48 0.13 246 / 0.22); }
.dash__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.dash__stat {
  min-width: 0;
  height: 60px;
  display: flex;
  align-items: flex-end;
  padding: 0.55rem;
  border: 1px solid oklch(0 0 0 / 0.07);
  border-radius: 11px;
  background: oklch(0.92 0.012 232);
}
.dash__statbar { width: 100%; height: var(--h); border-radius: 5px; background: linear-gradient(180deg, var(--accent-bright), var(--accent)); opacity: 0.85; }
.dash__panel {
  padding: 0.8rem 0.9rem;
  border: 1px solid oklch(0 0 0 / 0.07);
  border-radius: 12px;
  background: oklch(0.92 0.012 232);
}
.dash__chart { display: block; width: 100%; height: auto; }
.dash__rows { display: flex; flex-direction: column; gap: 0.55rem; }
.dash__row { height: 9px; width: var(--w); border-radius: var(--radius-pill); background: oklch(0 0 0 / 0.08); }

@media (min-width: 940px) {
  .hero {
    padding-top: clamp(4.25rem, 2.25rem + 5vw, 7rem);
    padding-bottom: clamp(4rem, 2rem + 4vw, 6rem);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: clamp(2rem, 2vw, 3.25rem);
    text-align: left;
  }

  .hero-copy {
    max-width: 34rem;
    justify-self: start;
  }

  .hero-title {
    max-width: 12.8ch;
  }

  .hero-sub {
    max-width: 44ch;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-preview {
    max-width: none;
    justify-self: stretch;
  }

  .dash__body {
    min-height: clamp(230px, 20vw, 290px);
  }

  .dash__side {
    width: clamp(48px, 4.5vw, 58px);
  }

  .dash__main {
    padding: clamp(0.9rem, 1.3vw, 1.2rem);
    gap: clamp(0.75rem, 1vw, 1rem);
  }
}

@media (min-width: 940px) and (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: minmax(0, 0.88fr) minmax(390px, 1.12fr);
  }

  .hero-title {
    font-size: clamp(2.45rem, 1.05rem + 3.9vw, 4rem);
  }

  .dash__stat {
    height: 52px;
  }
}

/* ---------- Services (service rails) ---------- */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.7rem, 0.35rem + 0.8vw, 1rem);
}
.bento-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface), oklch(0.95 0.008 232));
  overflow: hidden;
  transition: transform 0.35s var(--ease-out-expo),
              border-color 0.3s,
              background-color 0.25s var(--ease-out-quart);
}
.bento-card--wide { grid-column: auto; }
.bento-card:hover {
  transform: translateX(4px);
  border-color: var(--border-strong);
  background: var(--surface);
}

.bento-card__dots { display: none; }
.bento-card.is-spotlight {
  border-color: oklch(0.48 0.13 246 / 0.45);
  background:
    radial-gradient(85% 180% at 0% 50%, oklch(0.58 0.12 231 / 0.18), transparent 54%),
    linear-gradient(90deg, oklch(0.97 0.012 235), var(--surface));
}

.bento-card__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(8.25rem, auto) minmax(0, 1fr) minmax(12rem, auto);
  align-items: center;
  gap: clamp(1rem, 0.55rem + 1.2vw, 1.75rem);
  height: 100%;
  padding: clamp(1rem, 0.75rem + 0.75vw, 1.4rem);
}
.bento-card__top { display: flex; align-items: center; justify-content: flex-start; gap: 0.7rem; }
.bento-card__icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: oklch(0.48 0.13 246 / 0.10);
  border: 1px solid oklch(0.48 0.13 246 / 0.22);
  color: var(--accent);
  flex: none;
}
.bento-card__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bento-card__status {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-pill);
  color: var(--accent-strong);
  background: oklch(0.48 0.13 246 / 0.10);
  white-space: nowrap;
}
.bento-card__head { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.bento-card__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--ink);
  font-size: clamp(1.15rem, 1.04rem + 0.45vw, 1.45rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}
.bento-card__meta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.bento-card__desc { color: var(--muted); font-size: 0.97rem; line-height: 1.5; max-width: 58ch; }
.bento-card__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 0;
  padding-top: 0;
  min-width: 0;
}
.bento-card__tags { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.35rem; }
.bento-card__tags span {
  font-size: 0.72rem;
  color: var(--ink-soft);
  padding: 0.22rem 0.55rem;
  border-radius: 8px;
  background: oklch(0.90 0.008 232 / 0.52);
  transition: background-color 0.2s, color 0.2s;
}
.bento-card:hover .bento-card__tags span { background: oklch(0.87 0.010 232 / 0.52); color: var(--ink); }
.bento-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent-strong);
}
.bento-card__cta svg { width: 15px; height: 15px; transition: transform 0.25s var(--ease-out-expo); }
.bento-card__cta:hover svg { transform: translateX(3px); }
.bento-card--wide .bento-card__title { font-size: clamp(1.2rem, 1.06rem + 0.55vw, 1.55rem); }
.bento-card--wide .bento-card__desc { font-size: 1rem; color: var(--ink-soft); }

/* ---------- Beetle feature ---------- */
.beetle { background: var(--bg-elevated); position: relative; overflow: hidden; }
.beetle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 15% 50%, oklch(0.58 0.12 231 / 0.12), transparent 60%);
  pointer-events: none;
}
.beetle-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.beetle-copy { max-width: 44ch; }
.beetle-lead { margin-top: 0.9rem; font-size: var(--fs-lead); color: var(--muted); }
.beetle .kicker { display: block; margin-bottom: 0.9rem; }
.beetle h2 { margin-bottom: 0; }
.beetle .btn { max-width: 100%; white-space: normal; text-align: center; }
.beetle-points { list-style: none; padding: 0; margin: 1.6rem 0 2rem; display: grid; gap: 0.85rem; }
.beetle-points li { display: flex; align-items: center; gap: 0.7rem; color: var(--ink-soft); }
.beetle-points svg {
  width: 16px; height: 16px; flex: none;
  color: var(--accent);
  background: oklch(0.48 0.13 246 / 0.12);
  border-radius: 50%;
  padding: 6px;
  box-sizing: content-box;
}

.beetle-visual { display: grid; place-items: center; }
.beetle-card-link { display: block; width: min(360px, 100%); text-decoration: none; border-radius: var(--radius); }
.beetle-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border: 1px solid oklch(0.55 0.08 155 / 0.30);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 50% 0%, oklch(0.97 0.020 155), oklch(0.93 0.025 155));
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-out-expo);
}
.beetle-card-link:hover .beetle-card {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -12px oklch(0.35 0.10 155 / 0.28);
}
.beetle-logo { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.beetle-bug { width: 72px; height: 72px; }
.beetle-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: 0;
  color: oklch(0.22 0.06 155);
}
.beetle-url {
  font-size: 0.85rem;
  color: oklch(0.42 0.07 155);
  letter-spacing: 0.02em;
  font-variant-ligatures: none; /* technical string — render literally */
}
.beetle-shine {
  position: absolute;
  top: -50%; left: -30%;
  width: 60%; height: 200%;
  background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.28), transparent);
  transform: rotate(18deg);
  animation: shine 6s ease-in-out infinite;
}
@keyframes shine { 0%, 100% { transform: translateX(0) rotate(18deg); } 50% { transform: translateX(280%) rotate(18deg); } }

/* ---------- Why (feature grid cards) ---------- */
.why {
  position: relative;
  isolation: isolate;
}
/* Brand glow anchored at the top of the section */
.why::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 65%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 62% 80% at 50% 0%, oklch(0.58 0.12 231 / 0.16), transparent 70%);
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.why-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.5rem, 1rem + 1.5vw, 2rem);
  overflow: hidden;
  border-top: 1px dashed var(--border);
}
.why-item:first-child { border-top: none; }

/* Decorative fading grid pattern — top-anchored, on-brand blue */
.why-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 130%;
  height: 100%;
  transform: translateX(-50%);
  background-image:
    linear-gradient(to right, oklch(0.48 0.13 246 / 0.10) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.48 0.13 246 / 0.10) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(farthest-side at top, white, transparent);
  mask-image: radial-gradient(farthest-side at top, white, transparent);
  pointer-events: none;
}

.why-mark {
  position: relative;
  z-index: 1;
  color: var(--accent);
}
.why-mark svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.why-item h3 {
  position: relative;
  z-index: 1;
  margin-top: 2.5rem;
  color: var(--ink);
  font-size: 1.05rem;
}
.why-item p {
  position: relative;
  z-index: 1;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  max-width: 34ch;
}

@media (min-width: 640px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
  .why-item { border-top: 1px dashed var(--border); border-left: 1px dashed var(--border); }
  .why-item:nth-child(1), .why-item:nth-child(2) { border-top: none; }
  .why-item:nth-child(odd) { border-left: none; }
}

/* ---------- Final CTA ---------- */
.cta-panel {
  position: relative;
  text-align: center;
  padding: clamp(3rem, 2rem + 5vw, 5.5rem) clamp(1.5rem, 1rem + 3vw, 4rem);
  border: 1px solid var(--border-strong);
  border-radius: clamp(16px, 1rem + 1vw, 24px);
  background:
    radial-gradient(90% 120% at 50% 0%, oklch(0.58 0.12 231 / 0.18), transparent 58%),
    linear-gradient(180deg, oklch(0.96 0.010 233), oklch(0.92 0.012 232));
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  top: -60%; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 120%;
  background: radial-gradient(circle at 50% 30%, oklch(0.58 0.12 231 / 0.22), transparent 60%);
  filter: blur(18px);
  pointer-events: none;
}
.cta-panel h2 { position: relative; max-width: 18ch; margin-inline: auto; }
.cta-panel p {
  position: relative;
  margin: 1.1rem auto 2rem;
  max-width: 50ch;
  font-size: var(--fs-lead);
  color: var(--muted);
}
.cta-panel .btn { position: relative; }

/* ---------- Contact Card ---------- */
#contact {
  position: relative;
  isolation: isolate;
}
/* Brand glow anchored at the bottom of the section */
#contact::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 65%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 62% 80% at 50% 100%, oklch(0.58 0.12 231 / 0.16), transparent 70%);
}
.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: visible;
}

@media (min-width: 680px) {
  .contact-card { grid-template-columns: 1.65fr 1fr; }
}

.contact-card__plus {
  position: absolute;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1;
  color: var(--muted);
  pointer-events: none;
}
.contact-card__plus--tl { top: -0.55rem; left: -0.55rem; }
.contact-card__plus--tr { top: -0.55rem; right: -0.55rem; }
.contact-card__plus--bl { bottom: -0.55rem; left: -0.55rem; }
.contact-card__plus--br { bottom: -0.55rem; right: -0.55rem; }

.contact-card__info {
  padding: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact-card__info h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); }
.contact-card__desc {
  color: var(--muted);
  font-size: var(--fs-lead);
  max-width: 46ch;
}
.contact-card__items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
}
.contact-card__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-card__item:last-child { border-bottom: none; }
.contact-card__item-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 10px;
  background: oklch(0.48 0.13 246 / 0.10);
  border: 1px solid oklch(0.48 0.13 246 / 0.18);
  color: var(--accent);
}
.contact-card__item-icon svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-card__item-label { font-weight: 600; font-size: 0.875rem; color: var(--ink); }
.contact-card__item-value { font-size: 0.8rem; color: var(--muted); }

.contact-card__form-wrap {
  padding: clamp(1.75rem, 1.25rem + 2vw, 3rem);
  background: oklch(0.48 0.13 246 / 0.04);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}
@media (min-width: 680px) {
  .contact-card__form-wrap {
    border-top: none;
    border-left: 1px solid var(--border);
    border-radius: 0 var(--radius) var(--radius) 0;
  }
}

.contact-form { display: flex; flex-direction: column; gap: 1rem; height: 100%; }
.contact-form__field { display: flex; flex-direction: column; gap: 0.4rem; }
.contact-form__field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}
.contact-form__field input:focus,
.contact-form__field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.48 0.13 246 / 0.12);
}
.contact-form__field textarea { resize: vertical; min-height: 96px; }
.contact-form__submit { width: 100%; margin-top: 0.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand .brand-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.footer-brand p { margin-top: 0.6rem; color: var(--muted); max-width: 34ch; font-size: 0.95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.footer-nav a { color: var(--muted); font-size: 0.95rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Reveal animations ----------
   Hidden state is scoped to html.js so content is visible by default
   (no-JS / prerender / headless never ship blank). JS adds .is-visible. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out-quart), transform 0.7s var(--ease-out-expo);
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Hero entrance (one signature load choreography) ---------- */
html.js .hero-badge,
html.js .hero-title,
html.js .hero-sub,
html.js .hero-actions,
html.js .hero-preview {
  animation: hero-rise 0.85s var(--ease-out-expo) both;
}
html.js .hero-badge   { animation-delay: 0.05s; }
html.js .hero-title   { animation-delay: 0.13s; }
html.js .hero-sub     { animation-delay: 0.24s; }
html.js .hero-actions { animation-delay: 0.34s; }
html.js .hero-preview { animation: hero-panel-in 1.05s var(--ease-out-expo) 0.44s both; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes hero-panel-in {
  from { opacity: 0; transform: translateY(24px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
/* JS sets .reveal-now when the page is hidden/headless. CSS animations AND
   transitions pause while hidden, so force the end state with no motion —
   otherwise reveals/entrance stall at opacity 0 and capture blank. */
html.reveal-now [data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
}
html.reveal-now .hero-badge,
html.reveal-now .hero-title,
html.reveal-now .hero-sub,
html.reveal-now .hero-actions,
html.reveal-now .hero-preview {
  animation: none;
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .beetle-inner { grid-template-columns: 1fr; }
  .beetle-copy { max-width: none; }
}

@media (max-width: 900px) {
  .primary-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .bento-card--wide { grid-column: auto; }
}

@media (max-width: 760px) {
  .bento-card:hover {
    transform: translateY(-2px);
  }

  .bento-card__inner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.9rem;
  }

  .bento-card__top,
  .bento-card__foot {
    width: 100%;
    justify-content: space-between;
  }

  .bento-card__tags {
    justify-content: flex-start;
  }

  /* Dashboard mock: drop the sidebar and tighten on small screens */
  .dash__side { display: none; }
  .dash__main { padding: 1rem; gap: 0.85rem; }
  .dash__stats { gap: 0.55rem; }
  .dash__stat { height: 52px; }
  .dash__body { min-height: 0; }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 3rem;
  }

  .hero-inner {
    gap: 2.5rem;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-title {
    font-size: clamp(2.35rem, 11.5vw, 2.8rem);
    max-width: 10.5ch;
  }

  .hero-sub {
    width: 100%;
    max-width: 26ch;
    margin-inline: auto;
  }

  .hero-actions {
    gap: 0.75rem;
  }

  .hero-actions .btn,
  .hero-actions .btn-spin,
  .hero-actions .btn-spin__inner {
    width: 100%;
    max-width: 260px;
  }

  .hero-preview {
    width: min(22rem, 100%);
    max-width: 100%;
    justify-self: center;
  }

  .hero-preview__frame,
  .dash,
  .dash__body,
  .dash__main,
  .dash__stats,
  .dash__panel,
  .dash__chart {
    max-width: 100%;
    min-width: 0;
  }

  .dash__body {
    width: 100%;
    overflow: hidden;
  }

  .dash__topbar {
    padding: 0.55rem 0.7rem;
  }

  .dash__url {
    min-width: 0;
    max-width: calc(100% - 64px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dash__main {
    padding: 0.8rem;
    min-width: 0;
  }

  .dash__head {
    gap: 0.75rem;
    min-width: 0;
  }

  .dash__title {
    width: min(140px, 55%);
  }

  .dash__pill {
    width: min(74px, 28%);
  }

  .footer-inner { flex-direction: column; gap: 1.5rem; }
  .retro-grid { opacity: 0.38; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  html.js .hero-badge, html.js .hero-title, html.js .hero-sub,
  html.js .hero-actions, html.js .hero-preview {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .cascade-text,
  .cascade-text__glyph {
    transition: none;
  }
  .cascade-text__glyph {
    text-shadow: none;
    transform: none;
  }
  .status-dot, .beetle-shine, .retro-grid__lines, .btn-spin__border { animation: none; }
}
