/* ============================================================
   GainWix — site stylesheet
   Version 1.0
   Pairs with the GainWix Content Theme document.
   ============================================================ */

/* ---------- Tokens ---------- */

:root {
  /* Brand */
  --aurora:               #0ACD95;
  --spectrum:             #6940F2;
  --aurora-dark:          #085F45;
  --spectrum-dark:        #3D1FB0;
  --spectrum-light:       #A78BFF;
  --brand-gradient:       linear-gradient(90deg, #0ACD95 0%, #6940F2 100%);
  --brand-gradient-diag:  linear-gradient(135deg, #0ACD95 0%, #6940F2 100%);
  --brand-gradient-on-dark: linear-gradient(90deg, #0ACD95 0%, #A78BFF 100%);

  /* Neutrals */
  --ink:        #13111C;
  --canvas:     #FAFAFC;
  --surface:    #FFFFFF;
  --mid:        #5B5972;
  --hairline:   #E8E6F0;
  --muted:      #8B8A99;

  /* Pillar tints */
  --tint-workmates:      #EDFBF6;
  --tint-infrastructure: #F3F0FB;
  --tint-experience:     #F5F3F2;

  /* Semantic */
  --color-text:        var(--ink);
  --color-text-mid:    var(--mid);
  --color-text-muted:  var(--muted);
  --color-bg:          var(--canvas);
  --color-bg-raised:   var(--surface);
  --color-border:      var(--hairline);
  --color-link:        var(--spectrum);
  --color-link-hover:  var(--spectrum-dark);

  /* States */
  --color-success: #0F8A5F;
  --color-warning: #C77A0A;
  --color-danger:  #B33A3A;

  /* Type families */
  --font-display: 'Plus Jakarta Sans Variable', 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Inter Variable', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Type scale */
  --text-hero-xl:        4rem;     /* 64px */
  --text-hero-l:         3rem;     /* 48px */
  --text-display-l:      2.5rem;   /* 40px */
  --text-display-m:      2rem;     /* 32px */
  --text-heading-l:      1.5rem;   /* 24px */
  --text-heading-m:      1.25rem;  /* 20px */
  --text-heading-s:      1rem;     /* 16px */
  --text-lede:           1.25rem;  /* 20px */
  --text-body:           1rem;     /* 16px */
  --text-body-small:     0.875rem; /* 14px */
  --text-caption:        0.8125rem;/* 13px */
  --text-mono-eyebrow:   0.75rem;  /* 12px */
  --text-mono-code:      0.875rem; /* 14px */

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.5rem;
  --space-6:   2rem;
  --space-7:   3rem;
  --space-8:   4rem;
  --space-9:   6rem;
  --space-10:  8rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Container */
  --container-max: 1280px;
  --container-pad-d: var(--space-8);
  --container-pad-m: var(--space-5);

  /* Article measure */
  --measure: 680px;

  /* Transitions */
  --t-base: 150ms ease-out;
}

/* ---------- Dark mode (disabled) ----------
   The original wireframe auto-flipped to dark when the OS preferred it.
   The brand is light-first; we're keeping the Canvas + Ink palette as the
   single source of truth. If you want dark mode back, re-enable this block.

@media (prefers-color-scheme: dark) {
  :root {
    --color-text:       #F2F0F7;
    --color-text-mid:   #B5B2C5;
    --color-text-muted: #7B7989;
    --color-bg:         #0F0D17;
    --color-bg-raised:  #1C1929;
    --color-border:     #2A2737;
    --color-link:       var(--spectrum-light);
    --color-link-hover: #C8B5FF;

    --tint-workmates:      #122A22;
    --tint-infrastructure: #1B1730;
    --tint-experience:     #221F1D;
  }
}
*/

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--color-link); text-decoration: none; transition: color var(--t-base); }
a:hover { color: var(--color-link-hover); }
:focus-visible { outline: 2px solid var(--spectrum); outline-offset: 3px; border-radius: 2px; }

/* Skip link */
.skip-link {
  position: absolute; top: -100px; left: var(--space-4);
  background: var(--ink); color: var(--canvas);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  z-index: 1000;
}
.skip-link:focus { top: var(--space-4); color: var(--canvas); }

/* ---------- Typography ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-mid);
  margin: 0 0 var(--space-5);
}

h1, h2, h3, h4, .display-xl, .display-l, .display-m, .heading-l, .heading-m {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-text);
  margin: 0 0 var(--space-5);
  text-wrap: balance;
}

.display-xl { font-size: var(--text-hero-xl); line-height: 1.05; letter-spacing: -0.03em; }
.display-l  { font-size: var(--text-hero-l);  line-height: 1.1;  letter-spacing: -0.025em; }
.display-m  { font-size: var(--text-display-m); line-height: 1.2; letter-spacing: -0.02em; }
.heading-l  { font-size: var(--text-heading-l); line-height: 1.3; letter-spacing: -0.015em; }
.heading-m  { font-size: var(--text-heading-m); line-height: 1.35; letter-spacing: -0.01em; }

h1 { font-size: var(--text-hero-l); line-height: 1.1; letter-spacing: -0.025em; }
h2 { font-size: var(--text-display-m); line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: var(--text-heading-l); line-height: 1.3; letter-spacing: -0.015em; }
h4 { font-size: var(--text-heading-m); line-height: 1.35; letter-spacing: -0.01em; }

.lede {
  font-size: var(--text-lede);
  line-height: 1.55;
  color: var(--color-text-mid);
  margin: 0 0 var(--space-6);
  max-width: 56ch;
  text-wrap: pretty;
}

p { margin: 0 0 var(--space-4); }
p + p { margin-top: 0; }

small, .caption { font-size: var(--text-caption); color: var(--color-text-muted); }

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: var(--text-mono-code);
}
code { background: var(--color-border); padding: 0.1em 0.4em; border-radius: 4px; }

/* ---------- Layout ---------- */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad-d);
  padding-right: var(--container-pad-d);
  width: 100%;
}

.section {
  padding-top: var(--space-9);
  padding-bottom: var(--space-9);
}
.section + .section { border-top: 0.5px solid var(--color-border); }
.section.no-rule + .section { border-top: 0; }

.section-tinted-workmates       { background: var(--tint-workmates); }
.section-tinted-infrastructure  { background: var(--tint-infrastructure); }
.section-tinted-experience      { background: var(--tint-experience); }

.section-title {
  font-size: var(--text-display-m);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-6);
  max-width: 36ch;
  text-wrap: balance;
}

.divider {
  height: 0.5px;
  background: var(--color-border);
  border: 0;
  margin: var(--space-9) 0;
}

.gradient-bar {
  height: 3px;
  width: 32px;
  background: var(--brand-gradient);
  border-radius: 2px;
  margin-bottom: var(--space-5);
}

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-body-small);
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  transition: background var(--t-base), color var(--t-base), border-color var(--t-base);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--spectrum);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--spectrum-dark);
  color: #FFFFFF;
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}
.btn-secondary:hover {
  background: var(--color-text);
  color: var(--color-bg);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  padding-left: 0; padding-right: 0;
}
.btn-ghost:hover { color: var(--spectrum); }
.btn-arrow::after { content: ' →'; transition: transform var(--t-base); }
.btn:hover .btn-arrow::after,
.btn-arrow:hover::after { transform: translateX(2px); }

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 0.5px solid transparent;
  transition: border-color var(--t-base), background var(--t-base);
}
.site-header.scrolled { border-bottom-color: var(--color-border); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--color-text);
  font-size: var(--text-body-small);
  font-weight: 500;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--spectrum);
}
.nav-cta { margin-left: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  color: var(--color-text);
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--color-bg-raised);
    border-bottom: 0.5px solid var(--color-border);
    padding: var(--space-5) var(--container-pad-m);
    gap: var(--space-4);
  }
}

/* Tighten link gap a touch between 860 and 1100px so all six fit cleanly */
@media (max-width: 1100px) and (min-width: 861px) {
  .nav { gap: var(--space-4); }
  .nav-links { gap: var(--space-4); }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: var(--space-9);
  padding-bottom: var(--space-9);
}
.hero h1, .hero .display-xl {
  font-size: var(--text-hero-xl);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin-bottom: var(--space-6);
}
.hero .lede { max-width: 60ch; font-size: var(--text-lede); color: var(--color-text-mid); }
.hero-ctas { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-7); }

/* ---------- Pillar cards ---------- */

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.pillar-card {
  background: var(--color-bg-raised);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-base), transform var(--t-base);
}
.pillar-card:hover {
  border-color: var(--spectrum);
  transform: translateY(-2px);
}
.pillar-card .gradient-bar { margin-bottom: var(--space-5); }
.pillar-card .pillar-bar {
  height: 3px;
  width: 32px;
  border-radius: 999px;
  margin-bottom: var(--space-5);
}
.pillar-card.bar-aurora   .pillar-bar { background: var(--aurora); }
.pillar-card.bar-brand    .pillar-bar { background: var(--brand-gradient); }
.pillar-card.bar-spectrum .pillar-bar { background: var(--spectrum-light); }
.pillar-card-num {
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.pillar-card-title {
  font-family: var(--font-display);
  font-size: var(--text-heading-l);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-3);
  color: var(--color-text);
}
.pillar-card-body {
  font-size: var(--text-body-small);
  line-height: 1.6;
  color: var(--color-text-mid);
  margin: 0 0 var(--space-5);
  flex: 1;
}
.pillar-card-link {
  font-size: var(--text-body-small);
  color: var(--spectrum);
  font-weight: 500;
}
.pillar-card-link::after { content: ' →'; }

/* ---------- Project / generic cards ---------- */

.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }

.card {
  background: var(--color-bg-raised);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.card-image {
  aspect-ratio: 16/9;
  background: var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
}
.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-mid);
  margin-bottom: var(--space-3);
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--text-heading-m);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
  color: var(--color-text);
}
.card-excerpt {
  font-size: var(--text-body-small);
  line-height: 1.6;
  color: var(--color-text-mid);
  margin: 0 0 var(--space-4);
}
.card-meta {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.card-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--color-border);
  color: var(--color-text-mid);
}
.card-status.live { background: var(--tint-workmates); color: var(--aurora-dark); }

/* ---------- Use case / feature lists ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6) var(--space-7);
}
.feature {
  padding-top: var(--space-4);
  border-top: 0.5px solid var(--color-border);
}
.feature-num {
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.feature-title {
  font-family: var(--font-display);
  font-size: var(--text-heading-m);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
}
.feature-body {
  font-size: var(--text-body-small);
  line-height: 1.6;
  color: var(--color-text-mid);
  margin: 0;
}

/* ---------- How-the-studio-works strip ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-6);
}
.step {
  padding-top: var(--space-4);
  border-top: 2px solid var(--ink);
}
.step:nth-child(2) { border-top-color: var(--spectrum); }
.step:nth-child(3) { border-top-color: var(--aurora); }
.step:nth-child(4) { border-top-color: var(--spectrum-light); }

/* 2×2 variant for four steps */
.steps.steps-2x2 {
  grid-template-columns: repeat(2, 1fr);
  row-gap: var(--space-6);
}
.step-num {
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.step-text {
  font-family: var(--font-display);
  font-size: var(--text-heading-m);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--color-text);
  margin: 0;
}

/* ---------- Two-column thesis block ---------- */

.thesis-block {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-7);
  align-items: start;
}
.thesis-block .thesis-title {
  font-family: var(--font-display);
  font-size: var(--text-display-m);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.thesis-block .thesis-body {
  font-size: var(--text-lede);
  line-height: 1.6;
  color: var(--color-text-mid);
}
.thesis-block .thesis-body p { margin-bottom: var(--space-4); }
.thesis-block .thesis-body p:last-child { margin-bottom: 0; }

/* ---------- Article (Insights) ---------- */

.article-header {
  padding-top: var(--space-9);
  padding-bottom: var(--space-7);
  border-bottom: 0.5px solid var(--color-border);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-body-small);
  margin-top: var(--space-5);
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.article-body {
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: var(--space-7);
  padding-bottom: var(--space-9);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.75;
}
.article-body > p:first-child {
  font-size: var(--text-lede);
  line-height: 1.6;
  color: var(--color-text-mid);
  margin-bottom: var(--space-6);
}
.article-body h2 {
  font-size: var(--text-display-m);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}
.article-body h3 {
  font-size: var(--text-heading-l);
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
}
.article-body blockquote {
  font-family: var(--font-display);
  font-size: var(--text-heading-l);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
  border-left: 3px solid var(--spectrum);
  padding-left: var(--space-5);
  margin: var(--space-7) 0;
  color: var(--color-text);
}
.article-body pre {
  background: var(--ink);
  color: #F2F0F7;
  padding: var(--space-5);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-5) 0;
  line-height: 1.6;
}
.article-body pre code { background: transparent; padding: 0; color: inherit; }
.article-body img, .article-body figure img {
  border-radius: var(--radius-md);
  margin: var(--space-6) 0;
}
.article-body figcaption {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-2);
}

/* ---------- Forms ---------- */

.form-grid { display: grid; gap: var(--space-5); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label {
  font-size: var(--text-body-small);
  color: var(--color-text-mid);
  font-weight: 500;
}
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
  border-radius: 0;
  transition: border-color var(--t-base);
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
  border-bottom-width: 2px;
}
.field-help { font-size: var(--text-caption); color: var(--color-text-muted); }
.captcha-placeholder {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

/* ---------- Captcha (self-contained human check) ---------- */
.captcha {
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-raised);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.captcha-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.captcha-box {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.captcha-box:hover { border-color: var(--spectrum-light); }
.captcha-box:focus-visible { outline: 2px solid var(--spectrum); outline-offset: 2px; }
.captcha-box:checked {
  background: var(--aurora);
  border-color: var(--aurora);
}
.captcha-box:checked::after {
  content: "";
  position: absolute;
  left: 8px; top: 3px;
  width: 6px; height: 12px;
  border: solid #FFFFFF;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.captcha-label {
  font-size: var(--text-body-small);
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}
.captcha-brand {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: right;
  line-height: 1.3;
}
.captcha-challenge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 0.5px solid var(--color-border);
  flex-wrap: wrap;
}
.captcha-challenge[hidden] { display: none; }
.captcha-q {
  font-size: var(--text-body-small);
  color: var(--color-text-mid);
}
.captcha-q strong { color: var(--color-text); font-weight: 500; }
.captcha-answer {
  font-family: var(--font-body);
  font-size: var(--text-body);
  width: 96px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
}
.captcha-answer:focus { outline: none; border-color: var(--spectrum); }
.captcha-status {
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.captcha-status.is-ok { color: var(--color-success); }
.captcha-status.is-err { color: var(--color-danger); }
.captcha.is-verified { border-color: var(--aurora); }
.captcha.is-verified .captcha-box { pointer-events: none; }
.form-error {
  font-size: var(--text-body-small);
  color: var(--color-danger);
  margin: 0;
}
.form-error[hidden] { display: none; }

/* ---------- Policy table ---------- */
.policy-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: var(--text-body-small);
}
.policy-table th,
.policy-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 0.5px solid var(--color-border);
  vertical-align: top;
}
.policy-table thead th {
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 400;
}
.policy-table tbody td { color: var(--color-text-mid); }
.policy-table tbody td strong { color: var(--color-text); font-weight: 500; }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  left: var(--space-5);
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 900;
  max-width: 760px;
  margin-inline: auto;
  background: var(--ink);
  color: #F2F0F7;
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: 0 18px 50px -12px rgba(19, 17, 28, 0.55);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-banner-copy { flex: 1 1 auto; }
.cookie-banner-copy p {
  margin: 0;
  font-size: var(--text-body-small);
  line-height: 1.55;
  color: #C9C7D6;
}
.cookie-banner-copy strong { color: #F2F0F7; font-weight: 500; }
.cookie-banner-copy a { color: var(--spectrum-light); text-decoration: underline; }
.cookie-banner-actions {
  flex: 0 0 auto;
  display: flex;
  gap: var(--space-3);
}
.cookie-banner .btn-ghost-dark {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #F2F0F7;
}
.cookie-banner .btn-ghost-dark:hover { border-color: rgba(255, 255, 255, 0.5); }
@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: var(--space-4); }
  .cookie-banner-actions { justify-content: flex-end; }
}
.form-success {
  background: var(--tint-workmates);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  font-size: var(--text-body);
  color: var(--aurora-dark);
}

/* ---------- Two-column layouts ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-8);
  align-items: start;
}
.two-col-side {
  position: sticky;
  top: 100px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #B5B2C5;
  padding: var(--space-9) 0 var(--space-6);
  margin-top: var(--space-10);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-6);
  padding-bottom: var(--space-7);
  border-bottom: 0.5px solid #2A2737;
}
.footer-brand .nav-logo {
  background: var(--brand-gradient-on-dark);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-size: 1.5rem;
}
.footer-tagline {
  font-family: var(--font-display);
  font-size: var(--text-hero-l);          /* 48px — mirrors the hero */
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #F2F0F7;
  margin-top: var(--space-5);
  margin-bottom: 0;
  max-width: 16ch;                        /* matches the hero h1 width */
  text-wrap: balance;
}
.footer-tagline .gradient-text {
  background: var(--brand-gradient-on-dark);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7B7989;
  margin: 0 0 var(--space-4);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { color: #F2F0F7; font-size: var(--text-body-small); }
.footer-col a:hover { color: var(--spectrum-light); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-5);
  font-size: var(--text-caption);
  color: #7B7989;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.footer-socials { display: flex; gap: var(--space-4); }
.footer-socials a { color: #7B7989; }
.footer-socials a:hover { color: #F2F0F7; }

/* ---------- Utilities ---------- */

.text-mid { color: var(--color-text-mid); }
.text-muted { color: var(--color-text-muted); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.mb-0 { margin-bottom: 0 !important; }
.center { text-align: center; }
.max-prose { max-width: 60ch; }

/* Inlined SVG illustrations inside .card-image */
.card-image { overflow: hidden; }
.card-image > svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}
.card-image-square { aspect-ratio: 1 / 1; }

/* Team photo hover swap */
.team-photo { position: relative; }
.team-photo .photo-default,
.team-photo .photo-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.35s ease;
}
.team-photo .photo-hover { opacity: 0; }
.team-photo:hover .photo-default { opacity: 0; }
.team-photo:hover .photo-hover  { opacity: 1; }

/* Wordmark SVG inside .nav-logo (replaces the CSS-gradient text logo) */
.nav-logo img,
.nav-logo svg {
  height: 24px;
  width: auto;
  display: block;
}
.footer-brand .nav-logo img,
.footer-brand .nav-logo svg {
  height: 30px;
}
/* When .nav-logo contains an image, neutralise the text-gradient styles */
.nav-logo:has(img),
.nav-logo:has(svg) {
  background: none;
  -webkit-text-fill-color: initial;
  color: inherit;
  line-height: 0;
}

/* Image placeholder block */
.img-placeholder {
  background: var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  min-height: 240px;
}
.img-placeholder strong { color: var(--color-text-mid); font-weight: 500; }
.img-placeholder .placeholder-prompt {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  max-width: 56ch;
  line-height: 1.6;
}
.img-placeholder-hero { aspect-ratio: 16/9; min-height: 320px; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  :root {
    --text-hero-xl: 3rem;
    --text-hero-l: 2.5rem;
    --text-display-l: 2.25rem;
    --text-display-m: 1.75rem;
  }
  .pillar-grid, .card-grid-3, .feature-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .thesis-block { grid-template-columns: 1fr; gap: var(--space-5); }
  .two-col { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root {
    --text-hero-xl: 2.5rem;
    --text-hero-l: 2rem;
    --container-pad-d: var(--space-5);
  }
  .container { padding-left: var(--container-pad-m); padding-right: var(--container-pad-m); }
  .section { padding-top: var(--space-8); padding-bottom: var(--space-8); }
  .pillar-grid, .card-grid-3, .card-grid-2, .feature-grid, .steps { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero h1 { max-width: 100%; }
}

/* ---------- Motion safety ---------- */

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