/* =================================================================
   MN Labs
   Layout concept: a cobalt "release floor" hero with a live
   production console, followed by calm, cool-paper sections that
   read like good product documentation.
   ================================================================= */

:root {
  /* ---- Color: light ---- */
  --paper: #F3F4F8;          /* page ground, cool white biased to cobalt */
  --surface: #FFFFFF;        /* raised objects: windows, cards, form */
  --sunken: #E9EBF2;         /* wells and skeleton bars */
  --band: #E8EAF1;           /* alternate section band */
  --ink: #0B0E1A;            /* text */
  --ink-2: #2D3247;          /* secondary text */
  --muted: #596078;          /* captions, meta */
  --line: rgba(11, 14, 26, 0.1);
  --line-strong: rgba(11, 14, 26, 0.18);

  --brand: #2438E8;          /* cobalt: hero, contact, primary actions */
  --brand-hover: #1A2BC8;
  --brand-text: #2438E8;     /* cobalt used as text on paper */
  --brand-tint: #E2E6FD;     /* cobalt wash behind illustrations */
  --brand-grid: rgba(36, 56, 232, 0.09);
  --on-brand: #FFFFFF;
  --on-brand-muted: rgba(255, 255, 255, 0.8);
  --on-brand-line: rgba(255, 255, 255, 0.26);
  --on-brand-wash: rgba(255, 255, 255, 0.1);
  --hero-grid: rgba(255, 255, 255, 0.08);

  --night: #0B0E1A;          /* process + footer */
  --night-edge: transparent;
  --on-night: #ECEEF6;
  --on-night-muted: #9AA0B8;
  --night-line: rgba(236, 238, 246, 0.14);

  --console: #080A12;        /* console, code, device bezels (dark in both themes) */
  --console-ink: #DDE1EF;
  --console-muted: #7D85A2;
  --console-line: rgba(221, 225, 239, 0.1);
  --code-key: #A9B3FF;
  --code-str: #7EE2B0;
  --code-punc: #6E7694;
  --code-err: #FF8A80;

  --live: #0E8F55;           /* semantic: paid, live, approved */
  --live-bright: #4BE08F;
  --live-tint: rgba(14, 143, 85, 0.12);
  --wait: #995700;
  --wait-tint: rgba(214, 140, 20, 0.16);
  --danger: #C0281F;
  --thumb-a: #D9B48C;        /* product photos in the mobile mock */
  --thumb-b: #B9855A;

  --shadow-lg: 0 40px 80px -30px rgba(6, 10, 40, 0.55), 0 18px 36px -18px rgba(6, 10, 40, 0.4);
  --shadow-md: 0 18px 40px -18px rgba(11, 14, 26, 0.35), 0 2px 6px rgba(11, 14, 26, 0.06);
  --shadow-sm: 0 1px 2px rgba(11, 14, 26, 0.06), 0 6px 16px -6px rgba(11, 14, 26, 0.12);

  /* ---- Type ---- */
  --font-display: "Familjen Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* ---- Layout ---- */
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --section-y: clamp(88px, 11vw, 148px);
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 18px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #090B12;
    --surface: #141826;
    --sunken: #1C2131;
    --band: #0E111A;
    --ink: #ECEEF6;
    --ink-2: #C6CBDC;
    --muted: #959CB4;
    --line: rgba(236, 238, 246, 0.1);
    --line-strong: rgba(236, 238, 246, 0.19);
    --brand: #2F42F0;
    --brand-hover: #4254FF;
    --brand-text: #A0ABFF;
    --brand-tint: #151A3D;
    --brand-grid: rgba(140, 152, 255, 0.08);
    --night: #0E111B;
    --night-edge: rgba(236, 238, 246, 0.08);
    --console: #05060C;
    --live: #3FD08A;
    --live-tint: rgba(63, 208, 138, 0.14);
    --wait: #F0AE4A;
    --wait-tint: rgba(240, 174, 74, 0.14);
    --danger: #FF8A80;
    --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.75), 0 18px 36px -18px rgba(0, 0, 0, 0.55);
    --shadow-md: 0 18px 40px -18px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px -6px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #090B12;
  --surface: #141826;
  --sunken: #1C2131;
  --band: #0E111A;
  --ink: #ECEEF6;
  --ink-2: #C6CBDC;
  --muted: #959CB4;
  --line: rgba(236, 238, 246, 0.1);
  --line-strong: rgba(236, 238, 246, 0.19);
  --brand: #2F42F0;
  --brand-hover: #4254FF;
  --brand-text: #A0ABFF;
  --brand-tint: #151A3D;
  --brand-grid: rgba(140, 152, 255, 0.08);
  --night: #0E111B;
  --night-edge: rgba(236, 238, 246, 0.08);
  --console: #05060C;
  --live: #3FD08A;
  --live-tint: rgba(63, 208, 138, 0.14);
  --wait: #F0AE4A;
  --wait-tint: rgba(240, 174, 74, 0.14);
  --danger: #FF8A80;
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.75), 0 18px 36px -18px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 18px 40px -18px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px -6px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

/* =================================================================
   Base
   ================================================================= */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
/* Added by main.js after load: smooth scrolling from the start would stop
   Chrome from jumping to #section when a page is opened with a link to one. */
html.smooth-scroll { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word; /* long Swedish compounds never push the layout wider */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, figure, dl, dd, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }

::selection { background: var(--brand); color: var(--on-brand); }

:focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: 3px;
}
.hero :focus-visible,
.contact-copy :focus-visible,
.site-header:not(.is-solid):not(.menu-open) :focus-visible {
  outline-color: var(--on-brand);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px; top: 12px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

/* =================================================================
   Type
   ================================================================= */

.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.125rem, 1.3rem + 2.9vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 1.08rem + 0.45vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.lead {
  font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34em;
  text-wrap: pretty;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(44px, 6vw, 80px);
}
.section-head .eyebrow { margin-bottom: 18px; }

@media (min-width: 960px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(40px, 6vw, 96px);
  }
}

/* =================================================================
   Buttons
   ================================================================= */

.btn {
  --btn-bg: transparent;
  --btn-fg: currentColor;
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 50px;
  padding: 0 1.35em;
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn .icon { transition: transform 0.2s ease; }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.btn--primary { --btn-bg: var(--brand); --btn-fg: var(--on-brand); }
.btn--primary:hover { --btn-bg: var(--brand-hover); }

.btn--light { --btn-bg: var(--on-brand); --btn-fg: var(--brand); }
.btn--light:hover { --btn-bg: color-mix(in srgb, var(--on-brand) 88%, var(--brand)); }

.btn--outline-light { --btn-border: var(--on-brand-line); --btn-fg: var(--on-brand); }
.btn--outline-light:hover { --btn-bg: var(--on-brand-wash); --btn-border: var(--on-brand-muted); }

.btn--outline { --btn-border: var(--line-strong); --btn-fg: var(--ink); }
.btn--outline:hover { --btn-border: var(--ink); }

.btn--block { width: 100%; }

/* =================================================================
   Header
   ================================================================= */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--on-brand);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--brand) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--on-brand-line);
}

.site-header.is-solid,
.site-header.menu-open {
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
/* Opaque while the menu is open. No backdrop-filter here: it would make the
   header the containing block for the fixed-position menu panel. */
.site-header.menu-open {
  background: var(--paper);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand);
  color: var(--on-brand);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.site-header:not(.is-solid):not(.menu-open) .brand-mark {
  background: var(--on-brand);
  color: var(--brand);
}

.site-nav { margin-inline: auto; }
.site-nav ul { display: flex; gap: 2px; }
.site-nav a {
  position: relative;
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.84;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.site-nav a:hover { opacity: 1; background: color-mix(in srgb, currentColor 9%, transparent); }
.site-nav a[aria-current="true"] { opacity: 1; }
.site-nav a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(-50%);
}

.header-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.header-actions--end { margin-left: auto; }

/* Language switch: EN | SV, current language filled */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 4px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1;
}
.lang a {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] { background: var(--ink); color: var(--paper); }

.site-header:not(.is-solid):not(.menu-open) .lang { border-color: var(--on-brand-line); }
.site-header:not(.is-solid):not(.menu-open) .lang a { color: var(--on-brand-muted); }
.site-header:not(.is-solid):not(.menu-open) .lang a:hover { color: var(--on-brand); }
.site-header:not(.is-solid):not(.menu-open) .lang a[aria-current="page"] {
  background: var(--on-brand);
  color: var(--brand);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  transition: background-color 0.2s ease;
}
.icon-btn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.icon-btn .icon { width: 20px; height: 20px; }

.theme-toggle { display: none; }
.js .theme-toggle { display: grid; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle[data-mode="dark"] .icon-sun { display: block; }
.theme-toggle[data-mode="dark"] .icon-moon { display: none; }

.btn--header {
  min-height: 42px;
  margin-left: 6px;
  padding: 0 1.1em;
  font-size: 0.92rem;
  --btn-bg: var(--on-brand);
  --btn-fg: var(--brand);
}
.site-header.is-solid .btn--header {
  --btn-bg: var(--brand);
  --btn-fg: var(--on-brand);
}
.site-header.is-solid .btn--header:hover { --btn-bg: var(--brand-hover); }

.menu-toggle { display: none; }
.menu-icon { position: relative; width: 20px; height: 12px; }
.menu-icon i {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, top 0.25s ease;
}
.menu-icon i:first-child { top: 1px; }
.menu-icon i:last-child { top: 9px; }
.menu-toggle[aria-expanded="true"] .menu-icon i:first-child { top: 5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon i:last-child { top: 5px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 16px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--line);
}
.mobile-menu a:not(.btn) {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.mobile-menu__mail {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1023px) {
  :root { --header-h: 64px; }
  .site-nav, .btn--header { display: none; }
  .menu-toggle { display: grid; }
  .header-actions { margin-left: auto; }
}
@media (min-width: 1024px) {
  .mobile-menu { display: none !important; }
}
/* Very narrow phones: tighten the header so brand, language, theme and menu fit */
@media (max-width: 380px) {
  .header-actions { gap: 2px; }
  .header-actions .icon-btn { width: 38px; }
  .lang { margin-right: 2px; }
  .lang a { min-width: 30px; padding: 0 6px; }
}

/* =================================================================
   Hero
   ================================================================= */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--brand);
  color: var(--on-brand);
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(36px, 6vw, 88px));
  padding-bottom: clamp(64px, 8vw, 120px);
}

/* Graph paper that fades toward the headline */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(110% 85% at 78% 78%, #000 25%, transparent 72%);
  mask-image: radial-gradient(110% 85% at 78% 78%, #000 25%, transparent 72%);
}

.hero-head {
  display: grid;
  justify-items: start;
  gap: clamp(20px, 2.5vw, 32px);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--on-brand-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live-bright);
}
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.7; }
  80%, 100% { transform: scale(3); opacity: 0; }
}

.hero-title {
  max-width: 12.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 0.9rem + 6vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-body {
  display: grid;
  gap: clamp(48px, 7vw, 72px);
  margin-top: clamp(36px, 5vw, 64px);
}
@media (min-width: 1040px) {
  .hero-body {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: clamp(48px, 5vw, 80px);
  }
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 32px;
  max-width: 34rem;
}

.hero-lead {
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.5;
  color: var(--on-brand-muted);
  text-wrap: pretty;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 480px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--on-brand-line);
}
.hero-facts dt {
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-brand-muted);
}
.hero-facts dd { font-size: 0.98rem; font-weight: 600; line-height: 1.3; }

/* Narrow screens: one fact per row, label left and value right */
@media (max-width: 480px) {
  .hero-facts { grid-template-columns: 1fr; gap: 12px; }
  .hero-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
  .hero-facts dt { margin-bottom: 0; }
  .hero-facts dd { text-align: right; }
}

/* ---------- Live demo: console + release notes + phone ---------- */

.demo {
  position: relative;
  container-type: inline-size;
  width: 100%;
  max-width: 780px;
}

.demo-stage {
  position: relative;
  min-height: 74cqi;
}

.demo-left {
  position: relative;
  z-index: 1;
  width: 72cqi;
}

.win-dots { display: inline-flex; gap: 6px; flex: none; }
.win-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
}

.console {
  container-type: inline-size;
  overflow: hidden;
  border-radius: 14px;
  background: var(--console);
  color: var(--console-ink);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--console-line);
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--console-line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--console-muted);
}
.console-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.console-ver {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--console-line);
  color: var(--console-ink);
}

.console-body {
  /* Right padding keeps text clear of the phone that overlaps this edge */
  padding: 16px calc(18px + 4.5cqi) 18px 18px;
  font-family: var(--font-mono);
  font-size: clamp(10px, 2.55cqi, 13px);
  line-height: 1.75;
}
.c-prompt { margin-right: 0.6ch; color: var(--code-key); }
.c-steps { margin-top: 0.3em; list-style: none; }
.c-steps li {
  display: grid;
  grid-template-columns: 1.7em minmax(0, 1fr) auto;
  align-items: center;
  white-space: nowrap;
}
.c-steps li span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.c-ok { width: 1.05em; height: 1.05em; color: var(--live-bright); }
.c-dur { padding-left: 1ch; color: var(--console-muted); }

.c-live {
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin: 0.8em 0 0.35em;
  padding-top: 0.8em;
  border-top: 1px dashed var(--console-line);
  font-size: 0.82em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--console-muted);
}
.c-live .dot { width: 0.65em; height: 0.65em; }

/* Newest request on top; older lines slide down under the release card */
.c-log {
  display: flex;
  flex-direction: column;
  height: calc(5 * 1.75em);
  overflow: hidden;
  list-style: none;
}
.c-log li {
  display: grid;
  flex: none;
  grid-template-columns: 8.6ch 4.6ch minmax(0, 1fr) 3.6ch 4.8ch;
  column-gap: 0.9ch;
  height: 1.75em;
  overflow: hidden;
  white-space: nowrap;
}
.c-log li.is-new { animation: line-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.c-log time, .c-log .t { color: var(--console-muted); }
.c-log .t { text-align: right; }
.c-log .m { color: var(--code-key); }
.c-log .p { overflow: hidden; text-overflow: ellipsis; }
.c-log .s { color: var(--live-bright); }

@keyframes line-in {
  from { height: 0; opacity: 0; }
  to { height: 1.75em; opacity: 1; }
}

.release-card {
  position: relative;
  z-index: 2;
  width: 46cqi;
  margin: -6cqi 0 0 8cqi;
  padding: 2.4cqi 2.8cqi;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  font-size: clamp(11px, 2cqi, 14.5px);
}
.rc-head {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin-bottom: 0.75em;
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--muted);
}
.rc-ver {
  padding: 0.15em 0.55em;
  border-radius: 6px;
  background: var(--brand);
  color: var(--on-brand);
}
.rc-list { display: grid; gap: 0.4em; list-style: none; font-weight: 500; }
.rc-list li { display: flex; align-items: center; gap: 0.65em; }
.rc-add, .rc-fix {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.4em;
  height: 1.4em;
  border-radius: 5px;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1;
}
.rc-add { background: var(--live-tint); color: var(--live); font-family: var(--font-mono); }
.rc-fix { background: var(--sunken); color: var(--muted); }

/* Phone: everything inside scales with the phone's own width */
.phone {
  --phone-w: 31cqi;
  position: absolute;
  z-index: 3;
  top: 8cqi;
  right: 0;
  width: var(--phone-w);
  aspect-ratio: 9 / 18.5;
  padding: calc(var(--phone-w) * 0.032);
  border-radius: calc(var(--phone-w) * 0.17);
  background: var(--console);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--console-line);
  container-type: inline-size;
}

.phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 14cqi;
  background: var(--surface);
  color: var(--ink);
  font-size: 5.4cqi;
  line-height: 1.35;
}

.ph-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15em 1.7em 0.3em;
  font-size: 0.8em;
  font-weight: 600;
}
.ph-sys { display: flex; align-items: flex-end; gap: 0.2em; }
.ph-sys i { width: 0.3em; border-radius: 1px; background: currentColor; }
.ph-sys i:nth-child(1) { height: 0.45em; }
.ph-sys i:nth-child(2) { height: 0.65em; }
.ph-sys i:nth-child(3) { width: 1.4em; height: 0.7em; margin-left: 0.25em; border-radius: 0.2em; }

.ph-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5em 1.2em 0.4em;
  font-weight: 600;
}
.ph-store { display: inline-flex; align-items: center; gap: 0.5em; }
.ph-logo { width: 1.4em; height: 1.4em; border-radius: 0.4em; background: var(--brand); }
.ph-bell { width: 1.1em; height: 1.1em; border: 1.5px solid var(--muted); border-radius: 50% 50% 0.3em 0.3em; }

.ph-hero {
  margin: 0.4em 0.85em 0;
  padding: 0.85em 1em 0.6em;
  border-radius: 1em;
  background: var(--sunken);
}
.ph-label { font-size: 0.78em; color: var(--muted); }
.ph-total {
  font-family: var(--font-display);
  font-size: 1.85em;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.ph-sub { font-size: 0.78em; color: var(--muted); }
.ph-up { margin-left: 0.3em; font-weight: 600; color: var(--live); }
.ph-spark { width: 100%; height: 2.6em; margin-top: 0.35em; overflow: visible; }
.ph-spark-area { fill: var(--brand); opacity: 0.12; }
.ph-spark-line {
  fill: none;
  stroke: var(--brand-text);
  stroke-width: 1.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.ph-section {
  padding: 0.95em 1.2em 0.3em;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.ph-orders {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 0.85em;
  list-style: none;
}
.ph-orders li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65em;
  height: 3em;
  overflow: hidden;
  padding: 0 0.35em;
  border-bottom: 1px solid var(--line);
}
.ph-orders li.is-new { animation: order-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes order-in {
  from { height: 0; opacity: 0; }
  to { height: 3em; opacity: 1; }
}
.ph-av {
  display: grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-text);
  font-size: 0.72em;
  font-weight: 700;
}
.ph-o { display: grid; min-width: 0; line-height: 1.25; }
.ph-o b, .ph-o small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-o b { font-size: 0.88em; font-weight: 600; }
.ph-o small { font-size: 0.72em; color: var(--muted); }
.ph-amt { font-size: 0.88em; font-weight: 600; font-variant-numeric: tabular-nums; }

.ph-tabbar {
  display: flex;
  justify-content: space-around;
  padding: 0.8em 1em 1.2em;
  border-top: 1px solid var(--line);
}
.ph-tabbar i { width: 1.25em; height: 1.25em; border-radius: 0.35em; background: var(--line-strong); }
.ph-tabbar i.is-on { background: var(--brand); }

/* Push notification banner inside the phone */
.toast {
  position: absolute;
  z-index: 2;
  top: 2.55em;
  left: 0.5em;
  right: 0.5em;
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.6em 0.75em 0.6em 0.6em;
  border-radius: 1.1em;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--line);
  font-size: 0.92em;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(-70%) scale(0.96);
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast.is-visible { opacity: 1; transform: none; }
.toast-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.1em;
  height: 2.1em;
  border-radius: 0.55em;
  background: var(--brand);
  color: var(--on-brand);
}
.toast-icon svg { width: 100%; height: 100%; }
.toast-text { display: grid; min-width: 0; flex: 1; }
.toast-text b { font-size: 0.92em; font-weight: 600; }
.toast-text small {
  overflow: hidden;
  font-size: 0.8em;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toast-time { align-self: flex-start; font-size: 0.72em; color: var(--muted); }

/* Phones: console on top, release notes and phone below, phone cut by the hero edge */
@media (max-width: 599px) {
  .hero { padding-bottom: 0; }
  .demo-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 62cqi;
    min-height: 0;
    clip-path: inset(-80px -80px 0 -80px);
  }
  .demo-left { display: contents; }
  .console { grid-column: 1 / -1; grid-row: 1; }
  .console-body { padding-right: 18px; padding-bottom: 7cqi; }
  .release-card {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    width: auto;
    margin: -8cqi 1cqi 0 3cqi;
    padding: 3.4cqi 3.8cqi;
    font-size: 3.4cqi;
  }
  .rc-date { display: none; }
  .phone {
    --phone-w: 50cqi;
    position: relative;
    inset: auto;
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    margin: -8cqi 2cqi 0 0;
  }
}

/* =================================================================
   Services
   ================================================================= */

.svc { display: grid; gap: 32px; }

@media (min-width: 960px) {
  .svc {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: clamp(40px, 5vw, 80px);
  }
}

.svc-tabs {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-strong);
}

.svc-tab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 2px;
  width: 100%;
  padding: 18px 4px 18px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: none;
  color: var(--muted);
  text-align: left;
  transition: color 0.2s ease;
}
.svc-tab:hover { color: var(--ink); }
.svc-tab[aria-selected="true"] { color: var(--ink); }

.svc-tab__name {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 0.95rem + 1vw, 1.95rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.svc-tab__meta { grid-column: 1; font-size: 0.92rem; }
.svc-tab__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  color: var(--brand-text);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.2s ease, transform 0.25s ease;
}
.svc-tab[aria-selected="true"] .svc-tab__arrow { opacity: 1; transform: none; }

.svc-panel { display: grid; gap: 28px; }
.js .svc-panel:not(.is-active) { display: none; }
.js .svc-panel.is-active { animation: panel-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.svc-copy { display: grid; gap: 12px; max-width: 40em; }
.svc-copy > p:first-of-type { font-size: 1.1rem; color: var(--ink-2); }
.svc-examples-label {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--ink-2);
}

@media (min-width: 960px) {
  .svc-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Small screens: tabs become a scrolling chip row */
@media (max-width: 959px) {
  .svc-tabs {
    flex-direction: row;
    gap: 8px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 4px;
    overflow-x: auto;
    border: 0;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .svc-tabs::-webkit-scrollbar { display: none; }
  .svc-tab {
    flex: none;
    display: block;
    width: auto;
    padding: 10px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--ink-2);
  }
  .svc-tab__name {
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0;
  }
  .svc-tab__meta, .svc-tab__arrow { display: none; }
  .svc-tab[aria-selected="true"] {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
  }
}

/* ---------- Illustrations ---------- */

.illus {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10.5;
  overflow: hidden;
  border-radius: var(--radius-l);
  background-color: var(--brand-tint);
  background-image: radial-gradient(var(--brand-grid) 1.2px, transparent 1.4px);
  background-size: 18px 18px;
  container-type: inline-size;
}

.illus-inner {
  width: 88%;
  font-size: clamp(7px, 1.9cqi, 14px);
  line-height: 1.35;
}
.illus-inner--center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3em;
}

.win {
  overflow: hidden;
  border-radius: 1em;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.7em 0.9em;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.win-bar .win-dots { gap: 0.4em; }
.win-bar .win-dots i { width: 0.65em; height: 0.65em; }
.win-bar::after { content: ""; width: 2.75em; flex: none; }
.win-url {
  flex: 1;
  max-width: 22em;
  margin-inline: auto;
  padding: 0.25em 0.8em;
  border-radius: 0.5em;
  background: var(--sunken);
  font-family: var(--font-mono);
  font-size: 0.8em;
  text-align: center;
  white-space: nowrap;
}

/* Web: dashboard */
.dash-body { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); }
.dash-side {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  padding: 1em 0.75em;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--sunken) 50%, var(--surface));
}
.dash-brand {
  width: 1.8em;
  height: 1.8em;
  margin: 0 0 0.9em 0.45em;
  border-radius: 0.45em;
  background: var(--brand);
}
.dash-link {
  padding: 0.4em 0.6em;
  border-radius: 0.45em;
  font-size: 0.9em;
  color: var(--muted);
}
.dash-link.is-on {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--line);
}
.dash-main { display: grid; align-content: start; gap: 1em; padding: 1.1em; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8em; }
.kpis--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi {
  display: grid;
  gap: 0.15em;
  padding: 0.75em 0.9em;
  border: 1px solid var(--line);
  border-radius: 0.7em;
}
.kpi span {
  overflow: hidden;
  font-size: 0.78em;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kpi b {
  font-family: var(--font-display);
  font-size: 1.55em;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.kpi em { font-size: 0.75em; font-style: normal; font-weight: 600; color: var(--live); }

.dash-chart { padding: 0.9em; border: 1px solid var(--line); border-radius: 0.7em; }
.dash-chart-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.9em;
  font-size: 0.8em;
  color: var(--muted);
}
.dash-legend { display: inline-flex; align-items: center; gap: 0.45em; }
.dash-legend i { width: 0.7em; height: 0.7em; border-radius: 0.2em; background: var(--brand); }
.bars { display: flex; align-items: flex-end; gap: 0.5em; height: 8.5em; }
.bars i {
  flex: 1;
  height: var(--h);
  border-radius: 0.3em 0.3em 0.1em 0.1em;
  background: color-mix(in srgb, var(--brand) 24%, transparent);
  transform-origin: bottom;
}
.bars i.is-now { background: var(--brand); }
.svc-panel.is-active .bars i { animation: bar-grow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes bar-grow { from { transform: scaleY(0.08); } }

/* Mobile: loyalty app */
.mini-phone {
  flex: none;
  width: 15.5em;
  aspect-ratio: 9 / 18.5;
  padding: 0.5em;
  border-radius: 2.5em;
  background: var(--console);
  box-shadow: var(--shadow-md);
}
.mp-screen {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  height: 100%;
  overflow: hidden;
  padding: 2.2em 1.1em 1.1em;
  border-radius: 2.05em;
  background: var(--surface);
  color: var(--ink);
}
.mp-top { display: flex; align-items: center; justify-content: space-between; font-size: 0.95em; font-weight: 600; }
.mp-avatar {
  display: grid;
  place-items: center;
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-text);
  font-size: 0.8em;
}
.mp-card {
  display: grid;
  gap: 0.35em;
  padding: 1em 1.05em;
  border-radius: 1em;
  background: var(--brand);
  color: var(--on-brand);
}
.mp-card-label, .mp-card-foot { font-size: 0.75em; color: var(--on-brand-muted); }
.mp-points {
  font-family: var(--font-display);
  font-size: 2.1em;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.mp-bar { height: 0.45em; overflow: hidden; border-radius: 1em; background: var(--on-brand-line); }
.mp-bar i { display: block; width: var(--p); height: 100%; border-radius: inherit; background: var(--on-brand); }
.mp-label { margin-top: 0.15em; font-size: 0.75em; font-weight: 600; color: var(--muted); }
.mp-item { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto; align-items: center; gap: 0.7em; }
.mp-thumb {
  width: 2.6em;
  height: 2.6em;
  border-radius: 0.7em;
  background: radial-gradient(circle at 50% 45%, var(--thumb-a) 0 38%, var(--thumb-b) 40% 52%, var(--sunken) 54%);
}
.mp-thumb--b { background: radial-gradient(circle at 50% 50%, var(--thumb-b) 0 30%, var(--thumb-a) 32% 48%, var(--sunken) 50%); }
.mp-name { display: grid; font-size: 0.88em; font-weight: 600; line-height: 1.25; }
.mp-name small { font-weight: 400; color: var(--muted); }
.mp-add {
  display: grid;
  place-items: center;
  width: 1.9em;
  height: 1.9em;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  line-height: 1;
}
.mp-cta {
  margin-top: auto;
  padding: 0.8em;
  border-radius: 0.8em;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.88em;
  font-weight: 600;
  text-align: center;
}
.mp-notice {
  display: flex;
  align-items: center;
  gap: 0.8em;
  max-width: 17em;
  padding: 0.9em 1.1em 0.9em 0.9em;
  border-radius: 1em;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  line-height: 1.3;
}
.mp-notice b { display: block; }
.mp-notice small { color: var(--muted); }
.mp-notice-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.3em;
  height: 2.3em;
  border-radius: 50%;
  background: var(--live-tint);
  color: var(--live);
}
.mp-notice-icon svg { width: 1.2em; height: 1.2em; }

/* Internal tools: approvals table */
.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: 0.9em 1.1em;
  border-bottom: 1px solid var(--line);
}
.tool-head b { font-family: var(--font-display); font-size: 1.15em; letter-spacing: -0.02em; }
.tool-filters { display: flex; gap: 0.4em; font-size: 0.8em; }
.tool-filters span {
  padding: 0.3em 0.75em;
  border: 1px solid var(--line);
  border-radius: 2em;
  color: var(--muted);
  white-space: nowrap;
}
.tool-filters .is-on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.tr {
  display: grid;
  grid-template-columns: 6.2em minmax(0, 1fr) 5.4em 6.4em;
  align-items: center;
  gap: 1em;
  padding: 0.62em 1.1em;
  border-bottom: 1px solid var(--line);
  font-size: 0.92em;
  white-space: nowrap;
}
.tr > span { overflow: hidden; text-overflow: ellipsis; }
.tr.th {
  padding-block: 0.7em;
  font-size: 0.72em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tr .mono { font-family: var(--font-mono); font-size: 0.88em; color: var(--muted); }
.tr .num { text-align: right; font-variant-numeric: tabular-nums; }
.pill {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: 2em;
  font-size: 0.82em;
  font-style: normal;
  font-weight: 600;
}
.pill--ok { background: var(--live-tint); color: var(--live); }
.pill--wait { background: var(--wait-tint); color: var(--wait); }
.tool-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75em 1.1em;
  font-size: 0.82em;
  color: var(--muted);
}
.tool-btn {
  padding: 0.5em 0.95em;
  border-radius: 0.5em;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
}

/* SaaS: subscription admin */
.saas { display: grid; gap: 1em; padding: 1.1em; }
.saas-chart { width: 100%; height: 7.5em; overflow: visible; }
.saas-area { fill: var(--brand); opacity: 0.12; }
.saas-line {
  fill: none;
  stroke: var(--brand-text);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.saas-plans { display: grid; gap: 0.6em; padding-top: 0.2em; }
.plan-row {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr) 3em;
  align-items: center;
  gap: 0.9em;
  font-size: 0.9em;
}
.plan-row b { text-align: right; font-variant-numeric: tabular-nums; }
.plan-bar { height: 0.6em; overflow: hidden; border-radius: 1em; background: var(--sunken); }
.plan-bar i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--brand); }

/* Integrations: system map */
.integr { width: 100%; height: auto; overflow: visible; }
.integr-link {
  fill: none;
  stroke: var(--brand-text);
  stroke-width: 1.6;
  stroke-dasharray: 4 6;
  animation: dash-flow 1.2s linear infinite;
}
.integr-link--in { animation-direction: reverse; }
@keyframes dash-flow { to { stroke-dashoffset: -20; } }
.integr-node rect { fill: var(--surface); stroke: var(--line-strong); }
.integr-node text {
  fill: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-anchor: middle;
}
.integr-core rect { fill: var(--brand); }
.integr-core text {
  fill: var(--on-brand);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-anchor: middle;
}
.integr-dot { fill: var(--brand-text); }
.integr-tag {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-anchor: middle;
}

/* AI: document extraction */
.ai {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr);
  align-items: center;
  gap: 1.3em;
}
.ai-doc {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  aspect-ratio: 1 / 1.3;
  overflow: hidden;
  padding: 1.4em 1.3em;
  border-radius: 0.6em;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
}
.ai-doc-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.6em; }
.ai-doc-head b {
  font-family: var(--font-display);
  font-size: 1.3em;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.ai-doc-head span { font-family: var(--font-mono); font-size: 0.8em; color: var(--muted); }
.sk { display: block; flex: none; width: var(--w); height: 0.55em; border-radius: 1em; background: var(--sunken); }
.ai-rows { display: grid; gap: 0.75em; margin-top: 0.9em; padding-top: 0.9em; border-top: 1px solid var(--line); }
.ai-row { display: flex; justify-content: space-between; gap: 1em; }
.ai-doc-total {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.7em;
  border-top: 1px solid var(--line);
  font-size: 0.9em;
}
.ai-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -3em;
  height: 3em;
  border-bottom: 2px solid var(--brand-text);
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--brand) 20%, transparent));
  animation: scan 3s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes scan {
  0% { top: -3em; }
  70%, 100% { top: 100%; }
}
.ai-flow { color: var(--brand-text); }
.ai-flow svg { width: 2em; height: 2em; }
.ai-out { display: grid; gap: 0.8em; padding: 1.1em 1.2em; }
.ai-out-head { display: flex; align-items: center; gap: 0.5em; font-size: 0.92em; font-weight: 600; }
.ai-out-head svg { width: 1.2em; height: 1.2em; color: var(--brand-text); }
.ai-fields { display: grid; }
.ai-fields div {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  padding: 0.5em 0;
  border-bottom: 1px dashed var(--line-strong);
  font-size: 0.88em;
}
.ai-fields dt { color: var(--muted); }
.ai-fields dd { font-weight: 600; text-align: right; }
.ai-match {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0.75em;
  border-radius: 0.5em;
  background: var(--live-tint);
  color: var(--live);
  font-size: 0.85em;
  font-weight: 600;
}
.ai-match svg { width: 1.1em; height: 1.1em; }

/* =================================================================
   Process
   ================================================================= */

.process {
  background: var(--night);
  color: var(--on-night);
  box-shadow: inset 0 1px 0 var(--night-edge), inset 0 -1px 0 var(--night-edge);
}
.process .eyebrow,
.process .lead { color: var(--on-night-muted); }

.releases { position: relative; display: grid; gap: 48px; }

@media (min-width: 900px) {
  .releases {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(24px, 3vw, 44px);
  }
  /* The release line: solid through launch, fading into ongoing work */
  .releases::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 0;
    right: calc(var(--gutter) * -1);
    height: 1px;
    background: linear-gradient(90deg, var(--night-line) 72%, transparent);
  }
}

.release { position: relative; display: grid; align-content: start; gap: 12px; }
.ver {
  position: relative;
  z-index: 1;
  justify-self: start;
  margin-bottom: 14px;
  padding: 5px 13px;
  border: 1px solid var(--night-line);
  border-radius: 999px;
  background: var(--night);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.4;
}
.release--launch .ver { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.release__time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--on-night-muted); }
.release__text { color: var(--on-night-muted); }
.release__out {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--night-line);
  font-weight: 500;
}
.release__out span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-night-muted);
}
.process-note { margin-top: clamp(48px, 6vw, 72px); font-size: 0.9rem; color: var(--on-night-muted); }

/* =================================================================
   Studio
   ================================================================= */

.studio-grid { display: grid; gap: clamp(40px, 5vw, 72px); align-items: center; }
@media (min-width: 960px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.studio-copy { display: grid; gap: 22px; max-width: 36rem; }
.studio-copy .eyebrow { margin-bottom: -4px; }
.studio-copy > p:last-child { color: var(--ink-2); }

.manifest {
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--console);
  color: var(--console-ink);
  box-shadow: var(--shadow-md);
}
.manifest__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--console-line);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--console-muted);
}
.manifest pre {
  margin: 0;
  padding: 22px 24px 26px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 0.72rem + 0.25vw, 0.92rem);
  line-height: 1.8;
}
.tk-k { color: var(--code-key); }
.tk-s { color: var(--code-str); }
.tk-p { color: var(--code-punc); }

.principles {
  display: grid;
  gap: 40px 48px;
  margin-top: clamp(64px, 8vw, 112px);
}
@media (min-width: 640px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.principle {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}
.principle p { max-width: 34em; color: var(--muted); }

/* =================================================================
   Ways to work together
   ================================================================= */

.engage { background: var(--band); }

.plans { display: grid; gap: 20px; }

.plan {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 2.6vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
}
.plan__top { display: grid; gap: 6px; }
.plan__name {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.plan__for { font-weight: 600; color: var(--brand-text); }
.plan__text { color: var(--ink-2); }
.plan__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}
.plan__meta span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.plan__meta b { font-weight: 600; }

.checklist { display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--brand-tint);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: calc(0.18em + 6px);
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--brand-text);
  border-bottom: 2px solid var(--brand-text);
  transform: rotate(-45deg);
}

.plan__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: auto;
  padding-top: 8px;
  font-weight: 600;
  color: var(--brand-text);
  text-decoration: none;
}
.plan__cta .icon { transition: transform 0.2s ease; }
.plan__cta:hover { text-decoration: underline; }
.plan__cta:hover .icon { transform: translateX(3px); }

@media (min-width: 960px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Subgrid lines up each card's rows (text, length, checklist, link) across all three */
  @supports (grid-template-rows: subgrid) {
    .plans { grid-template-rows: repeat(5, auto); row-gap: 0; }
    .plan { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 20px; }
    .plan__cta { align-self: end; justify-self: start; }
  }
}

/* =================================================================
   FAQ
   ================================================================= */

.faq-grid { display: grid; gap: 40px; }
@media (min-width: 960px) {
  .faq-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
  .faq-head { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; }
}
.faq-head { display: grid; align-content: start; gap: 18px; }
.faq-head .eyebrow { margin-bottom: -2px; }
.faq-hint { color: var(--muted); }
.faq-hint a { color: var(--brand-text); }

.faq-list { border-top: 1px solid var(--line-strong); }
.faq-item { border-bottom: 1px solid var(--line-strong); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--brand-text); }
.faq-icon {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.3s ease; }
.faq-item[open] .faq-icon { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-item p { max-width: 62ch; padding: 0 56px 26px 0; color: var(--ink-2); }

/* =================================================================
   Contact
   ================================================================= */

.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--section-y);
  background: var(--brand);
  color: var(--on-brand);
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(90% 80% at 10% 100%, #000 15%, transparent 65%);
  mask-image: radial-gradient(90% 80% at 10% 100%, #000 15%, transparent 65%);
}

.contact-grid { display: grid; gap: 48px; }
@media (min-width: 1000px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: start;
    gap: clamp(48px, 6vw, 96px);
  }
}

.contact-copy { display: grid; align-content: start; gap: 24px; }
.contact-copy .eyebrow { margin-bottom: -4px; color: var(--on-brand-muted); }
.contact-copy .lead { color: var(--on-brand-muted); }

.next-steps { display: grid; gap: 14px; margin-top: 4px; counter-reset: step; }
.next-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  counter-increment: step;
}
.next-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--on-brand-line);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.next-steps b { font-weight: 600; }

.email-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 8px;
  padding: 16px 18px;
  border: 1px solid var(--on-brand-line);
  border-radius: var(--radius-m);
  background: var(--on-brand-wash);
}
.email-box__label {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-brand-muted);
}
.email-box__addr {
  min-width: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.email-box__addr:hover { text-decoration: underline; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid var(--on-brand-line);
  border-radius: 8px;
  background: transparent;
  color: var(--on-brand);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
}
.copy-btn:hover { background: var(--on-brand-wash); }
.copy-btn .icon { width: 16px; height: 16px; }

/* ---------- Form ---------- */

.form {
  position: relative;
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius-l);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.form-fields { display: grid; gap: 20px; }
.field-row { display: grid; gap: 20px; }
@media (min-width: 560px) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.field { display: block; }
.field > label,
.field > legend { padding: 0; font-size: 0.92rem; font-weight: 600; }
.optional { margin-left: 4px; font-size: 0.85em; font-weight: 400; color: var(--muted); }

.field input,
.field textarea,
.select select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover,
.field textarea:hover,
.select select:hover { border-color: var(--muted); }
.field input:focus,
.field textarea:focus,
.select select:focus {
  outline: none;
  border-color: var(--brand-text);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { font-size: 0.85rem; color: var(--danger); }
.field-error:empty { display: none; }
.field ::placeholder { color: var(--muted); opacity: 0.85; }

.select { position: relative; }
.select select { padding-right: 42px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 17px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { position: relative; }
.chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--brand-text); outline-offset: 2px; }

.form-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.form-note { font-size: 0.85rem; color: var(--muted); }
.form-status { font-size: 0.95rem; color: var(--ink-2); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }

.form-success { display: grid; justify-items: start; gap: 14px; padding: 8px 0; }
.form-success:focus { outline: none; }
.form-success__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--live-tint);
  color: var(--live);
}
.form-success__icon svg { width: 26px; height: 26px; }
.form-success p { color: var(--ink-2); }

/* =================================================================
   Footer
   ================================================================= */

.site-footer {
  padding-block: clamp(64px, 8vw, 96px) 32px;
  background: var(--night);
  color: var(--on-night);
  box-shadow: inset 0 1px 0 var(--night-edge);
}
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
}
.footer-brand { display: grid; justify-items: start; gap: 18px; max-width: 26rem; }
.footer-brand p { color: var(--on-night-muted); }
.footer-h {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-night-muted);
}
.footer-col ul { display: grid; gap: 10px; }
.site-footer a { text-decoration: none; }
.footer-col a:hover,
.to-top:hover { text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--night-line);
  font-size: 0.9rem;
  color: var(--on-night-muted);
}
.footer-bottom__links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer-bottom__links a:hover { text-decoration: underline; }
.to-top { display: inline-flex; align-items: center; gap: 6px; }

/* =================================================================
   404
   ================================================================= */

.nf {
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding-block: calc(var(--header-h) + 64px) 96px;
}
.nf-inner { display: grid; justify-items: start; gap: 24px; max-width: 46rem; }
.nf-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.nf-console {
  width: 100%;
  max-width: 34rem;
  padding: 18px 20px;
  border-radius: var(--radius-m);
  background: var(--console);
  color: var(--console-ink);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  box-shadow: var(--shadow-md);
}
.nf-console .err { color: var(--code-err); }
.nf-console .dim { color: var(--console-muted); }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* =================================================================
   Motion preferences
   ================================================================= */

@media (prefers-reduced-motion: reduce) {
  html.smooth-scroll { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
