/* keappi.com - single stylesheet.
   Palette, fonts and icons come from branding/. Every value used by a component
   is a custom property defined in :root below; components never hardcode them. */

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
  /* Palette (branding/colors/colors.css) */
  --ink: #0F2027;
  --coral: #FF5A36;
  --mist: #EEF3F1;
  --panel: #E3ECE9;
  --ink-soft: #3B4E51;
  --line: #C9D6D3;
  --paper: #FFF6F3;
  --amber: #FFC857;
  --white: #FFFFFF;
  --muted: #6B7C83;
  --ok: #1F8A5B;
  --warn: #B7791F;
  --info: #2B6CB0;
  --danger: #C53030;
  --ok-text: #17734B;
  --warn-text: #8A5A0F;

  /* Same colours as RGB channels, for alpha tints */
  --ink-rgb: 15 32 39;
  --coral-rgb: 255 90 54;
  --amber-rgb: 255 200 87;
  --paper-rgb: 255 246 243;
  --white-rgb: 255 255 255;
  --mist-rgb: 238 243 241;

  /* Background blobs */
  --blob-coral: rgb(var(--coral-rgb) / .22);
  --blob-coral-soft: rgb(var(--coral-rgb) / .18);
  --blob-amber: rgb(var(--amber-rgb) / .2);
  --blob-ink: rgb(var(--ink-rgb) / .08);
  --hero-glow-coral: rgb(var(--coral-rgb) / .34);
  --hero-glow-amber: rgb(var(--amber-rgb) / .2);
  --hero-grid-line: rgb(var(--paper-rgb) / .06);
  --hero-art-line: rgb(var(--paper-rgb) / .14);

  /* Light glass */
  --glass-bg: linear-gradient(135deg, rgb(var(--white-rgb) / .72), rgb(var(--white-rgb) / .38));
  --glass-bg-strong: linear-gradient(135deg, rgb(var(--white-rgb) / .86), rgb(var(--white-rgb) / .7));
  --glass-border: rgb(var(--white-rgb) / .75);
  --glass-highlight: inset 0 1px 0 rgb(var(--white-rgb) / .95);
  --glass-shadow: var(--glass-highlight), 0 18px 44px rgb(var(--ink-rgb) / .12);
  --glass-shadow-hover: var(--glass-highlight), 0 26px 56px rgb(var(--ink-rgb) / .18);
  --glass-fallback: rgb(var(--white-rgb) / .94);

  /* Dark glass (over Tinta) */
  --glass-dark-bg: linear-gradient(135deg, rgb(var(--paper-rgb) / .1), rgb(var(--paper-rgb) / .04));
  --glass-dark-border: rgb(var(--paper-rgb) / .22);
  --glass-dark-highlight: inset 0 1px 0 rgb(var(--paper-rgb) / .28);
  --glass-dark-shadow: var(--glass-dark-highlight), 0 30px 70px rgb(var(--ink-rgb) / .5);
  --glass-dark-fallback: rgb(var(--ink-rgb) / .92);

  /* Pointer shine */
  --shine: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(var(--white-rgb) / .5), transparent 45%);
  --shine-dark: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(var(--paper-rgb) / .1), transparent 45%);

  /* Blur */
  --blur: blur(20px) saturate(1.7);
  --blur-soft: blur(14px) saturate(1.5);

  /* Radii */
  --radius-xs: 8px;
  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 26px;
  --radius-xl: 34px;
  --radius-pill: 999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --gutter: 16px;
  --max: 1180px;
  --max-text: 68ch;
  --header-h: 68px;
  --target: 44px;

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --text-xs: .8125rem;
  --text-s: .9375rem;
  --text-m: 1.0625rem;
  --text-l: clamp(1.125rem, 1rem + .5vw, 1.3125rem);
  --text-h3: clamp(1.1875rem, 1.05rem + .5vw, 1.375rem);
  --text-h2: clamp(1.75rem, 1.3rem + 1.9vw, 2.75rem);
  --text-h1: clamp(2.125rem, 1.4rem + 3.4vw, 4rem);
  --text-h1-card: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  --leading: 1.6;
  --leading-tight: 1.1;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: .3s;
  --lift: translateY(-3px);

  /* Focus */
  --focus: 3px solid var(--ink);
  --focus-on-dark: 3px solid var(--amber);
  --focus-offset: 3px;
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}
@media (max-width: 639px) {
  :root {
    --blur: blur(12px) saturate(1.5);
    --blur-soft: blur(10px) saturate(1.4);
  }
}

/* ==========================================================================
   2. Fonts (self-hosted, latin + latin-ext subsets from branding/fonts)
   ========================================================================== */
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(../fonts/spacegrotesk-v22-V8mDoQDjQSkFtoMM3T6r8E7mPbF4Cw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(../fonts/spacegrotesk-v22-V8mDoQDjQSkFtoMM3T6r8E7mPb94C-s0.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/inter-v20-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/inter-v20-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/ibmplexmono-v20--F63fjptAgt5VM-kVkqdyU8n1i8q1w.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/ibmplexmono-v20--F6qfjptAgt5VM-kVkqdyU8n3twJwlBFgg.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   3. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--space-5)); }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-m);
  line-height: var(--leading);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; font-family: var(--font-display); font-weight: 700; line-height: var(--leading-tight); letter-spacing: -.02em; margin: 0 0 var(--space-4); }
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); letter-spacing: -.01em; }
p { margin: 0 0 var(--space-4); }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.2em; }
a { color: inherit; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); border-radius: var(--radius-xs); }
.on-dark :focus-visible, .on-dark:focus-visible { outline: var(--focus-on-dark); }
strong { font-weight: 600; }
code, .mono { font-family: var(--font-mono); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-s); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-3); outline: var(--focus-on-dark); }

/* Fixed colour blobs behind everything: glass only reads over colour */
.blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.blobs span { position: absolute; border-radius: 50%; }
.blobs span:nth-child(1) { width: 62vmax; height: 62vmax; right: -22vmax; top: -24vmax; background: radial-gradient(closest-side, var(--blob-coral), transparent); }
.blobs span:nth-child(2) { width: 56vmax; height: 56vmax; left: -24vmax; bottom: -22vmax; background: radial-gradient(closest-side, var(--blob-amber), transparent); }
.blobs span:nth-child(3) { width: 46vmax; height: 46vmax; left: 8vmax; top: 18vh; background: radial-gradient(closest-side, var(--blob-ink), transparent); }
.blobs span:nth-child(4) { width: 40vmax; height: 40vmax; right: -8vmax; bottom: -16vmax; background: radial-gradient(closest-side, var(--blob-coral-soft), transparent); }

/* ==========================================================================
   4. Layout
   ========================================================================== */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space-8) 0; }
.section--flat { background: var(--mist); }
.section--panel { background: var(--panel); }
.section--tight { padding: var(--space-7) 0; }
@media (min-width: 900px) { .section { padding: var(--space-9) 0; } }
.section-head { max-width: 760px; margin-bottom: var(--space-7); }
.section-head p { color: var(--ink-soft); font-size: var(--text-l); }
.prose { max-width: var(--max-text); }
.prose h2 { font-size: var(--text-h3); margin-top: var(--space-7); }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.grid { display: grid; gap: var(--space-5); }
@media (min-width: 720px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) and (max-width: 899px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
.split { display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   5. Glass
   ========================================================================== */
.glass {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: var(--radius-l);
}
.glass-dark {
  position: relative;
  background: var(--glass-dark-bg);
  border: 1px solid var(--glass-dark-border);
  box-shadow: var(--glass-dark-shadow);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: var(--radius-xl);
  color: var(--paper);
}
/* Pointer shine (position set by site.js) */
.shine::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: var(--shine); opacity: 0; transition: opacity var(--dur) var(--ease);
}
.glass-dark.shine::after { background: var(--shine-dark); }
.shine:hover::after { opacity: 1; }

/* ==========================================================================
   6. Header and navigation
   ========================================================================== */
.site-header { position: sticky; top: var(--space-3); z-index: 50; margin-top: var(--space-3); }
.header-bar {
  display: flex; align-items: center; gap: var(--space-4);
  min-height: var(--header-h); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-5);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
.brand { display: inline-flex; align-items: center; min-height: var(--target); margin-right: auto; }
.brand img { width: 118px; height: auto; }
.nav { display: flex; align-items: center; gap: var(--space-1); }
.nav a, .lang > a, .lang > span {
  display: inline-flex; align-items: center; min-height: var(--target); padding: 0 var(--space-4);
  border-radius: var(--radius-pill); color: var(--ink); text-decoration: none; font-weight: 500; font-size: var(--text-s);
  transition: background var(--dur) var(--ease);
}
.nav a:hover { background: rgb(var(--white-rgb) / .7); }
.nav a[aria-current="page"] { background: var(--white); box-shadow: var(--glass-highlight), 0 2px 8px rgb(var(--ink-rgb) / .08); }
/* Sliding "you are here" pill (desktop, with JS). The pill replaces the
   background of the current link and glides from the previous page's link. */
.nav-pill { display: none; }
@media (min-width: 1024px) {
  .js .nav { position: relative; }
  .js .nav a[aria-current="page"] { background: none; box-shadow: none; position: relative; z-index: 1; }
  .js .nav a { position: relative; z-index: 1; }
  .js .nav-pill {
    display: block; position: absolute; z-index: 0; left: 0; top: 0; height: 100%; width: 0;
    border-radius: var(--radius-pill); background: var(--white);
    box-shadow: var(--glass-highlight), 0 2px 8px rgb(var(--ink-rgb) / .08);
    opacity: 0; pointer-events: none; transform-origin: center;
  }
  .js .nav-pill.is-on { opacity: 1; }
  .js .nav-pill.is-animated { transition: transform .5s cubic-bezier(.65, 0, .25, 1), width .5s cubic-bezier(.65, 0, .25, 1), opacity .3s var(--ease); }
}
@media (prefers-reduced-motion: reduce) { .js .nav-pill.is-animated { transition: none; } }
.lang { display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: rgb(var(--ink-rgb) / .06); }
.lang > a, .lang > span { min-width: var(--target); justify-content: center; padding: 0 var(--space-3); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500; }
.lang > span { background: var(--white); box-shadow: var(--glass-highlight); }
.lang > a:hover { background: rgb(var(--white-rgb) / .7); }
.header-bar .header-cta { display: none; }
@media (min-width: 1200px) { .header-bar .header-cta { display: inline-flex; } }
@media (max-width: 479px) { .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .menu-toggle { padding: 0; } .brand img { width: 104px; } .header-bar { padding-left: var(--space-4); gap: var(--space-2); } }

.menu-toggle {
  display: none; align-items: center; justify-content: center; gap: var(--space-2);
  min-width: var(--target); min-height: var(--target); padding: 0 var(--space-4);
  border: 0; border-radius: var(--radius-pill); background: var(--ink); color: var(--paper);
  font: 600 var(--text-s) var(--font-body); cursor: pointer;
}
.menu-toggle .bars { width: 18px; height: 12px; position: relative; }
.menu-toggle .bars::before, .menu-toggle .bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
}
.menu-toggle .bars::before { top: 2px; }
.menu-toggle .bars::after { top: 8px; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 5px; transform: rotate(-45deg); }

@media (max-width: 1023px) {
  .js .menu-toggle { display: inline-flex; }
  .js .nav {
    position: absolute; left: 0; right: 0; top: calc(100% + var(--space-2));
    flex-direction: column; align-items: stretch; gap: var(--space-1); padding: var(--space-3);
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius-l); box-shadow: var(--glass-shadow-hover);
  }
  .js .nav[hidden] { display: none; }
  .js .nav a { font-size: var(--text-m); padding: 0 var(--space-4); }
  .js .nav a[aria-current="page"] { background: var(--mist); box-shadow: inset 3px 0 0 var(--ink); }
  .no-js .header-bar { flex-wrap: wrap; border-radius: var(--radius-l); }
  .no-js .nav { flex-wrap: wrap; order: 3; width: 100%; }
}
.site-header .wrap { position: relative; }

/* ==========================================================================
   7. Buttons and pills
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--target); padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill); border: 1px solid transparent;
  font: 600 var(--text-s) var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: var(--lift); }
/* Primary: Coral fill with Tinta text (5.4:1). Papel on Coral is 2.9:1 and fails. */
.btn--primary {
  background: var(--coral); color: var(--ink);
  box-shadow: inset 0 1px 0 rgb(var(--white-rgb) / .45), 0 10px 24px rgb(var(--coral-rgb) / .3);
}
.btn--primary:hover { box-shadow: inset 0 1px 0 rgb(var(--white-rgb) / .45), 0 16px 32px rgb(var(--coral-rgb) / .38); }
.btn--glass {
  background: var(--glass-bg); color: var(--ink); border-color: var(--glass-border);
  box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--blur-soft); backdrop-filter: var(--blur-soft);
}
.btn--glass:hover { background: var(--glass-bg-strong); box-shadow: var(--glass-shadow-hover); }
.btn--ghost-dark {
  background: rgb(var(--paper-rgb) / .1); color: var(--paper); border-color: var(--glass-dark-border);
  box-shadow: var(--glass-dark-highlight); -webkit-backdrop-filter: var(--blur-soft); backdrop-filter: var(--blur-soft);
}
.btn--ghost-dark:hover { background: rgb(var(--paper-rgb) / .18); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { box-shadow: 0 12px 26px rgb(var(--ink-rgb) / .25); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
@media (max-width: 479px) { .btn-row .btn { flex: 1 1 100%; } }

.pill {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 32px; padding: var(--space-1) var(--space-4); border-radius: var(--radius-pill);
  background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-highlight);
  -webkit-backdrop-filter: var(--blur-soft); backdrop-filter: var(--blur-soft);
  font: 500 var(--text-xs) var(--font-mono); color: var(--ink);
}
.pill--dark { background: rgb(var(--paper-rgb) / .1); border-color: var(--glass-dark-border); box-shadow: var(--glass-dark-highlight); color: var(--paper); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; }
.pill-row { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0 0 var(--space-5); }

.kicker {
  display: inline-flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4);
  font: 500 var(--text-xs) var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
}
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); flex: none; }
.on-dark .kicker { color: var(--amber); }

/* ==========================================================================
   8. Hero (dark Tinta panel, glows, line art, floating glass card)
   ========================================================================== */
.hero { padding: var(--space-5) 0 0; }
.hero-panel {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: var(--paper); border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-4) var(--space-7);
}
@media (min-width: 640px) { .hero-panel { padding: var(--space-9) var(--space-7) var(--space-8); } }
.hero-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-art .glow { position: absolute; border-radius: 50%; }
.hero-art .glow--coral { width: 720px; height: 720px; right: -220px; top: -260px; background: radial-gradient(closest-side, var(--hero-glow-coral), transparent); }
.hero-art .glow--amber { width: 560px; height: 560px; right: 10%; bottom: -340px; background: radial-gradient(closest-side, var(--hero-glow-amber), transparent); }
.hero-art .grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--hero-grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000);
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000);
}
.hero-art .squares { position: absolute; right: -60px; top: 50%; width: min(620px, 70%); transform: translateY(-50%); color: var(--hero-art-line); }
@media (max-width: 899px) { .hero-art .squares { opacity: .6; right: -40%; width: 110%; } }

.hero-card { max-width: 1040px; padding: var(--space-6) var(--space-5); }
@media (min-width: 640px) { .hero-card { padding: var(--space-7); } }
.hero-card-grid { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 960px) { .hero-card-grid { grid-template-columns: 1.25fr 1fr; gap: var(--space-7); } }
.hero-card h1 { color: var(--paper); font-size: var(--text-h1-card); }
.hero-lead { font-size: var(--text-l); color: var(--paper); max-width: 46ch; }
.hero-note { margin: var(--space-4) 0 0; font-size: var(--text-s); color: var(--paper); }
.hero-note a { color: var(--paper); }

/* Sub-page hero: same panel, text straight on Tinta */
.page-hero .hero-panel { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.page-hero .hero-copy { max-width: 760px; }

/* Terminal */
@media (max-width: 479px) { .hero-card .terminal { display: none; } }
.terminal { border-radius: var(--radius-m); background: rgb(var(--ink-rgb) / .72); border: 1px solid var(--glass-dark-border); box-shadow: var(--glass-dark-highlight); overflow: hidden; }
.terminal-bar { display: flex; gap: 6px; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--glass-dark-border); }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgb(var(--paper-rgb) / .3); }
.terminal-bar span:first-child { background: var(--coral); }
.terminal-bar span:nth-child(2) { background: var(--amber); }
.terminal-body { margin: 0; padding: var(--space-4) var(--space-5) var(--space-5); min-height: 15.5em; font: 400 var(--text-xs)/1.75 var(--font-mono); color: var(--paper); white-space: pre-wrap; overflow-wrap: anywhere; }
.terminal-body .t-c { color: var(--line); }
.terminal-body .t-m { color: var(--coral); font-weight: 500; }
.terminal-body .t-k { color: var(--amber); }
.terminal-body .t-s { color: var(--paper); }
.terminal-body .cursor { display: inline-block; width: .55em; height: 1.1em; vertical-align: text-bottom; background: var(--coral); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Facts strip overlapping the hero's lower edge */
.facts { position: relative; margin-top: calc(-1 * var(--space-7)); z-index: 2; }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
@media (min-width: 720px) { .facts ul { grid-template-columns: repeat(3, 1fr); } }
.fact { padding: var(--space-4) var(--space-5); border-radius: var(--radius-m); display: flex; align-items: center; gap: var(--space-3); }
.fact.glass { background: var(--glass-bg-strong); }
.fact svg { width: 28px; height: 28px; flex: none; color: var(--ink); }
.fact strong { display: block; font-family: var(--font-display); font-size: var(--text-m); }
.fact span { display: block; font-size: var(--text-s); color: var(--ink-soft); line-height: 1.4; }

/* ==========================================================================
   9. Cards
   ========================================================================== */
.card { padding: var(--space-6) var(--space-5); border-radius: var(--radius-l); display: flex; flex-direction: column; }
@media (min-width: 640px) { .card { padding: var(--space-6); } }
.card p { color: var(--ink-soft); }
.card .icon { width: 52px; height: 52px; border-radius: var(--radius-s); display: grid; place-items: center; margin-bottom: var(--space-5); background: var(--ink); color: var(--paper); }
.card .icon svg { width: 26px; height: 26px; }
.card-link { margin-top: auto; padding-top: var(--space-3); }
.card-link a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--target); font-weight: 600; }
.card-link svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.card-link a:hover svg { transform: translateX(3px); }
.card ul { padding-left: 0; list-style: none; }
.card li { position: relative; padding-left: 1.6em; color: var(--ink-soft); margin-bottom: var(--space-2); }
.card li svg { position: absolute; left: 0; top: .2em; width: 1.1em; height: 1.1em; color: var(--ok-text); }
.card--lift { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.card--lift:hover { transform: var(--lift); box-shadow: var(--glass-shadow-hover); }
/* The whole card is clickable through its single link */
.card--linked .card-link a::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card--linked:focus-within { outline: var(--focus); outline-offset: var(--focus-offset); }
.card--linked .card-link a:focus-visible { outline: none; }
.card .tag { align-self: flex-start; margin-bottom: var(--space-4); }
.price { font-family: var(--font-mono); font-weight: 500; font-size: var(--text-h3); color: var(--ink); }

/* Plain (non-glass) card for flat sections */
.plain { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--space-6) var(--space-5); }
@media (min-width: 640px) { .plain { padding: var(--space-6); } }
.plain p { color: var(--ink-soft); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-5); counter-reset: step; }
@media (min-width: 900px) { .steps--3 { grid-template-columns: repeat(3, 1fr); } .steps--5 { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .steps--5 { grid-template-columns: repeat(2, 1fr); } }
.step { counter-increment: step; border-top: 2px solid var(--ink); padding-top: var(--space-4); }
.step::before { content: counter(step, decimal-leading-zero); display: block; font: 500 var(--text-s) var(--font-mono); color: var(--ink-soft); margin-bottom: var(--space-3); }
.step p { color: var(--ink-soft); margin: 0; }
.step h3 { margin-bottom: var(--space-2); }
.callout { margin-top: var(--space-7); padding: var(--space-5); border-left: 4px solid var(--amber); background: var(--white); border-radius: 0 var(--radius-s) var(--radius-s) 0; color: var(--ink); max-width: var(--max-text); }
.callout p:last-child { margin: 0; }

/* Questions list (sector pages) */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
@media (min-width: 720px) { .checks { grid-template-columns: repeat(2, 1fr); } }
.checks li { display: flex; gap: var(--space-3); padding: var(--space-4) var(--space-5); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); color: var(--ink-soft); }
.checks svg { width: 22px; height: 22px; flex: none; color: var(--ink); margin-top: 2px; }

/* Screenshot frame */
.shot { border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); background: var(--white); }
.shot img { width: 100%; height: auto; }
.shot-card { padding: var(--space-3); border-radius: var(--radius-l); }
.shot-card figcaption { padding: var(--space-3) var(--space-2) var(--space-1); font-size: var(--text-s); color: var(--ink-soft); }

/* Demo cards */
.demo { padding: var(--space-3); border-radius: var(--radius-l); display: flex; flex-direction: column; }
.demo .shot { border-radius: var(--radius-m); }
.demo-body { padding: var(--space-5) var(--space-3) var(--space-3); display: flex; flex-direction: column; flex: 1; }
.demo-body p { color: var(--ink-soft); }
.demo-body .btn-row { margin-top: auto; }

/* Portfolio (client work; ships empty until written permission exists) */
.portfolio:empty { display: none; }

/* Price panel */
.price-panel { padding: var(--space-6) var(--space-5); border-radius: var(--radius-xl); }
@media (min-width: 640px) { .price-panel { padding: var(--space-7); } }
.price-panel .figure { font: 500 clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem)/1 var(--font-mono); letter-spacing: -.03em; margin: var(--space-2) 0 var(--space-3); }
.price-panel .figure small { font-size: .4em; letter-spacing: 0; color: var(--ink-soft); }
.timeline { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; gap: var(--space-3); }
@media (min-width: 720px) { .timeline { grid-template-columns: repeat(3, 1fr); } }
.timeline li { padding: var(--space-4); border-radius: var(--radius-m); background: rgb(var(--white-rgb) / .7); border: 1px solid var(--glass-border); }
.timeline strong { display: block; font-family: var(--font-mono); font-weight: 500; }
.timeline span { font-size: var(--text-s); color: var(--ink-soft); }

/* FAQ */
.faq { max-width: var(--max-text); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  min-height: var(--target); padding: var(--space-4) 0; cursor: pointer; list-style: none;
  font: 600 var(--text-m) var(--font-display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; transition: transform var(--dur) var(--ease); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); }

/* ==========================================================================
   10. Dark bands
   ========================================================================== */
.band-dark { background: var(--ink); color: var(--paper); border-radius: var(--radius-xl); padding: var(--space-6) var(--space-5); position: relative; overflow: hidden; isolation: isolate; }
@media (min-width: 640px) { .band-dark { padding: var(--space-6) var(--space-7); } }
.band-dark::before { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: -160px; top: -220px; border-radius: 50%; background: radial-gradient(closest-side, var(--hero-glow-amber), transparent); }
.band-dark .band-grid { display: grid; gap: var(--space-4); align-items: center; }
@media (min-width: 860px) { .band-dark .band-grid { grid-template-columns: auto 1fr auto; gap: var(--space-6); } }
.band-dark img { width: 120px; height: auto; }
.band-dark p { margin: 0; color: var(--paper); }
.band-dark a:not(.btn) { color: var(--paper); }

/* ==========================================================================
   11. Contact form
   ========================================================================== */
.contact-grid { display: grid; gap: var(--space-6); align-items: start; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1.15fr; gap: var(--space-8); } }
.contact-info dl { margin: var(--space-5) 0 0; display: grid; gap: var(--space-4); }
.contact-info dt { font: 500 var(--text-xs) var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.contact-info dd { margin: 0; font-weight: 600; }
.contact-info dd a { display: inline-flex; align-items: center; min-height: var(--target); }
.form { padding: var(--space-6) var(--space-5); border-radius: var(--radius-xl); }
@media (min-width: 640px) { .form { padding: var(--space-7); } }
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-weight: 600; font-size: var(--text-s); margin-bottom: var(--space-2); }
.field input, .field textarea, .field select {
  width: 100%; min-height: var(--target); padding: var(--space-3) var(--space-4);
  font: 400 var(--text-m) var(--font-body); color: var(--ink);
  background: rgb(var(--white-rgb) / .9); border: 1px solid var(--ink-soft); border-radius: var(--radius-s);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: var(--focus); outline-offset: 1px; border-color: var(--ink); }
.field .hint { font-size: var(--text-xs); color: var(--ink-soft); margin: var(--space-1) 0 0; }
.form-note { margin: var(--space-4) 0 0; font-size: var(--text-s); color: var(--ink-soft); }
.form-note a { color: var(--ink); }
.form .btn { width: 100%; }
@media (min-width: 640px) { .form .btn { width: auto; } }
.form-status { margin: var(--space-3) 0 0; font-size: var(--text-s); color: var(--ok-text); font-weight: 600; }
.form-status:empty { display: none; }

/* ==========================================================================
   12. Legal pages
   ========================================================================== */
.legal-card { padding: var(--space-5); border-radius: var(--radius-l); margin-bottom: var(--space-7); max-width: var(--max-text); }
.legal-card dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-5); margin: 0; }
.legal-card dt { font: 500 var(--text-xs)/2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.legal-card dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 479px) { .legal-card dl { grid-template-columns: 1fr; } .legal-card dd { margin-bottom: var(--space-2); } }
.updated { margin-top: var(--space-7); font-size: var(--text-s); color: var(--ink-soft); }

/* ==========================================================================
   13. Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: var(--paper); margin-top: var(--space-8); padding: var(--space-8) 0 var(--space-6); }
.footer-grid { display: grid; gap: var(--space-6); }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer img { width: 132px; height: auto; margin-bottom: var(--space-4); }
.site-footer p { color: var(--paper); font-size: var(--text-s); max-width: 36ch; }
.site-footer h2 { font: 500 var(--text-xs) var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); margin-bottom: var(--space-3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: var(--target); color: var(--paper); text-decoration: none; font-size: var(--text-s); }
.site-footer li a:hover { text-decoration: underline; text-decoration-color: var(--coral); }
.footer-base { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--glass-dark-border); display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); justify-content: space-between; font-size: var(--text-s); color: var(--paper); }
.footer-base p { margin: 0; }

/* ==========================================================================
   14. Styleguide helpers
   ========================================================================== */
.swatches { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); list-style: none; padding: 0; }
.swatches li { border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--line); background: var(--white); font-size: var(--text-xs); }
.swatches span { display: block; height: 64px; }
.swatches code { display: block; padding: var(--space-2) var(--space-3); }
.icon-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); list-style: none; padding: 0; }
.icon-grid li { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-4) var(--space-2); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-s); font-size: var(--text-xs); }
.icon-grid svg { width: 28px; height: 28px; }

/* ==========================================================================
   15. Fallbacks and user preferences
   ========================================================================== */
/* No backdrop-filter: solid translucent panels with the same (or better) contrast */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .header-bar, .btn--glass, .pill { background: var(--glass-fallback); }
  .glass-dark, .btn--ghost-dark, .pill--dark { background: var(--glass-dark-fallback); }
}
html.no-glass .glass, html.no-glass .header-bar, html.no-glass .btn--glass, html.no-glass .pill {
  -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-fallback);
}
html.no-glass .glass-dark, html.no-glass .btn--ghost-dark, html.no-glass .pill--dark {
  -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-dark-fallback);
}

@media (prefers-reduced-transparency: reduce) {
  .blobs { display: none; }
  .glass, .header-bar, .btn--glass, .pill { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--white); }
  .glass-dark, .btn--ghost-dark, .pill--dark { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--ink); }
  .shine::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .btn:hover, .card--lift:hover { transform: none; }
  .terminal-body .cursor { animation: none; }
}

@media (forced-colors: active) {
  .blobs, .hero-art, .shine::after { display: none; }
  .glass, .glass-dark, .header-bar, .pill, .btn, .plain, .checks li, .terminal, .band-dark, .hero-panel {
    border: 1px solid CanvasText; background: Canvas; color: CanvasText; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .btn--primary { border: 2px solid ButtonText; color: ButtonText; background: ButtonFace; }
  .hero-card h1, .hero-lead, .hero-note, .band-dark p, .site-footer, .site-footer a { color: CanvasText; }
  .kicker::before, .pill .dot { background: CanvasText; }
  .facts { margin-top: var(--space-4); }
  :focus-visible { outline: 3px solid Highlight; }
}

@media print {
  .blobs, .site-header, .hero-art, .menu-toggle, .form, .band-dark { display: none; }
  .hero-panel, .site-footer { background: none; color: var(--ink); }
  .glass, .glass-dark { background: none; box-shadow: none; border: 1px solid var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
