/* =========================================================
   Odhran O'Sullivan — marketing site
   Edit the tokens below to re-theme the whole site.
   ========================================================= */

:root {
  /* ---------- COLOUR ---------- */
  --ink:          #15140F;  /* near-black: headings, primary text */
  --ink-soft:     #4A4842;  /* secondary / muted body text */
  --paper:        #F6F3EC;  /* warm off-white: page background */
  --paper-raised: #FFFFFF;  /* cards / lead-card surface */
  --line:         #DAD5C8;  /* hairline borders & dividers */
  --accent:       #C2410C;  /* burnt sienna: CTA buttons, accents */
  --accent-press: #9A330A;  /* darker accent: inline links, hover/active */
  --on-accent:    #FFFFFF;  /* text on accent buttons (pure white for contrast) */
  --ink-band:     #1B1A15;  /* final-CTA dark band background */

  /* ---------- TYPE FAMILIES ---------- */
  --font-display: "Fraunces", Georgia, serif;        /* headings */
  --font-body:    "Inter Tight", system-ui, sans-serif; /* body / UI */
  --font-mono:    "Space Mono", ui-monospace, monospace; /* labels, metrics */

  /* ---------- TYPE SCALE (~1.25 ratio) ---------- */
  --fs-h1:    clamp(2.75rem, 6vw, 5rem);
  --fs-h2:    clamp(2rem, 4vw, 3.25rem);
  --fs-h3:    1.5rem;
  --fs-body:  1.0625rem;
  --fs-lede:  1.25rem;
  --fs-small: 0.8125rem;

  /* ---------- SPACING SCALE ---------- */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-6: 3rem;
  --sp-8: 4rem;
  --sp-section: clamp(4rem, 9vw, 8rem); /* vertical section padding */

  /* ---------- MISC ---------- */
  --maxw: 1180px;
  --radius: 6px;
  --line-height-body: 1.65;
  --line-height-head: 1.08;
}

/* =========================================================
   BASE / RESET
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* offset for the sticky header when jumping to anchors */
:target { scroll-margin-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: var(--line-height-head);
  font-weight: 600;
  margin: 0;
}

p { margin: 0; }

a { color: var(--accent-press); }       /* inline link colour: 6.64:1 on paper */
a:hover { color: var(--ink); }

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

ul, ol, dl { margin: 0; padding: 0; list-style: none; }

/* Visible keyboard focus for every interactive element */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent-press);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 var(--sp-3);
}

.lede {
  font-size: var(--fs-lede);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 46ch;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);           /* pure white text */
}
.btn-primary:hover {
  background: var(--accent-press);
  color: var(--on-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: var(--paper-raised);
  color: var(--ink);
  border-color: var(--ink);
}

.btn-lg { padding: 1.1rem 1.9rem; font-size: 1.0625rem; }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav { display: flex; align-items: center; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.nav-menu a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-menu a:not(.btn):hover { color: var(--accent-press); }

/* Mobile toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
/* animate to an X when open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* =========================================================
   1. HERO
   ========================================================= */
.hero {
  padding-top: clamp(3rem, 7vw, 6rem);
  padding-bottom: var(--sp-section);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero-copy h1 {
  font-size: var(--fs-h1);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
  max-width: 14ch;
}

.hero-copy .lede { margin-bottom: var(--sp-4); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* Hero visual: CSS-built call -> lead -> booked flow */
.hero-visual { display: flex; justify-content: center; }

.flow {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 100%;
  max-width: 320px;
}
/* vertical hairline connecting the nodes */
.flow::before {
  content: "";
  position: absolute;
  left: 1.6rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 2px;
  background: var(--line);
  z-index: 0;
}

.flow-node {
  position: relative;
  z-index: 1;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-3);
  padding-left: 3.25rem;
  box-shadow: 0 1px 2px rgba(21, 20, 15, 0.04);
}
/* node bullet */
.flow-node::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 1.5rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
}

.flow-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.flow-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 0.15rem 0;
}

/* state styling */
.flow-muted { opacity: 0.72; }
.flow-card .flow-line { border-bottom: 1px dashed var(--line); }
.flow-card .flow-line:last-child { border-bottom: 0; }

.flow-done { border-color: var(--accent); }
.flow-done::before { background: var(--accent); border-color: var(--accent); }
.flow-done .flow-tag { color: var(--accent-press); }
.flow-done .tick { color: var(--accent-press); }

/* =========================================================
   GENERIC SECTION LAYOUT (editorial: narrow label + wide body)
   ========================================================= */
.section { padding-block: var(--sp-section); }
.section-alt { background: var(--paper-raised); border-block: 1px solid var(--line); }

.section-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.section-aside .eyebrow { position: sticky; top: 6rem; margin: 0; }

.section-body h2 { font-size: var(--fs-h2); letter-spacing: -0.015em; max-width: 18ch; }
.section-body > .lede { margin-top: var(--sp-3); }

.section-close {
  margin-top: var(--sp-6);
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  max-width: 40ch;
}

/* =========================================================
   2. PROBLEM — editorial list
   ========================================================= */
.reasons { margin-top: var(--sp-6); }
.reasons li {
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--line);
}
.reasons li:last-child { border-bottom: 1px solid var(--line); }
.reasons h3 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.reasons p { color: var(--ink-soft); }

/* =========================================================
   3. SOLUTION — definition list
   ========================================================= */
.solution-list { margin-top: var(--sp-6); }
.solution-list > div {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.solution-list > div:last-child { border-bottom: 1px solid var(--line); }
.solution-list dt { font-weight: 600; font-size: 1.1rem; }
.solution-list dd { margin: 0; color: var(--ink-soft); }

/* =========================================================
   4. HOW IT WORKS — 4 steps
   ========================================================= */
.steps {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
.steps li {
  position: relative;
  padding-top: var(--sp-4);
  border-top: 2px solid var(--ink);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-press);
  display: block;
  margin-bottom: var(--sp-2);
}
.steps h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.steps p { color: var(--ink-soft); font-size: 0.98rem; }

/* =========================================================
   5. FEATURES — type-led grid (no icon-cards)
   ========================================================= */
.features {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;                       /* hairline gaps via background */
  background: var(--line);
  border: 1px solid var(--line);
}
.features li {
  background: var(--paper-raised);
  padding: var(--sp-4);
}
.section:not(.section-alt) .features li { background: var(--paper); }
.feat-label {
  display: block;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.feat-note { display: block; color: var(--ink-soft); font-size: 0.95rem; }

/* =========================================================
   6. PROOF / CASE STUDY
   ========================================================= */
.metrics {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.metric {
  border-top: 2px solid var(--accent);
  padding-top: var(--sp-2);
}
.metric-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}
.metric-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}
.testimonial {
  margin: var(--sp-6) 0 0;
  padding: var(--sp-4) 0 0;
  border-top: 1px solid var(--line);
}
.testimonial p {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink-soft);
  max-width: 40ch;
}

/* =========================================================
   7. WHO IT HELPS — quiet bordered grid
   ========================================================= */
.audience {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.audience li {
  background: var(--paper-raised);
  padding: var(--sp-3) var(--sp-4);
  font-size: 1.05rem;
}
.section:not(.section-alt) .audience li { background: var(--paper); }

/* =========================================================
   8. FINAL CTA — dark band
   ========================================================= */
.final-cta {
  background: var(--ink-band);
  color: var(--paper);
  padding-block: var(--sp-section);
}
.final-inner { max-width: 44ch; }
.final-cta h2 {
  font-size: var(--fs-h2);
  color: var(--paper);
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-3);
}
.eyebrow-onDark { color: #B7B2A4; }       /* muted label on dark, AA on ink-band */
.lede-onDark { color: #D8D4C9; margin-bottom: var(--sp-4); } /* AA body on dark */

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding-block: var(--sp-6);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  justify-content: space-between;
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.footer-meta a { color: var(--accent-press); }
.footer-meta a:hover { color: var(--ink); }

/* =========================================================
   SCROLL REVEAL (progressive enhancement; JS adds .is-visible)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* ---- Tablet (~768px and below) ---- */
@media (max-width: 860px) {
  /* Mobile nav: show toggle, hide menu until opened */
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 4.25rem;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-2) clamp(1.25rem, 5vw, 3rem) var(--sp-4);
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
  .nav-menu li.nav-cta { border-bottom: 0; padding-top: var(--sp-3); }
  .nav-cta .btn { width: 100%; justify-content: center; }

  /* Editorial sections collapse: label sits above body */
  .section-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .section-aside .eyebrow { position: static; }

  /* Hero stacks, visual below text */
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 100%; }
  .hero-visual { justify-content: flex-start; margin-top: var(--sp-4); }

  /* Solution list stacks label over text */
  .solution-list > div { grid-template-columns: 1fr; gap: 0.25rem; }

  /* Steps 4 -> 2x2 */
  .steps { grid-template-columns: repeat(2, 1fr); }

  /* Feature & audience grids -> 2 columns */
  .features, .audience { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: 1fr; gap: var(--sp-3); }
}

/* ---- Mobile (~480px and below) ---- */
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .features, .audience { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* =========================================================
   REDUCED MOTION — disable all transitions/animation
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
