/* ============================================================
   SWARM LABS — Design System
   Warm editorial paper + cinematic hive. Honey-amber primary.
   ============================================================ */

/* ---------- Fonts ---------- */
/* Fonts loaded via @fontsource in +layout.svelte */

/* ---------- Tokens ---------- */
:root {
  /* Paper / light editorial surface */
  /* Surfaces (dark). Names kept so every component re-themes: "paper"=surface, "ink"=text */
  --paper:        #0B0913;
  --paper-2:      #120F1E;
  --paper-3:      #1C1832;
  --card:         #141022;

  /* Ink (text on dark) */
  --ink:          #F4F1FB;
  --ink-2:        #BFB7D4;
  --ink-3:        #8A82A4;
  --line:         rgba(255,255,255,0.10);
  --line-soft:    rgba(255,255,255,0.055);

  /* Deep surfaces for hero/cta/footer (darker, for layering) */
  --hive:         #08060F;
  --hive-2:       #0E0B1A;
  --hive-3:       #181230;
  --hive-line:    rgba(176,38,160,0.22);

  /* Accent ramp — names kept (was honey); now rose/pink, tuned bright for dark */
  --honey:        #FF3D7A;
  --honey-bright: #FF6FA0;
  --honey-deep:   #FF4D80;
  --honey-soft:   rgba(255,61,122,0.16);
  --amber-glow:   rgba(244,37,94,0.50);

  /* Secondary accent — names kept (was pollen/green); now violet */
  --pollen:       #A855F7;
  --pollen-soft:  rgba(168,85,247,0.18);

  /* ---- Brand colour system (gradient-ready, Tweakable) ---- */
  --primary:        #F4255E;   /* rose */
  --secondary:      #8B2FD6;   /* violet */
  --tertiary:       #4361EE;   /* indigo, for range */
  --bg-base:        #0B0913;

  /* single bracket accent for brace buttons (the gradient's primary pink) */
  --brace: #FF2D6B;

  --grad-primary:   linear-gradient(100deg, #FF2D6B 0%, #C026D3 52%, #7B2FF5 100%);
  --grad-secondary: linear-gradient(100deg, #8B2FD6 0%, #4361EE 100%);
  --grad-tertiary:  linear-gradient(100deg, #FF2D6B 0%, #FF5C8A 100%);
  --grad-bg:        radial-gradient(115% 80% at 50% -8%, #1A0E2E 0%, #0B0913 52%);
  --grad-text:      linear-gradient(100deg, #FF6FA0 0%, #C77DFF 100%);

  /* Hex (honeycomb) silhouettes — chamfered/cut corners */
  --hex-clip: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  --hex-clip-nav: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 22px), calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 22px), 0 22px);

  /* Type */
  --display: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  --sans:    'Poppins', ui-sans-serif, system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 64px);
  --radius: 18px;
  --radius-lg: 28px;
  --radius-sm: 10px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows (dark) */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.45), 0 2px 10px rgba(0,0,0,0.30);
  --shadow:    0 16px 36px -16px rgba(0,0,0,0.62), 0 2px 10px rgba(0,0,0,0.40);
  --shadow-lg: 0 46px 92px -28px rgba(0,0,0,0.72), 0 12px 34px rgba(123,47,245,0.14);

  color-scheme: dark;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg-base);
  background-image: var(--grad-bg);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--honey); color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 140px); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 90px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--honey-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1.5px;
  background: var(--honey-deep);
  display: inline-block;
}
.eyebrow--center { justify-content: center; }

.display-xl { font-size: clamp(44px, 7.5vw, 104px); }
.display-l  { font-size: clamp(36px, 5.2vw, 72px); }
.display-m  { font-size: clamp(28px, 3.6vw, 48px); }
.lede {
  font-size: clamp(18px, 1.7vw, 22px);
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 56ch;
  text-wrap: pretty;
}
.muted { color: var(--ink-3); }
.honey-text { color: var(--honey-deep); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  color: #fff;
  transition: transform .35s var(--ease), color .25s, box-shadow .35s var(--ease);
  will-change: transform;
}
.btn svg { width: 17px; height: 17px; }
/* shape layer: rounded pill behind the label */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: 100px;
}

/* PRIMARY — gradient fill + animated sheen + glow */
.btn--honey { color: #fff; }
body:not(.btn-braces) .btn--honey { box-shadow: 0 10px 24px -6px rgba(244,37,94,0.40); }
.btn--honey::before {
  background:
    linear-gradient(110deg, transparent 38%, rgba(255,255,255,0.42) 50%, transparent 62%),
    var(--grad-primary);
  background-size: 240% 100%, 170% 100%;
  background-position: -160% 0, 0% 50%;
  background-repeat: no-repeat;
  transition: background-position .7s var(--ease);
}
.btn--honey:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -8px rgba(192,38,211,0.5); }
.btn--honey:hover::before { background-position: 280% 0, 100% 50%; }

/* SECONDARY — solid light fill */
.btn--primary { color: var(--bg-base); box-shadow: 0 8px 20px -8px rgba(0,0,0,0.55); }
.btn--primary::before {
  background:
    linear-gradient(110deg, transparent 38%, rgba(255,255,255,0.65) 50%, transparent 62%),
    var(--ink);
  background-size: 240% 100%, 100% 100%;
  background-position: -160% 0, 0 0;
  background-repeat: no-repeat;
  transition: background-position .7s var(--ease);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(168,85,247,0.45); }
.btn--primary:hover::before { background-position: 280% 0, 0 0; }

/* GHOST — rounded ring via two shape layers */
.btn--ghost { color: var(--ink); }
.btn--ghost::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  border-radius: 100px;
  background: rgba(255,255,255,0.26);
  transition: background .3s var(--ease);
}
.btn--ghost::after {
  content: ""; position: absolute; inset: 1.5px; z-index: -1;
  border-radius: 100px;
  background: #0c0a16;
  transition: background .3s var(--ease);
}
.btn--ghost:hover { transform: translateY(-2px); }
.btn--ghost:hover::before { background: var(--grad-primary); }
.btn--ghost:hover::after { background: #15101f; }
.btn--lg { padding: 17px 38px; font-size: 16.5px; }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   BRACE BUTTON STYLE  (toggle: body.btn-braces)  —  { label }
   Same proven SVG-mask braces as the menu hover, always-on,
   filled with the button gradient. No filled box (a box can't
   trace the brace profile).
   ============================================================ */
body.btn-braces .btn {
  clip-path: none !important;
  box-shadow: none !important;
  filter: none !important;
  -webkit-mask: none !important; mask: none !important;
  background: none !important;
  -webkit-text-fill-color: currentColor;
  position: relative;
  padding: 12px 6px;
  gap: .42em;
  font-weight: 700;
}
/* coloured typographic brace caps — renders everywhere */
body.btn-braces .btn::before,
body.btn-braces .btn::after {
  position: static !important; inset: auto !important;
  display: block; flex: none; align-self: center;
  width: auto; height: auto;
  clip-path: none !important; filter: none !important;
  -webkit-mask: none !important; mask: none !important;
  background: none !important;
  opacity: 1; overflow: visible;
  transform: none; animation: none !important;
  transition: transform .3s var(--ease), opacity .3s;
  font: 300 1.95em/0.8 var(--display);
  opacity: .9;
}
body.btn-braces .btn::before { content: "{"; margin-right: .04em; }
body.btn-braces .btn::after  { content: "}"; margin-left: .04em; }
/* button itself stays put; only the braces move out (like the menu) and turn white */
body.btn-braces .btn:hover { transform: none; }
body.btn-braces .btn:hover::before { transform: translateX(-5px); }
body.btn-braces .btn:hover::after  { transform: translateX(5px); }

/* ============================================================
   THREE BRACE-BUTTON TIERS  (body.btn-braces):  { label }
   • PRIMARY  (.btn--honey)   — animated honeycomb fill, loudest
   • SECONDARY(.btn--primary) — gradient-text label, no fill, medium
   • DEFAULT  (.btn--ghost)   — dim ink label, quiet
   All share: brace caps that open outward + the hover behaviour
   defined on `body.btn-braces .btn` above.
   ============================================================ */

/* PRIMARY — honeycomb gradient fill + white label */
body.btn-braces .btn--honey { color: #fff; -webkit-text-fill-color: #fff; box-shadow: none !important; position: relative; overflow: hidden; padding-inline: 14px; text-shadow: 0 1px 3px rgba(6,3,14,0.7); }
body.btn-braces .btn--honey > *:not(.hivefill) { position: relative; z-index: 1; }
body.btn-braces .btn--honey::before { content: "{"; margin-right: .04em; color: var(--brace); -webkit-text-fill-color: var(--brace); z-index: 1; }
body.btn-braces .btn--honey::after  { content: "}"; margin-left: .04em; color: var(--brace); -webkit-text-fill-color: var(--brace); z-index: 1; }
/* primary: label flips to honey on hover; braces switch to white */
body.btn-braces .btn--honey:hover::before,
body.btn-braces .btn--honey:hover::after { color: #fff; -webkit-text-fill-color: #fff; }
body.btn-braces .btn--honey > svg.arrow { stroke: #fff; }
body.btn-braces .btn--honey:hover > svg.arrow { stroke: var(--honey); }
body.btn-braces .btn--honey .hivefill svg,
body.btn-braces .btn--honey .hivefill polygon { stroke: none !important; }
/* honeycomb fill layer (built by honeycomb.js) — hidden outside brace mode */
.hivefill { display: none; }
body.btn-braces .btn--honey .hivefill {
  display: block; position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  /* horizontal fade only — keeps honeycomb INSIDE the { } braces, never white */
  -webkit-mask: linear-gradient(90deg, transparent 1.5em, #000 2.3em, #000 calc(100% - 2.3em), transparent calc(100% - 1.5em));
  mask: linear-gradient(90deg, transparent 1.5em, #000 2.3em, #000 calc(100% - 2.3em), transparent calc(100% - 1.5em));
  /* hold the background still — button no longer lifts */
  transition: transform .35s var(--ease);
}
.hivefill svg {
  display: block; width: 100%; height: 100%;
  /* vertical fade — thin band kept within the brace cap height, no half-hexes top/bottom */
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 40%, #000 60%, transparent 100%);
  mask: linear-gradient(180deg, transparent 0, #000 40%, #000 60%, transparent 100%);
}
/* soft dark scrim behind the centred label — honeycomb stays vibrant at the edges */
.hivefill::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 52% 80% at 50% 50%, rgba(6,3,14,0.42) 0%, rgba(6,3,14,0.20) 46%, transparent 74%);
}
/* PRIMARY buttons: no fill — label/braces/arrow flip to honey on hover, over a soft gradient highlight */
body.btn-braces .btn--honey .hivefill { display: none; }
body.btn-braces .btn--honey { text-shadow: none; border-radius: 12px; transition: color .2s var(--ease), -webkit-text-fill-color .2s var(--ease); }
body.btn-braces .btn--honey:hover {
  color: var(--honey); -webkit-text-fill-color: var(--honey);
  /* soft radial glow: inner fades fully before every edge + an outer bleed — no hard line */
  background: radial-gradient(70% 85% at 50% 50%, rgba(244,37,94,0.16) 0%, rgba(123,47,245,0.05) 40%, transparent 64%) !important;
  box-shadow: 0 0 26px rgba(244,37,94,0.30) !important;
}
.hivecell {
  transform-box: fill-box; transform-origin: center;
  animation: hiveTwinkle 2.6s ease-in-out infinite;
  will-change: opacity, transform;
}
@keyframes hiveTwinkle {
  0%, 100% { opacity: .32; transform: scale(.94); }
  50%      { opacity: 1;   transform: scale(1.02); }
}
@media (prefers-reduced-motion: reduce) { .hivecell { animation: none; opacity: .85; } }

/* SECONDARY — white label; brackets match primary (left purple / right pink).
   On hover: label → primary text colour, brackets → white. */
body.btn-braces .btn--primary {
  box-shadow: none !important;
  background: none !important;
  color: #fff; -webkit-text-fill-color: #fff;
}
body.btn-braces .btn--primary::before,
body.btn-braces .btn--primary::after  { color: var(--brace); -webkit-text-fill-color: var(--brace); }
body.btn-braces .btn--primary > svg.arrow { stroke: #fff; }
body.btn-braces .btn--primary:hover { color: var(--ink); -webkit-text-fill-color: var(--ink); }
body.btn-braces .btn--primary:hover::before,
body.btn-braces .btn--primary:hover::after { color: #fff; -webkit-text-fill-color: #fff; }
body.btn-braces .btn--primary:hover > svg.arrow { stroke: var(--ink); }

/* DEFAULT / ghost — primary text colour label, white brackets.
   On hover: label → white, brackets → match primary (left purple / right pink). */
body.btn-braces .btn--ghost { color: var(--ink); -webkit-text-fill-color: var(--ink); }
body.btn-braces .btn--ghost::before,
body.btn-braces .btn--ghost::after { color: #fff; -webkit-text-fill-color: #fff; }
body.btn-braces .btn--ghost > svg.arrow { stroke: var(--ink); }
body.btn-braces .btn--ghost:hover { color: #fff; -webkit-text-fill-color: #fff; }
body.btn-braces .btn--ghost:hover::before,
body.btn-braces .btn--ghost:hover::after  { color: var(--brace); -webkit-text-fill-color: var(--brace); }
body.btn-braces .btn--ghost:hover > svg.arrow { stroke: #fff; }

/* Menu hover: { item } with a waggling open brace */
body.btn-braces .nav__link { display: inline-flex; align-items: center; }
body.btn-braces .nav__link::before,
body.btn-braces .nav__link::after {
  content: ""; width: 0; height: 1em; opacity: 0; overflow: hidden;
  background: currentColor;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
  transition: width .26s var(--ease), opacity .26s, margin .26s;
}
body.btn-braces .nav__link::before { -webkit-mask-image: url(brace-open.svg);  mask-image: url(brace-open.svg); }
body.btn-braces .nav__link::after  { -webkit-mask-image: url(brace-close.svg); mask-image: url(brace-close.svg); }
body.btn-braces .nav__link:hover::before { width: .34em; opacity: .9; margin-right: .34em; transform-origin: center; animation: braceWaggle 3.4s var(--ease) infinite; }
body.btn-braces .nav__link:hover::after  { width: .34em; opacity: .9; margin-left: .34em; }
/* active page: braces shown persistently, in the primary colour */
body.btn-braces .nav__link.is-active::before { width: .34em; opacity: 1; margin-right: .34em; background: var(--honey); }
body.btn-braces .nav__link.is-active::after  { width: .34em; opacity: 1; margin-left: .34em; background: var(--honey); }
@keyframes braceWaggle {
  0%, 76%, 100% { transform: rotate(0) translateX(0); }
  80% { transform: rotate(-16deg) translateX(-1px); }
  85% { transform: rotate(10deg); }
  90% { transform: rotate(-6deg); }
  95% { transform: rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  body.btn-braces .nav__link:hover::before { animation: none; }
}

/* ============================================================
   CHIPS / TAGS / PILLS
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 7px 13px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--honey); }
.tag {
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--honey-deep);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding-top: 18px;
  transition: padding .4s var(--ease);
  pointer-events: none;
}
.nav__inner {
  pointer-events: auto;
  width: min(calc(100% - 32px), var(--maxw));
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 11px 16px 11px 22px;
  border-radius: 100px;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: inset 0 0 0 1px var(--line-soft), var(--shadow-sm);
  transition: background .4s, box-shadow .4s;
}
.nav.is-scrolled .nav__inner { box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
/* dark nav over dark hero */
.nav.on-dark .nav__inner {
  background: color-mix(in srgb, var(--hive) 50%, transparent);
  border-color: var(--hive-line);
  color: var(--ink);
}
.nav.on-dark .nav__link { color: rgba(244,241,251,0.82); }
.nav.on-dark .nav__link:hover { color: var(--ink); }
.nav.on-dark .brand__word { color: var(--ink); }
.nav.on-dark .btn--ghost { border-color: rgba(244,37,94,0.3); color: var(--ink); }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.03em;
}
/* Real Swarm Labs logo (white wordmark + gradient honeycomb) */
.brand__logo { height: 24px; width: auto; flex: none; display: block; }
.brand__logo--icon { display: none; }
/* Tablet "tight nav" band: the inline links are shown but cramped, so the
   wordmark collapses to the animated icon to make room. Above this the wordmark
   fits; below it (<=820px) the nav becomes the burger menu and the wordmark
   returns (there's space again). */
@media (min-width: 821px) and (max-width: 950px) {
  .nav .brand__logo--full { display: none; }
  .nav .brand__logo--icon { display: block; }
}
.footer__brand .brand__logo { height: 30px; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  padding: 9px 14px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 100px;
  color: var(--ink-2);
  transition: color .2s, background .2s, text-shadow .2s;
  position: relative;
}
/* subtle glow on hover instead of a solid pill */
.nav__link:hover {
  color: var(--ink);
  background: radial-gradient(60% 80% at 50% 50%, rgba(255,61,122,0.16) 0%, transparent 70%);
  box-shadow: 0 0 22px rgba(255,61,122,0.22);
  text-shadow: 0 0 14px rgba(255,61,122,0.40);
}
.nav__link.is-active { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 10px; }
.nav__cta { padding: 11px 20px; font-size: 14.5px; }
.nav__burger { display: none; width: 42px; height: 42px; border-radius: 50%; align-items: center; justify-content: center; border: 1px solid var(--line); }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  height: 100dvh;
  background: var(--paper);
  padding: 24px var(--gutter);
  display: flex; flex-direction: column; gap: 4px;
  justify-content: center; align-items: center; text-align: center;
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events: none;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
/* Particle burst that spreads from the menu button to each item on open. */
.mm-particle {
  position: fixed; left: 0; top: 0;
  border-radius: 50%;
  pointer-events: none; z-index: 100;
  will-change: transform, opacity;
  /* colour + glow are set per-particle in JS (logo-gradient range) */
}
@media (prefers-reduced-motion: reduce) { .mm-particle { display: none; } }
.mobile-menu a {
  font-family: var(--display);
  font-size: 30px; font-weight: 600;
  padding: 10px 0;
}
.mobile-menu__brand {
  padding: 0 0 22px !important;
}
.mobile-menu__brand img { display: block; }

/* ============================================================
   HERO (cinematic hive)
   ============================================================ */
.hero {
  position: relative;
  background: var(--hive);
  color: var(--ink);
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 112px; padding-bottom: 64px;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas {
  position: absolute; inset: 0;
  z-index: 0;
  width: 100%; height: 100%;
}
.hero__glow {
  position: absolute; z-index: 1;
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(244,37,94,0.18) 0%, rgba(244,37,94,0.05) 35%, transparent 65%);
  pointer-events: none;
  filter: blur(10px);
}
.hero__vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 30%, transparent 40%, rgba(14,11,6,0.55) 100%),
    linear-gradient(to bottom, rgba(14,11,6,0.4) 0%, transparent 25%, transparent 60%, var(--hive) 100%);
}
.hero__content { position: relative; z-index: 2; width: 100%; }
.hero h1 {
  font-size: clamp(44px, 7vw, 116px);
  line-height: 0.94;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.hero h1 em {
  font-style: normal;
  background: var(--grad-text);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradshift 8s var(--ease) infinite alternate;
  position: relative;
}
@keyframes gradshift { to { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .hero h1 em { animation: none; } }
/* reusable gradient-text utility */
.grad-text {
  background: var(--grad-text);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradshift 8s var(--ease) infinite alternate;
}
.hero .lede { color: rgba(244,241,251,0.72); font-size: clamp(17px, 1.6vw, 21px); margin-top: 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(244,241,251,0.5);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero__scroll .bar { width: 1px; height: 38px; background: linear-gradient(var(--honey), transparent); animation: scrollpulse 2.4s var(--ease) infinite; }
@keyframes scrollpulse { 0%,100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* logo cloud strip in hero base */
.hero__cloud {
  position: relative; z-index: 2;
  border-top: 1px solid var(--hive-line);
  margin-top: clamp(28px, 4vw, 52px);
  padding-top: 22px;
}
.cloud-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(244,241,251,0.4); }
.cloud-row { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(20px, 4vw, 48px); margin-top: 16px; }
.cloud-row span { font-family: var(--display); font-weight: 600; font-size: clamp(15px, 1.6vw, 19px); color: rgba(244,241,251,0.55); letter-spacing: -0.01em; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.sec-head { display: flex; flex-direction: column; gap: 18px; max-width: 70ch; }
.sec-head.center { align-items: center; text-align: center; margin-inline: auto; }
.sec-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }

/* ============================================================
   CARDS — generic
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line); }

/* App / product card */
.apps-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.app-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 30px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 300px;
  border: 1px solid var(--line);
  background: var(--card);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.app-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.app-card__top { display: flex; align-items: center; justify-content: space-between; }
.app-card__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.app-card__domain { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.app-card h3 { font-size: 27px; margin-top: auto; }
.app-card p { color: var(--ink-2); margin-top: 10px; font-size: 15.5px; max-width: 38ch; }
.app-card__go { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; color: var(--honey-deep); }
.app-card__go .arrow { transition: transform .3s var(--ease); }
.app-card:hover .app-card__go .arrow { transform: translateX(4px); }
.app-card.col-6 { grid-column: span 6; }
.app-card.col-4 { grid-column: span 4; }
.app-card.col-8 { grid-column: span 8; }
.app-card.col-12 { grid-column: span 12; }
/* Long panels: text on the left, an animated app screen peeking on the right. */
.app-card.has-screen {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(16px, 2vw, 34px);
  align-items: center;
}
.app-card.has-screen .app-card__content { display: flex; flex-direction: column; min-width: 0; }
/* The mock is rendered at its natural design width (460px) and scaled to fit the
   column via `zoom` (set in +page.svelte) — a true smaller copy, never cramped. */
.app-card__screen { position: relative; min-width: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.app-card__screen > :global(*) {
  width: 460px;
  max-width: none;
  border-radius: 14px;
  box-shadow: 0 30px 64px -30px rgba(0, 0, 0, 0.65);
}
/* On smaller screens the panel is no longer long — drop the screen, text fills. */
@media (max-width: 980px) {
  .app-card.has-screen { display: flex; flex-direction: column; }
  .app-card__screen { display: none; }
}
/* featured dark app card */
.app-card--dark { background: var(--hive-2); border-color: var(--hive-line); color: var(--ink); }
.app-card--dark .app-card__domain { color: rgba(244,241,251,0.5); }
.app-card--dark p { color: rgba(244,241,251,0.66); }

/* ============================================================
   HONEYCOMB / CUSTOM DEV
   ============================================================ */
.feature-row { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.feature-list { display: flex; flex-direction: column; gap: 2px; margin-top: 26px; }
.feature-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
}
.feature-item__num { font-family: var(--mono); font-size: 13px; color: var(--honey-deep); padding-top: 3px; }
.feature-item h4 { font-size: 19px; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
.feature-item p { color: var(--ink-3); font-size: 15px; margin-top: 5px; }

/* ============================================================
   STATS / MISSION
   ============================================================ */
.mission {
  background: var(--hive);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 80px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.mission__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; position: relative; z-index: 2; }
.stat { border-top: 1px solid var(--hive-line); padding-top: 20px; }
.stat__num { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 5vw, 64px); letter-spacing: -0.03em; color: var(--honey); }
.stat__label { color: rgba(244,241,251,0.62); font-size: 15px; margin-top: 6px; }
.mission__bar {
  position: relative; z-index: 2; margin-top: 40px;
  height: 10px; border-radius: 100px; background: var(--hive-3); overflow: hidden;
}
.mission__bar i { position: absolute; inset: 0 auto 0 0; width: 32%; background: linear-gradient(90deg, var(--honey-deep), var(--honey-bright)); border-radius: 100px; }
.mission__progress-label { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: rgba(244,241,251,0.5); margin-top: 12px; }

/* ============================================================
   CASE STUDIES
   ============================================================ */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.work-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  min-height: 380px; display: flex; flex-direction: column; justify-content: flex-start;
  padding: 30px;
  color: var(--ink);
  background: var(--hive-2);
  border: 1px solid var(--line);
  isolation: isolate;
}
.work-card__media { position: absolute; inset: 0; z-index: -1; }
.work-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,6,2,0.92) 5%, rgba(8,6,2,0.35) 55%, rgba(8,6,2,0.25) 100%); }
.work-card__meta { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.work-card h3 { font-size: clamp(24px, 2.4vw, 34px); }
.work-card p { color: rgba(244,241,251,0.74); margin-top: 10px; max-width: 42ch; font-size: 15.5px; }
.work-card__result { display: flex; gap: 28px; margin-top: auto; padding-top: 22px; }
.work-card__result .v { font-family: var(--display); font-weight: 700; font-size: 28px; color: var(--honey); letter-spacing: -0.02em; white-space: nowrap; }
.work-card__result .k { font-size: 12.5px; color: rgba(244,241,251,0.6); font-family: var(--mono); }
.work-card.feature { grid-column: span 2; min-height: 420px; }

/* Animated dye-swatch panel on the right of the feature card (desktop only) */
.work-card__viz { display: none; }
@media (min-width: 821px) {
  .work-card.feature:has(.work-card__viz) .work-card__meta,
  .work-card.feature:has(.work-card__viz) h3,
  .work-card.feature:has(.work-card__viz) p,
  .work-card.feature:has(.work-card__viz) .work-card__result { max-width: 58%; }
  .work-card__viz {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 0; right: 0; bottom: 0; width: 36%; max-width: 340px;
    padding: 34px; pointer-events: none; z-index: 0;
  }
  .ci-card {
    position: relative; width: 100%; aspect-ratio: 5 / 6; max-height: 100%;
    display: flex; gap: 5px; padding: 12px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.08);
  }
  .ci-band {
    flex: 1; border-radius: 6px; background: var(--c); opacity: 0.78;
    transform-origin: bottom;
    animation: ci-band 5s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.4s);
  }
  .ci-scan {
    position: absolute; top: 12px; bottom: 12px; left: 4%; width: 34px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    border-radius: 8px; filter: blur(0.5px);
    animation: ci-scan 5s ease-in-out infinite;
  }
}
@keyframes ci-band {
  0%, 100% { opacity: 0.55; transform: scaleY(0.94); }
  50% { opacity: 1; transform: scaleY(1); }
}
@keyframes ci-scan {
  0% { left: 4%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: 86%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ci-band, .ci-scan { animation: none; }
}

/* ============================================================
   INTEGRATIONS
   ============================================================ */
.int-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.int-track { display: flex; gap: 14px; width: max-content; animation: marquee 38s linear infinite; }
.int-track:hover { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.int-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--card);
  font-weight: 600; font-size: 15px; white-space: nowrap;
}
.int-pill .ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink); }

/* ============================================================
   BLOG
   ============================================================ */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line-soft); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card__img { aspect-ratio: 16/10; background: var(--paper-3); position: relative; overflow: hidden; }
.post-card__body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__meta { display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.post-card h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; }
.post-card__excerpt { color: var(--ink-3); font-size: 14.5px; }
.post-card__foot { margin-top: auto; padding-top: 12px; font-size: 13.5px; color: var(--ink-3); font-family: var(--mono); }
/* Featured news card: image beside text on desktop, stacked (image on top) on mobile. */
.news-feature { display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; border-radius: var(--radius-lg); }
.news-feature__img { min-height: 340px; position: relative; }
.news-feature__body { padding: clamp(28px, 3.5vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
@media (max-width: 720px) {
  .news-feature { grid-template-columns: 1fr; }
  .news-feature__img { min-height: 0; aspect-ratio: 16 / 9; }
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  background: var(--hive);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(48px, 7vw, 100px);
  text-align: center;
  position: relative; overflow: hidden; isolation: isolate;
}
.cta__glow {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(72% 90% at 50% 100%, rgba(244,37,94,0.30), transparent 72%);
  /* fade the glow out before the clipped bottom edge so there's no sharp line */
  -webkit-mask: linear-gradient(to bottom, #000 0, #000 80%, transparent 100%);
  mask: linear-gradient(to bottom, #000 0, #000 80%, transparent 100%);
}
.cta h2 { font-size: clamp(34px, 5vw, 68px); }
.cta .lede { color: rgba(244,241,251,0.72); margin-inline: auto; margin-top: 18px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--hive); color: var(--ink); padding-top: clamp(56px, 7vw, 96px); }
.footer__top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--hive-line); }
.footer__brand .brand__word { color: var(--ink); }
.footer__tag { color: rgba(244,241,251,0.6); margin-top: 18px; max-width: 34ch; font-size: 15px; }
.footer__col h5 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(244,241,251,0.45); margin-bottom: 16px; font-weight: 500; }
.footer__col a { display: block; padding: 7px 0; color: rgba(244,241,251,0.78); font-size: 15px; transition: color .2s; }
.footer__col a:hover { color: var(--honey); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 28px; flex-wrap: wrap; }
.footer__bottom p { color: rgba(244,241,251,0.5); font-size: 13.5px; font-family: var(--mono); }
.footer__social { display: flex; gap: 8px; }
.footer__social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--hive-line); display: grid; place-items: center; color: rgba(244,241,251,0.7); transition: all .25s; }
.footer__social a:hover { border-color: var(--honey); color: var(--honey); transform: translateY(-2px); }

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-head { padding-top: clamp(130px, 16vh, 190px); padding-bottom: clamp(40px, 5vw, 64px); position: relative; }
.page-head__bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 120% at 80% -10%, var(--paper-2), transparent 60%); }
.breadcrumb { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: nowrap; white-space: nowrap; max-width: 100%; min-width: 0; }
.breadcrumb a:hover { color: var(--honey-deep); }
/* Keep breadcrumbs to a single line: the trailing item (current page) truncates with an ellipsis. */
.breadcrumb > a { flex: none; }
.breadcrumb > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.reveal[data-d="5"] { transition-delay: .40s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .feature-row { grid-template-columns: 1fr; }
  .mission__grid { grid-template-columns: 1fr; gap: 14px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .post-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .apps-grid > .app-card { grid-column: 1 / -1 !important; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card.feature { grid-column: span 1; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .post-grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__col--connect { display: none; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .hero__actions .btn { flex: 1; justify-content: center; }
}
