/* ==========================================================================
   Zeena Consultancy — Design System
   Signature: the "flow" motif — scattered manual tasks resolving into a
   clean connected node-chain, echoing the n8n workflow canvas this business
   is built on. Used once, deliberately, in the hero — everywhere else stays quiet.
   ========================================================================== */

:root {
  /* Color */
  --ink:        #0B1220;   /* primary text, near-navy-black, never pure black */
  --ink-soft:   #4A5568;   /* secondary text */
  --paper:      #F6F7F5;   /* page background, cool off-white */
  --paper-raise:#FFFFFF;   /* card surfaces */
  --line:       #DBDFD8;   /* hairlines, dividers */
  --signal:     #2D6A6A;   /* primary accent — muted teal, the "wire" color */
  --signal-dark:#1F4B4B;
  --signal-tint:#E4EEEC;   /* pale teal for backgrounds/chips */
  --circuit:    #E8622C;   /* secondary accent — warm burnt orange, CTAs */
  --circuit-dark:#C24F20;
  --node:       #C9CFC6;   /* inactive node grey */

  /* Type */
  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'IBM Plex Mono', 'SFMono-Regular', monospace;

  /* Scale */
  --step-8:  0.5rem;
  --step-16: 1rem;
  --step-24: 1.5rem;
  --step-32: 2rem;
  --step-48: 3rem;
  --step-64: 4rem;
  --step-96: 6rem;

  --radius: 6px;
  --max-width: 1180px;
}

@media (prefers-reduced-motion: no-preference) {
  :root { --motion-ok: 1; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--signal-dark); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 var(--step-16);
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--step-16); color: var(--ink-soft); }
p.lede { font-size: 1.15rem; color: var(--ink-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--signal-dark);
  background: var(--signal-tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35em 0.9em;
  margin-bottom: var(--step-24);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--circuit);
  flex-shrink: 0;
}

.node-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--signal-dark);
  background: var(--signal-tint);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.15em 0.55em;
  letter-spacing: 0.02em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--step-24);
}

/* Keyboard focus, always visible */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--circuit);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 247, 245, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.wordmark .dot { color: var(--circuit); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--step-32);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--circuit);
  transition: right 0.2s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after {
  right: 0;
}
.nav-links a[aria-current="page"] { color: var(--ink); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-primary {
  background: var(--circuit);
  color: #fff;
}
.btn-primary:hover { background: var(--circuit-dark); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--signal); color: var(--signal-dark); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero {
  padding: var(--step-64) 0 var(--step-48);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--step-64);
  align-items: center;
}
.hero h1 { max-width: 14ch; }
.hero .lede { max-width: 42ch; }
.hero-actions {
  display: flex;
  gap: var(--step-16);
  margin-top: var(--step-32);
  flex-wrap: wrap;
}

.trust-strip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--step-16) 0;
  margin: var(--step-48) 0;
  display: flex;
  gap: var(--step-32);
  flex-wrap: wrap;
}
.trust-strip span::before { content: '\2014\a0'; color: var(--node); }
.trust-strip span:first-child::before { content: ''; }

/* ---------- Flow diagram (signature element) ---------- */
.flow-diagram { width: 100%; height: auto; }
.flow-chip {
  font-family: var(--font-mono);
  fill: var(--ink-soft);
}
.flow-chip-bg { fill: var(--paper-raise); stroke: var(--line); }
.flow-node { fill: var(--paper-raise); stroke: var(--signal); stroke-width: 2; }
.flow-node.done { fill: var(--circuit); stroke: var(--circuit); }
.flow-edge { stroke: var(--signal); stroke-width: 2; fill: none; }
.flow-edge-loose { stroke: var(--node); stroke-width: 1.5; fill: none; stroke-dasharray: 3 4; }
.flow-label { font-family: var(--font-mono); font-size: 11px; fill: var(--ink-soft); }
.flow-label.on-dark { fill: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .flow-draw {
    stroke-dasharray: 340;
    stroke-dashoffset: 340;
    animation: draw 1.1s ease forwards 0.15s;
  }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  .flow-pop {
    opacity: 0;
    transform: scale(0.6);
    transform-box: fill-box;
    transform-origin: center;
    animation: pop 0.4s ease forwards;
  }
  @keyframes pop { to { opacity: 1; transform: scale(1); } }
}

/* ---------- Sections ---------- */
section { padding: var(--step-64) 0; }
.section-head { max-width: 60ch; margin-bottom: var(--step-48); }
.section-tight { padding: var(--step-48) 0; }

.bg-raise { background: var(--paper-raise); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: var(--step-24);
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--paper-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--step-32);
  height: 100%;
}
.card h3 { margin-bottom: 0.5rem; }
.card .node-tag { display: inline-block; margin-bottom: var(--step-16); }

/* ---------- How it works (real sequence, so numbered flow is justified) ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--step-32);
  position: relative;
}
.process-step {
  position: relative;
  padding-top: var(--step-48);
}
.process-step .step-node {
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--signal);
  background: var(--paper-raise);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--signal-dark);
}
.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px; left: 46px; right: -20px;
  border-top: 2px dashed var(--node);
}

/* ---------- Stat / case study ---------- */
.stat {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  color: var(--signal-dark);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.stat-label { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--signal-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: var(--step-48);
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #D9E6E4; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
.cta-band .btn-ghost:hover { border-color: #fff; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: var(--step-24); max-width: 640px; }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.field input, .field textarea, .field select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raise);
  color: var(--ink);
}
.field input:focus, .field textarea:focus { border-color: var(--signal); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--step-24); }
.form-note { font-size: 0.85rem; color: var(--ink-soft); }
.form-status { font-family: var(--font-mono); font-size: 0.85rem; margin-top: var(--step-16); }
.form-status[data-state="ok"] { color: var(--signal-dark); }
.form-status[data-state="err"] { color: var(--circuit-dark); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--step-48) 0 var(--step-32);
  margin-top: var(--step-64);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr 0.9fr;
  gap: var(--step-32);
  margin-bottom: var(--step-32);
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: var(--step-16);
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer-grid a { color: var(--ink-soft); }
.footer-grid a:hover { color: var(--signal-dark); }
.footer-grid .cookie-prefs-link {
  text-decoration: none;
  color: var(--ink-soft);
  text-align: left;
}
.footer-grid .cookie-prefs-link:hover { color: var(--signal-dark); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--step-24);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
  gap: var(--step-16);
}
.footer-flow { display: flex; align-items: center; gap: 6px; }
.footer-flow .n { width: 5px; height: 5px; border-radius: 50%; background: var(--node); }
.footer-flow .n.on { background: var(--circuit); }

/* ---------- Page header (inner pages) ---------- */
.page-hero {
  padding: var(--step-48) 0 var(--step-32);
  border-bottom: 1px solid var(--line);
}
.page-hero .lede { max-width: 60ch; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.list-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.list-check li { padding-left: 1.6em; position: relative; color: var(--ink-soft); }
.list-check li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.45em;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 2px solid var(--signal);
}

/* ---------- Legal / long-form text pages ---------- */
.legal {
  max-width: 72ch;
}
.legal h2 { margin-top: var(--step-48); }
.legal h2:first-child { margin-top: 0; }
.legal h3 { margin-top: var(--step-32); font-size: 1.05rem; }
.legal ul, .legal ol { color: var(--ink-soft); padding-left: 1.3em; }
.legal li { margin-bottom: 0.4em; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--step-16) 0 var(--step-32);
  font-size: 0.92rem;
}
.legal th, .legal td {
  text-align: left;
  padding: 0.6em 0.8em;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.legal-updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.callout {
  background: var(--signal-tint);
  border: 1px solid var(--line);
  border-left: 3px solid var(--signal);
  border-radius: var(--radius);
  padding: var(--step-16) var(--step-24);
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin: var(--step-24) 0 var(--step-32);
}
.callout strong { color: var(--ink); }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  left: var(--step-16);
  right: var(--step-16);
  bottom: var(--step-16);
  z-index: 100;
  max-width: 640px;
  margin: 0 auto;
  background: var(--paper-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(11, 18, 32, 0.14);
  padding: var(--step-24);
  display: none;
}
.cookie-banner.visible { display: block; }
.cookie-banner p {
  font-size: 0.92rem;
  margin-bottom: var(--step-16);
}
.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.cookie-banner-actions .btn { padding: 0.55rem 1rem; font-size: 0.85rem; }
.cookie-prefs-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
}
.cookie-prefs-link:hover { color: var(--signal-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .process-step:not(:last-child)::after { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }

  .nav-links {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--step-32) var(--step-24);
    gap: var(--step-24);
    display: none;
    border-top: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .menu-toggle { display: inline-flex; }
}
