/* ==========================================================================
   theFlourish — Design System
   Editorial / technical B2B system: warm paper, hairline rules, sharp edges,
   large low-contrast-weight headlines, monospace supporting text.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --paper: #faf9f5;
  --paper-2: #f2efe7;
  --paper-3: #eae6db;
  --panel: #100f0d;
  --panel-2: #1a1917;
  --panel-ink: #f5f2ea;
  --panel-ink-2: #a5a199;

  /* Ink */
  --ink: #0c0b0a;
  --ink-2: #56534c;
  --ink-3: #8b877e;

  /* Lines */
  --rule: #e0dccf;
  --rule-strong: #c9c4b4;

  /* Feedback */
  --danger: #a33a2a;

  /* Type */
  --sans: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Metrics */
  --container: 1280px;
  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(64px, 8.5vw, 112px);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --fast: 160ms var(--ease);
  --med: 280ms var(--ease);
}

[data-theme="dark"] {
  --paper: #0c0b0a;
  --paper-2: #141311;
  --paper-3: #1c1a17;
  --panel: #000000;
  --panel-2: #121110;
  --panel-ink: #f5f2ea;
  --panel-ink-2: #93908a;

  --ink: #f7f4ec;
  --ink-2: #a7a29a;
  --ink-3: #78746c;

  --rule: #26241f;
  --rule-strong: #3a3730;

  --danger: #e07a63;
}

/* --------------------------------------------------------------------------
   2. RESET / BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--med), color var(--med);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
  outline: none;
  border-radius: 0;
}

ul {
  list-style: none;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--paper);
}

::-webkit-scrollbar-thumb {
  background: var(--rule-strong);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-3);
}

/* --------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--tight {
  padding-block: clamp(40px, 5vw, 64px);
}

.section--ruled {
  border-top: 1px solid var(--rule);
}

.section--alt {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
}

.stack-lg > * + * {
  margin-top: clamp(28px, 4vw, 48px);
}

/* --------------------------------------------------------------------------
   4. TYPOGRAPHY
   -------------------------------------------------------------------------- */
.display {
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* Gradient display headline — bright ink fading to a dimmer tone across the
   block, with a single light sweep on load. Degrades to solid ink. */
.display--fade {
  --fade-from: var(--ink);
  --fade-to: #949086;
  --fade-sheen: rgba(0, 0, 0, 0.85);
}

[data-theme="dark"] .display--fade {
  --fade-to: #6f6b64;
  --fade-sheen: rgba(255, 255, 255, 0.92);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .display--fade {
    background-image:
      linear-gradient(100deg,
        transparent 0%,
        var(--fade-sheen) 42%,
        var(--fade-sheen) 58%,
        transparent 100%),
      linear-gradient(112deg,
        var(--fade-from) 0%,
        var(--fade-from) 30%,
        var(--fade-to) 86%,
        var(--fade-to) 100%);
    background-size: 50% 100%, 100% 100%;
    background-position: -80% 0, 0 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: display-sheen 1700ms var(--ease) 280ms 1 both;
  }

  /* Selection needs a real colour back, otherwise it highlights nothing. */
  .display--fade::selection {
    -webkit-text-fill-color: var(--ink);
    color: var(--ink);
  }
}

@keyframes display-sheen {
  from {
    background-position: -80% 0, 0 0;
  }
  to {
    background-position: 180% 0, 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .display--fade {
    animation: none;
    background-position: 180% 0, 0 0;
  }
}

.h2 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.h3 {
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.h4 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.lede,
.body {
  font-family: var(--mono);
  font-size: 0.9375rem;
  line-height: 1.78;
  color: var(--ink-2);
  font-weight: 400;
  max-width: var(--measure);
}

.lede {
  font-size: 1rem;
  color: var(--ink-2);
}

.body strong,
.lede strong {
  color: var(--ink);
  font-weight: 500;
}

.body em,
.lede em {
  font-style: normal;
  color: var(--ink);
  box-shadow: inset 0 -0.45em 0 var(--paper-3);
}

.mono-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  background: var(--paper-3);
  padding: 5px 10px;
}

.chip--ink {
  background: var(--ink);
  color: var(--paper);
}

.chip-dot {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.7;
}

.eyebrow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

/* --------------------------------------------------------------------------
   5. BUTTONS & LINKS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background-color var(--fast), color var(--fast), border-color var(--fast), transform var(--fast);
  text-align: center;
}

.btn:hover {
  background: transparent;
  color: var(--ink);
}

.btn:active {
  transform: translateY(1px);
}

.btn--lg {
  padding: 16px 28px;
  font-size: 0.9375rem;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn--onpanel {
  background: var(--panel-ink);
  color: var(--panel);
  border-color: var(--panel-ink);
}

.btn--onpanel:hover {
  background: transparent;
  color: var(--panel-ink);
}

.btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn[disabled]:hover {
  background: var(--ink);
  color: var(--paper);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 3px;
  transition: gap var(--fast), border-color var(--fast);
}

.arrow-link:hover {
  gap: 14px;
  border-color: var(--ink);
}

/* --------------------------------------------------------------------------
   6. HEADER / NAVIGATION
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--paper-3);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-2);
  text-align: center;
  padding: 9px var(--gutter);
}

.topbar b {
  color: var(--ink);
  font-weight: 500;
}

/* Site header lives in assets/nav.css, shared by every page. */

/* --------------------------------------------------------------------------
   7. HERO
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(52px, 8vw, 104px) clamp(40px, 5vw, 64px);
  text-align: center;
}

.hero-inner {
  max-width: 940px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero .display {
  margin-top: 22px;
}

.hero .lede {
  margin-top: 26px;
  text-align: center;
  max-width: 66ch;
}

.hero-cta {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-note {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-3);
}

.hero-meta {
  margin-top: 40px;
  width: 100%;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-3);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   8. SYSTEM DIAGRAM (product visualisation)
   -------------------------------------------------------------------------- */
.system {
  background: var(--panel);
  color: var(--panel-ink);
  border: 1px solid var(--panel);
  padding: clamp(20px, 3vw, 32px);
}

.system-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.system-head .t {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--panel-ink);
}

.system-head .s {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--panel-ink-2);
}

.system-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: clamp(12px, 2vw, 28px);
  align-items: start;
}

.sys-col > .sys-col-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--panel-ink-2);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sys-node {
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 11px 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--panel-ink);
  background: var(--panel-2);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  transition: border-color var(--fast), background-color var(--fast);
}

.sys-node + .sys-node {
  margin-top: 8px;
}

.sys-node .k {
  color: var(--panel-ink-2);
  flex-shrink: 0;
}

.sys-node:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: #201e1b;
}

.sys-col--engine .sys-node {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
}

.sys-engine-frame {
  border: 1px dashed rgba(255, 255, 255, 0.3);
  padding: 12px;
}

button.sys-node {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.sys-flow-note {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--panel-ink-2);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.sys-flow-note b {
  color: var(--panel-ink);
  font-weight: 400;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--panel-ink);
  border-radius: 50%;
  animation: sysPulse 2.4s ease-in-out infinite;
}

@keyframes sysPulse {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* --------------------------------------------------------------------------
   9. LOGO MARQUEE
   -------------------------------------------------------------------------- */
.logo-strip {
  padding: clamp(22px, 3vw, 34px) 0;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.logo-strip-title {
  text-align: center;
  margin-bottom: 18px;
}

.marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 40s linear infinite;
}

/* Pause on hover so a logo can actually be looked at. */
.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  flex: 0 0 clamp(160px, 17vw, 230px);
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
}

.marquee img {
  max-height: 52px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) contrast(1.2) brightness(1.05);
  opacity: 0.8;
  transition: opacity var(--med), filter var(--med), transform var(--med);
}

[data-theme="dark"] .marquee img {
  filter: grayscale(1) invert(1) brightness(1.9) contrast(1.25);
  opacity: 0.85;
}

/* Hover restores the logo to its real colours. */
.marquee-item:hover img,
[data-theme="dark"] .marquee-item:hover img {
  opacity: 1;
  filter: grayscale(0) contrast(1) brightness(1);
}

.marquee img.logo-windward,
.marquee img.logo-dreamfirm {
  transform: scale(1.45);
}

.marquee-item:hover img.logo-windward,
.marquee-item:hover img.logo-dreamfirm {
  transform: scale(1.5);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   10. EDITORIAL MODULES / CARDS
   -------------------------------------------------------------------------- */
.section-head {
  max-width: 860px;
}

.section-head .lede {
  margin-top: 20px;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow-row {
  justify-content: center;
}

/* .lede and .body are capped at --measure, so they need centring themselves —
   otherwise the block sits left and only its text looks centred. */
.section-head--center .lede,
.section-head--center .body {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   PILLAR NAV — sits beside the framework heading. Each row expands its
   description on hover/focus.
   -------------------------------------------------------------------------- */
.pillars-head {
  max-width: none;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.os-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.os-nav-title {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
  margin-bottom: 6px;
}

.os-item {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  color: var(--ink);
  transition: border-color var(--fast), background-color var(--fast);
}

.os-item:hover,
.os-item:focus-visible {
  border-color: var(--ink);
  background: var(--paper-2);
}

.os-item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
}

.os-num {
  min-width: 26px;
  padding-right: 14px;
  border-right: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.6875rem;
  transition: color var(--fast), border-color var(--fast);
}

.os-item:hover .os-num,
.os-item:focus-visible .os-num {
  color: var(--ink);
  border-right-color: var(--ink);
}

.os-arrow {
  margin-left: auto;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.35;
  transition: opacity var(--fast), transform var(--fast);
}

.os-item:hover .os-arrow,
.os-item:focus-visible .os-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* Collapsed until hover/focus. max-height animates; the value is an upper
   bound, not the real height. */
.os-desc {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-2);
  transition: max-height var(--med), opacity var(--fast), margin-top var(--med);
}

.os-item:hover .os-desc,
.os-item:focus-visible .os-desc {
  max-height: 8em;
  opacity: 1;
  margin-top: 10px;
}

@media (max-width: 860px) {
  .pillars-head {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .os-desc {
    transition: none;
  }
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
}

.module {
  border: 1px solid var(--rule);
  padding: clamp(22px, 2.6vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background-color var(--med);
}

.module:hover {
  background: var(--paper-2);
}

.module-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-3);
}

.module .body {
  font-size: 0.875rem;
}

.module-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid var(--rule);
  filter: grayscale(1);
}

/* Statement block */
.statement {
  background: var(--panel);
  color: var(--panel-ink);
  padding: clamp(32px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
}

.statement .h2 {
  color: var(--panel-ink);
}

.statement--center {
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  text-align: center;
}

.statement--center .stack-sm {
  max-width: 70ch;
}

/* Reusable gradient text — same fade as the hero, without the sheen sweep. */
.text-fade {
  --fade-from: var(--ink);
  --fade-to: #949086;
}

[data-theme="dark"] .text-fade {
  --fade-to: #6f6b64;
}

.statement .text-fade {
  --fade-from: var(--panel-ink);
  --fade-to: #6e6a63;
}

/* .statement .h2 sets colour at higher specificity, so restate it here. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .statement .text-fade {
    color: transparent;
  }
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .text-fade {
    background-image: linear-gradient(112deg,
      var(--fade-from) 0%,
      var(--fade-from) 26%,
      var(--fade-to) 92%,
      var(--fade-to) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }

  .text-fade::selection {
    -webkit-text-fill-color: var(--fade-from);
    color: var(--fade-from);
  }
}

.statement .body {
  color: var(--panel-ink-2);
}

.statement .body strong {
  color: var(--panel-ink);
}

/* Split module: text + terminal panel */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
}

.split + .split {
  border-top: 0;
}

.split-text {
  padding: clamp(26px, 3.4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.split-visual {
  background: var(--panel);
  color: var(--panel-ink);
  padding: clamp(22px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  border-left: 1px solid var(--rule);
}

.spec-list {
  border-top: 1px solid var(--rule);
}

.spec-list li {
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.spec-list li b {
  color: var(--ink);
  font-weight: 400;
}

/* Terminal card (inside black panels) */
.terminal {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--panel-2);
  padding: 16px;
}

.terminal-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--panel-ink-2);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.terminal-body {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.72;
  color: var(--panel-ink);
  border-left: 2px solid rgba(255, 255, 255, 0.35);
  padding-left: 14px;
}

.terminal-body strong {
  font-weight: 500;
}

/* Slack replica lives in assets/slack.css, shared by every page. */

/* Claude replica lives in assets/claude.css, shared by every page. */


/* Flow strip */
/* Kept to a single line: the type and spacing scale with the viewport, and
   the strip scrolls rather than wrapping when it runs out of room. */
.flow-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(4px, 0.5vw, 8px);
  font-family: var(--mono);
  font-size: clamp(0.5rem, 0.78vw, 0.75rem);
  color: var(--ink-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.flow-strip::-webkit-scrollbar {
  display: none;
}

.flow-strip i {
  font-style: normal;
  border: 1px solid var(--rule-strong);
  padding: clamp(5px, 0.55vw, 7px) clamp(6px, 0.75vw, 10px);
  background: var(--paper);
  white-space: nowrap;
  flex-shrink: 0;
}

.flow-strip u {
  flex-shrink: 0;
}

.flow-strip u {
  text-decoration: none;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   11. PROCESS
   -------------------------------------------------------------------------- */
.process-timeline-container {
  position: relative;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(18px, 2.6vw, 34px) 0;
}

/* Spine runs down the centre; steps alternate either side of it. */
.process-timeline-line-bg,
.process-timeline-line-active {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  margin-left: -1px;
}

.process-timeline-line-bg {
  bottom: 0;
  background: var(--rule);
}

.process-timeline-line-active {
  height: 0;
  background: var(--ink);
  transition: height 120ms linear;
  z-index: 1;
}

.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(48px, 8vw, 132px);
  align-items: start;
  padding: clamp(26px, 3.2vw, 44px) 0;
  opacity: 0.45;
  transition: opacity var(--med), transform var(--med);
}

.process-step.active {
  opacity: 1;
  transform: none;
}

.process-step--left {
  transform: translateX(-10px);
}

.process-step--right {
  transform: translateX(10px);
}

.process-step--left .process-body {
  grid-column: 1;
}

.process-step--left .process-aside {
  grid-column: 2;
  align-items: flex-start;
  text-align: left;
}

.process-step--right .process-aside {
  grid-column: 1;
  align-items: flex-end;
  text-align: right;
}

.process-step--right .process-body {
  grid-column: 2;
}

.process-step-dot {
  position: absolute;
  left: 50%;
  margin-left: -5px;
  top: clamp(30px, 3.4vw, 50px);
  width: 10px;
  height: 10px;
  background: var(--paper-2);
  border: 2px solid var(--rule-strong);
  z-index: 2;
  transition: background-color var(--med), border-color var(--med);
}

.process-step.active .process-step-dot {
  background: var(--ink);
  border-color: var(--ink);
}

.process-aside {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.process-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 4px 9px;
}

.process-step--right .process-step-badge {
  align-self: flex-end;
}

.process-when {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-3);
}

.process-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .process-step--left,
  .process-step--right {
    transform: none;
  }
}


/* --------------------------------------------------------------------------
   12. PROOF
   -------------------------------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.stat {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(20px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 168px;
  justify-content: space-between;
  transition: background-color var(--med);
}

.stat:hover {
  background: var(--paper-2);
}

.stat--fill {
  background: var(--panel);
  color: var(--panel-ink);
}

.stat--fill:hover {
  background: var(--panel-2);
}

.stat-num {
  font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.stat--fill .stat-label {
  color: var(--panel-ink-2);
}

/* Testimonials */
.quotes {
  position: relative;
  border: 1px solid var(--rule);
  padding: clamp(28px, 4vw, 56px);
  min-height: 300px;
  display: flex;
  align-items: center;
}

.testimonial-slide {
  display: none;
  max-width: 900px;
}

.testimonial-slide.active {
  display: block;
  animation: fadeUp 420ms var(--ease);
}

.testimonial-quote {
  font-size: clamp(1.15rem, 2.2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.testimonial-author {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.author-img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  filter: grayscale(1);
  border: 1px solid var(--rule);
}

.author-role {
  color: var(--ink-3);
}

.carousel-controls {
  position: absolute;
  right: clamp(20px, 3vw, 40px);
  bottom: clamp(20px, 3vw, 40px);
  display: flex;
  gap: 8px;
}

.carousel-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color var(--fast), color var(--fast), border-color var(--fast);
}

.carousel-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.carousel-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* --------------------------------------------------------------------------
   13. BLUEPRINT / FORM
   -------------------------------------------------------------------------- */
.offer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
}

.offer-text {
  padding: clamp(28px, 3.6vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.deliverables {
  border-top: 1px solid var(--rule);
}

.deliverables li {
  border-bottom: 1px solid var(--rule);
  padding: 13px 0;
  display: flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.deliverables li span {
  color: var(--ink-3);
}

.offer-form {
  background: var(--paper-2);
  border-left: 1px solid var(--rule);
  padding: clamp(24px, 3.2vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.field input,
.field textarea {
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  padding: 11px 12px;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--ink);
  width: 100%;
  transition: border-color var(--fast);
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-3);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--ink);
}

.error-msg {
  display: none;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--danger);
}

.field.error input,
.field.error textarea {
  border-color: var(--danger);
}

.field.error .error-msg {
  display: block;
}

.form-note {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(44px, 5vw, 72px) 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
}

.footer-brand .body {
  margin-top: 16px;
  font-size: 0.8125rem;
  max-width: 34ch;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
  margin-bottom: 14px;
}

.footer-col li + li {
  margin-top: 9px;
}

.footer-col a {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-2);
  transition: color var(--fast);
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-bottom {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   15. MODALS / TOAST
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 11, 10, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  z-index: 200;
  transition: opacity var(--med), visibility var(--med);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--fast), color var(--fast);
}

.modal-close:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.scheduler-title {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.scheduler-sub {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin-top: 6px;
  margin-bottom: 22px;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cal-nav {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-family: var(--mono);
  cursor: pointer;
  transition: background-color var(--fast), color var(--fast);
}

.cal-nav:hover {
  background: var(--ink);
  color: var(--paper);
}

#calendar-month-title {
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 20px;
}

.calendar-day-header {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-3);
  text-align: center;
  padding-bottom: 6px;
}

.calendar-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.8125rem;
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: background-color var(--fast), color var(--fast), border-color var(--fast);
}

.calendar-day:hover:not(.disabled) {
  border-color: var(--ink);
}

.calendar-day.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.calendar-day.disabled {
  color: var(--ink-3);
  opacity: 0.4;
  cursor: not-allowed;
  border-color: transparent;
}

.slots-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.time-slots {
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.time-slot {
  font-family: var(--mono);
  font-size: 0.8125rem;
  padding: 8px 12px;
  border: 1px solid var(--rule-strong);
  cursor: pointer;
  transition: background-color var(--fast), color var(--fast), border-color var(--fast);
}

.time-slot:hover {
  border-color: var(--ink);
}

.time-slot.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.slots-empty {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-3);
  width: 100%;
  text-align: center;
  padding: 12px 0;
}

/* Workflow cockpit modal */
.cockpit {
  background: var(--panel);
  border-color: rgba(255, 255, 255, 0.18);
  max-width: 900px;
  color: var(--panel-ink);
  padding: clamp(20px, 3vw, 30px);
}

.cockpit .modal-close {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--panel-ink);
}

.cockpit .modal-close:hover {
  border-color: var(--panel-ink);
}

.cockpit-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cockpit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workflow-tab-btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 7px 11px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--panel-ink-2);
  cursor: pointer;
  transition: background-color var(--fast), color var(--fast), border-color var(--fast);
}

.workflow-tab-btn:hover {
  color: var(--panel-ink);
  border-color: rgba(255, 255, 255, 0.5);
}

.workflow-tab-btn.active {
  background: var(--panel-ink);
  color: var(--panel);
  border-color: var(--panel-ink);
}

.workflow-canvas-container {
  position: relative;
  width: 100%;
  overflow-x: auto;
}

.workflow-canvas-inner {
  position: relative;
  width: 800px;
  height: 420px;
  margin-inline: auto;
}

.workflow-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.workflow-card {
  position: absolute;
  width: 170px;
  padding: 14px;
  background: rgba(16, 15, 13, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
  transition: opacity 400ms var(--ease), transform 400ms var(--ease), border-color var(--fast);
}

.workflow-card:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

.workflow-card-icon {
  font-size: 1rem;
}

.workflow-card-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--panel-ink);
}

.workflow-card-desc {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--panel-ink-2);
}

.flow-line-pulse {
  stroke-dasharray: 8 210;
  animation: flowDash 3.4s linear infinite;
}

@keyframes flowDash {
  to { stroke-dashoffset: -218; }
}

@keyframes wfFloat1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes wfFloat2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes wfFloat3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.8125rem;
  padding: 12px 18px;
  opacity: 0;
  visibility: hidden;
  z-index: 300;
  max-width: calc(100vw - 40px);
  text-align: center;
  transition: opacity var(--med), transform var(--med), visibility var(--med);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   16. SCROLL REVEAL
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   17. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .statement { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 860px) {
  .system-grid { grid-template-columns: 1fr; }
  .sys-col + .sys-col { margin-top: 20px; }

  .split { grid-template-columns: 1fr; }
  .split-visual { border-left: 0; border-top: 1px solid var(--rule); }

  .offer { grid-template-columns: 1fr; }
  .offer-form { border-left: 0; border-top: 1px solid var(--rule); }

  .process-timeline-container { border-bottom: 0; padding: 0; }
  .process-timeline-line-bg,
  .process-timeline-line-active { left: 0; margin-left: 0; }
  .process-step {
    grid-template-columns: 1fr;
    row-gap: 16px;
    transform: none;
    padding-left: clamp(24px, 3vw, 44px);
    border-bottom: 1px solid var(--rule);
  }
  .process-step--left .process-body,
  .process-step--right .process-body,
  .process-step--left .process-aside,
  .process-step--right .process-aside {
    grid-column: 1;
    align-items: flex-start;
    text-align: left;
  }
  .process-step--right .process-step-badge { align-self: flex-start; }
  .process-step-dot { left: -4px; margin-left: 0; }
  .spec-list li { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 640px) {
  .module-grid { grid-template-columns: 1fr; }
  .marquee-item { flex-basis: 150px; padding: 0 16px; }
  .slack-msg { grid-template-columns: 26px 1fr; gap: 9px; }
  .slack-avatar { width: 26px; height: 26px; font-size: 0.625rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { text-align: left; }
  .hero-inner { align-items: flex-start; }
  .hero .lede { text-align: left; }
  .hero-cta { align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-meta { justify-content: flex-start; }
  .quotes { min-height: 0; padding-bottom: 80px; }
  .carousel-controls { left: clamp(20px, 3vw, 40px); right: auto; }
}

@media (max-width: 380px) {
  .stat-grid { grid-template-columns: 1fr; }
  :root { --gutter: 16px; }
}

/* --------------------------------------------------------------------------
   18. MOTION PREFERENCES
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .marquee-track {
    animation: none;
  }
}
