/* ===========================================================
   PAPILLON — Design System
   Business • Technology • Digital
   =========================================================== */

/* Fonts are self-hosted (no request to Google Fonts), so visitors' IP
   addresses are not sent to a third party just to render text. All three
   families are SIL Open Font Licence — licence files sit in assets/fonts/. */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces-latin-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Color tokens */
  --navy: #0E1F3C;
  --navy-deep: #081326;
  --navy-soft: #16294B;
  --gold: #C6A15B;
  --gold-soft: #E9DDBE;
  --ivory: #F7F4EE;
  --ivory-dim: #EFEAE0;
  --charcoal: #262420;
  --charcoal-soft: #55524B;
  --rose: #963B5C;
  --rose-soft: #F1E3E2;
  --white: #FFFFFF;
  --line: rgba(14, 31, 60, 0.12);
  --line-on-dark: rgba(233, 221, 190, 0.18);

  /* Type */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-accent: 'Fraunces', Georgia, serif;

  /* Layout */
  --max-width: 1200px;

  /* Vertical spacing "dials" — change these four numbers to loosen or tighten
     every block on every page at once. */
  --space-section: 40px;   /* top + bottom padding of each page block */
  --space-head: 24px;      /* gap between a block's heading and its content */
  --space-gap: 18px;       /* gap between cards */
  --space-card: 20px;      /* inner padding of cards and boxes */
  --radius: 6px;
  --radius-sm: 3px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: clip; }

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

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p { color: var(--charcoal-soft); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.lede {
  font-size: 1.15rem;
  color: var(--charcoal-soft);
  max-width: 620px;
}

.section-head {
  max-width: 680px;
  margin-bottom: var(--space-head);
}

.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-primary:hover { background: #d4b16d; transform: translateY(-1px); }

.btn-outline-dark {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline-dark:hover { background: var(--navy); color: var(--ivory); }

.btn-outline-light {
  border-color: var(--line-on-dark);
  color: var(--ivory);
  background: transparent;
}
.btn-outline-light:hover { background: var(--line-on-dark); }

.btn-ghost {
  color: var(--navy);
  font-weight: 600;
  padding: 0;
  border: none;
  background: none;
  gap: 6px;
}
.btn-ghost svg { transition: transform 0.2s ease; }
.btn-ghost:hover svg { transform: translateX(4px); }

.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
  width: 100%;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--navy);
}
.logo span { color: var(--gold); }

.logo-img {
  height: 120px;
  width: auto;
  display: block;
}
.footer-brand .logo-img { height: 84px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav ul { display: flex; gap: 28px; align-items: center; }

.main-nav a.nav-link {
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--navy);
  position: relative;
  padding: 6px 0;
}
.main-nav a.nav-link:hover { color: var(--gold); }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 230px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 12px 32px rgba(14,31,60,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.18s ease;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 10px 12px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  color: var(--charcoal);
}
.dropdown a:hover { background: var(--ivory-dim); color: var(--navy); }

.header-ctas { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: all 0.2s ease;
}

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

#site-footer {
  background: var(--navy-deep);
  color: var(--gold-soft);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-brand .logo { color: var(--ivory); }
.footer-brand p { color: rgba(233,221,190,0.6); margin-top: 14px; max-width: 260px; font-size: 0.9rem; }
.footer-col h4 { color: var(--ivory); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px; font-family: var(--font-body); font-weight: 600; }
.footer-col a, .footer-col p { display: block; color: rgba(233,221,190,0.65); font-size: 0.88rem; margin-bottom: 11px; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.8rem;
  color: rgba(233,221,190,0.45);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Sections ---------- */

section { padding: var(--space-section) 0; }
.section-tight { padding: 32px 0; }
.bg-navy { background: var(--navy); color: var(--ivory); }
.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4 { color: var(--ivory); }
.bg-navy p { color: rgba(247,244,238,0.72); }
.bg-navy .eyebrow { color: var(--gold); }
.bg-dim { background: var(--ivory-dim); }
.bg-white { background: var(--white); }

.divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 20px 0;
}

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

.hero {
  position: relative;
  padding: 48px 0 44px;
  background: var(--navy);
  color: var(--ivory);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(198,161,91,0.14), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(198,161,91,0.08), transparent 40%);
  pointer-events: none;
}
.hero-inner {
  position: relative;   /* spans the same width as every block below; only the text is capped */
}
.hero h1 { color: var(--ivory); margin-bottom: 14px; max-width: 820px; }
.hero p.lede { color: rgba(247,244,238,0.78); margin-bottom: 24px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.page-hero {
  padding: 40px 0 32px;
  background: var(--navy);
  color: var(--ivory);
}
.page-hero h1 { color: var(--ivory); max-width: 720px; }
.page-hero p.lede { color: rgba(247,244,238,0.78); margin-top: 16px; }

/* ---------- Grids & Cards ---------- */

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

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--gold); transform: translateY(-3px); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.94rem; margin-bottom: 12px; }
.card .card-tag { font-size: 0.78rem; color: var(--gold); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; display: block; }

.card-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ivory-dim);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: var(--navy);
}

/* Pillars (intro section) */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pillar { background: var(--white); padding: 20px 20px; }
.pillar .pillar-index { font-family: var(--font-display); font-size: 0.8rem; color: var(--gold); font-weight: 600; margin-bottom: 14px; }

/* Dashboard role cards */
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dash-card {
  background: var(--navy);
  color: var(--ivory);
  border-radius: var(--radius);
  padding: 16px 18px;
  border: 1px solid var(--line-on-dark);
}
.dash-card .role-tag { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 10px; }
.dash-card h4 { color: var(--ivory); margin-bottom: 8px; }
.dash-card p { color: rgba(247,244,238,0.65); font-size: 0.86rem; }

/* Timeline / How we work */
.timeline { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.timeline-step { border-top: 2px solid var(--gold); padding-top: 18px; }
.timeline-step .step-index { font-family: var(--font-display); color: var(--gold); font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; }
.timeline-step h4 { margin-bottom: 8px; }
.timeline-step p { font-size: 0.86rem; }

/* Why-Papillon numbered list */
.reason-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 40px; }
.reason-item { display: flex; gap: 20px; }
.reason-index { font-family: var(--font-display); font-size: 1.1rem; color: var(--gold); font-weight: 600; min-width: 42px; }
.reason-item h4 { margin-bottom: 6px; }
.reason-item p { font-size: 0.92rem; }

/* Industry cards */
.industry-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-card);
}
.industry-card h3 { margin-bottom: 8px; }
.industry-card p { font-size: 0.92rem; margin-bottom: 12px; }

/* ---------- Ecosystem diagram (signature element) ---------- */

.ecosystem-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0 0;
}
.ecosystem-wrap svg { max-width: 410px; width: 100%; height: auto; }
.ecosystem-caption {
  text-align: center;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
}

/* ---------- Workflow / funnel arrows ---------- */

.flow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.flow-node {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}
.bg-navy .flow-node { background: var(--navy-soft); border-color: var(--line-on-dark); color: var(--ivory); }
.flow-arrow { color: var(--gold); font-size: 1.1rem; }

/* ---------- Feature matrix table ---------- */

.matrix-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 0.86rem; }
.matrix-table th, .matrix-table td { padding: 12px 14px; text-align: center; border-bottom: 1px solid var(--line); }
.matrix-table th { background: var(--navy); color: var(--ivory); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.matrix-table td:first-child, .matrix-table th:first-child { text-align: left; font-weight: 600; color: var(--navy); }
.matrix-table tr:last-child td { border-bottom: none; }
.matrix-table td.yes { color: var(--gold); font-weight: 700; }

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

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.86rem; font-weight: 600; color: var(--navy); }
.form-group input, .form-group select, .form-group textarea {
  font-family: var(--font-body);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ivory);
  font-size: 0.94rem;
  color: var(--charcoal);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.radio-row { display: flex; gap: 20px; flex-wrap: wrap; }
.radio-option { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }

/* Consent + notice (DPDP): itemised notice above the checkbox */
.form-notice {
  background: var(--ivory-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.84rem;
  color: var(--charcoal-soft);
  line-height: 1.55;
  margin-bottom: 14px;
}
.form-notice strong { color: var(--navy); }
.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.86rem;
  color: var(--charcoal-soft);
  line-height: 1.5;
  margin-bottom: 20px;
  cursor: pointer;
}
.consent-row input { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; }
.consent-row a { color: var(--navy); text-decoration: underline; }

/* Details still to be confirmed before launch — deliberately hard to miss */
.todo-field { background: #fff3cd; color: #5c4400; padding: 0 5px; border-radius: 3px; font-weight: 600; }

/* Privacy notice layout */
.notice h3 { margin: 32px 0 10px; }
.notice p, .notice li { font-size: 0.96rem; margin-bottom: 10px; }
.notice ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.notice table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 0.9rem; }
.notice th, .notice td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.notice th { background: var(--ivory-dim); color: var(--navy); }

/* Demo request form: full-width, three fields per row (6-column grid) */
.container.container-full { max-width: none; padding: 0 32px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px 20px;
  align-items: start;
}
.form-grid > .form-group { grid-column: span 2; margin-bottom: 0; }
.form-grid > .span-3 { grid-column: span 3; }
.form-grid > .span-4 { grid-column: span 4; }
.form-grid > .span-6 { grid-column: span 6; }
.form-grid > .form-notice, .form-grid > .consent-row { margin-bottom: 0; }
.form-grid > .consent-row { align-self: center; }
.form-grid > .form-submit { grid-column: span 2; align-self: center; }
.form-grid > .form-submit .btn { padding: 14px 24px; }

.form-grid textarea { min-height: 84px; }
.radio-row.radio-stack { flex-direction: column; gap: 8px; align-items: flex-start; padding-top: 4px; }

/* Slim "reach us directly" strip under the contact form */
.contact-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 18px 24px;
  background: var(--ivory-dim);
  border-radius: var(--radius);
}
.contact-strip h3 { font-size: 1.05rem; margin-bottom: 4px; }
.contact-strip p { font-size: 0.9rem; margin: 0; }
.contact-strip-cta { display: flex; align-items: center; gap: 20px; }
.contact-strip-cta .btn { flex-shrink: 0; }
@media (max-width: 980px) {
  .contact-strip, .contact-strip-cta { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 1320px) { .container.container-full { padding: 0 24px; } }
@media (max-width: 1180px) { .container.container-full { padding: 0 20px; } }
@media (max-width: 980px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid > .form-group, .form-grid > .span-3 { grid-column: span 1; }
  .form-grid > .span-4, .form-grid > .span-6, .form-grid > .form-submit { grid-column: span 2; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid > .form-group, .form-grid > .span-3, .form-grid > .span-4,
  .form-grid > .span-6, .form-grid > .form-submit { grid-column: span 1; }
}

/* ---------- Lifecycle lanes (Beauty Business ERP page) ---------- */
.lifecycle { display: grid; gap: 16px; }
.lifecycle-lane {
  display: grid;
  grid-template-columns: 250px 1fr;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.lifecycle-label {
  background: var(--navy);
  color: var(--ivory);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lifecycle-kicker {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}
.lifecycle-label h3 { color: var(--ivory); font-size: 1.25rem; margin-bottom: 6px; }
.lifecycle-label p { color: rgba(247,244,238,0.68); font-size: 0.86rem; margin: 0; }

.lifecycle-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(var(--steps), 1fr);
  align-items: start;
  padding: 30px 16px 26px;
}
.lifecycle-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
  text-align: center;
}
.step-dot {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--white);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}
.step-name { font-size: 0.86rem; font-weight: 600; color: var(--navy); line-height: 1.3; }
/* connector line + arrowhead between one step and the previous one */
.lifecycle-steps li + li::before {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(-50% + 19px);
  width: calc(100% - 38px);
  height: 2px;
  background: var(--gold);
}
.lifecycle-steps li + li::after {
  content: "";
  position: absolute;
  top: 12px;
  left: calc(50% - 27px);
  border-left: 8px solid var(--gold);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
/* the outcome of the lifecycle */
.lifecycle-steps li:last-child .step-dot { background: var(--navy); border-color: var(--navy); color: var(--gold); }

/* Narrower screens: the lifecycle runs top-to-bottom instead */
@media (max-width: 1100px) {
  .lifecycle-lane { grid-template-columns: 1fr; }
  .lifecycle-label { padding: 18px 20px; }
  .lifecycle-steps { grid-template-columns: 1fr; padding: 20px; }
  .lifecycle-steps li { flex-direction: row; align-items: center; gap: 14px; padding: 10px 0; text-align: left; }
  .lifecycle-steps li + li::before { top: -10px; left: 18px; width: 2px; height: 20px; }
  .lifecycle-steps li + li::after {
    top: 0; left: 12px;
    border-left: 7px solid transparent; border-right: 7px solid transparent;
    border-top: 8px solid var(--gold); border-bottom: 0;
  }
}

/* ---------- Marketing integration: channels merge into one pipeline ---------- */
.mkt-flow {
  display: grid;
  grid-template-columns: 230px 64px 1fr;
  align-items: stretch;
}
.mkt-channels { display: grid; grid-template-rows: repeat(3, 1fr); }
.mkt-channel {
  margin: 6px 0;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.mkt-channel strong { font-family: var(--font-display); font-size: 1rem; color: var(--navy); }
.mkt-channel span { font-size: 0.82rem; color: var(--charcoal-soft); }

.mkt-merge { position: relative; }
.mkt-merge svg { position: absolute; left: 0; top: 0; width: calc(100% - 9px); height: 100%; }
.mkt-merge-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border-left: 9px solid var(--gold);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.mkt-pipeline {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 20px;
  margin: 6px 0;
}
.mkt-pipeline-head { padding: 0 24px; }
.mkt-pipeline-head h3 { font-size: 1.15rem; color: var(--navy); margin-top: 2px; }
.mkt-pipeline .lifecycle-steps { padding-top: 24px; }

@media (max-width: 1100px) {
  .mkt-flow { grid-template-columns: 1fr; }
  .mkt-channels { grid-template-rows: none; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .mkt-channel { margin: 0; }
  .mkt-pipeline { margin: 0; }
  .mkt-merge { height: 44px; }
  .mkt-merge svg { display: none; }
  .mkt-merge::before { content: ""; position: absolute; left: 50%; top: 4px; bottom: 16px; width: 2px; margin-left: -1px; background: var(--gold); }
  .mkt-merge-arrow {
    right: auto; left: 50%; top: auto; bottom: 4px; transform: translateX(-50%);
    border-left: 7px solid transparent; border-right: 7px solid transparent;
    border-top: 10px solid var(--gold); border-bottom: 0;
  }
  .mkt-pipeline .lifecycle-steps { padding-top: 12px; }
}
@media (max-width: 640px) {
  .mkt-channels { grid-template-columns: 1fr; gap: 8px; }
  .mkt-channel { padding: 10px 14px; }
}

/* ---------- Insights: topic filter + contents list ---------- */
.insights-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.chip:hover { border-color: var(--gold); }
.chip .count { margin-left: 8px; color: var(--gold); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--ivory); }
.insights-count { font-size: 0.84rem; color: var(--charcoal-soft); margin-bottom: 10px; }

.insight-list { list-style: none; border-top: 1px solid var(--line); }
.insight-row {
  display: grid;
  grid-template-columns: 56px 272px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}
.insight-row[hidden] { display: none; }
.insight-row:hover { background: var(--ivory-dim); }
.insight-num { font-family: var(--font-display); font-weight: 600; color: var(--gold); }
.insight-topic { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--charcoal-soft); }
.insight-title { font-size: 1.08rem; line-height: 1.3; }
.insight-title a:hover { color: var(--gold); }
.insight-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--charcoal-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  white-space: nowrap;
}
.insight-status.is-live { color: var(--navy); border-color: var(--gold); }
.insights-note { margin: 20px 0 16px; font-size: 0.88rem; max-width: 640px; }

@media (max-width: 800px) {
  .insight-row {
    grid-template-columns: 40px 1fr auto;
    grid-template-areas: "num topic status" "num title title";
    gap: 6px 12px;
    align-items: start;
  }
  .insight-num { grid-area: num; }
  .insight-topic { grid-area: topic; }
  .insight-title { grid-area: title; }
  .insight-status { grid-area: status; justify-self: end; }
}
@media (max-width: 640px) {
  .insights-toolbar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  .chip { flex-shrink: 0; }
}

/* ---------- Home page redesign ---------- */

/* Hero: message on the left, the four disciplines on the right */
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: center; }
.hero-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  padding: 20px 22px 8px;
}
.hero-card-title { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.discipline {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line-on-dark);
  color: var(--ivory);
}
.discipline:first-of-type { border-top: none; }
.discipline-num { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: var(--gold); }
.discipline strong { display: block; font-family: var(--font-display); font-size: 1.02rem; color: var(--ivory); }
.discipline small { display: block; font-size: 0.84rem; color: rgba(247,244,238,0.62); }
.discipline-go { color: var(--gold); transition: transform 0.15s ease; }
.discipline:hover .discipline-go { transform: translateX(4px); }

/* Why Papillon: statement on the left, six reasons on the right */
.why-split { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.reason-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.reason-cell { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.reason-cell .reason-index { min-width: 28px; font-size: 1rem; }
.reason-cell h4 { margin-bottom: 4px; }
.reason-cell p { font-size: 0.9rem; margin: 0; }

/* What we do: a services index instead of six cards */
.service-list { list-style: none; border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 56px 240px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}
.service-row:hover { background: var(--white); }
.service-num { font-family: var(--font-display); font-weight: 600; color: var(--gold); }
.service-row h3 { font-size: 1.2rem; }
.service-row p { font-size: 0.92rem; margin: 0; max-width: 580px; }
.service-go { font-weight: 600; font-size: 0.88rem; color: var(--navy); white-space: nowrap; }
.service-row:hover .service-go { color: var(--gold); }

/* Platform showcase: borderless module list under the diagram */
.module-head { margin-top: 28px; font-family: var(--font-display); font-size: 1.05rem; color: var(--gold); }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 32px; margin-top: 14px; }
.module-grid > div { border-top: 1px solid var(--line-on-dark); padding-top: 12px; }
.module-grid h4 { color: var(--ivory); font-size: 1rem; margin-bottom: 4px; }
.module-grid p { font-size: 0.88rem; margin: 0; }

/* Roles: one interactive panel instead of seven cards */
.role-tabs { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: stretch; }
.role-list { display: flex; flex-direction: column; gap: 4px; }
.role-tab {
  flex: 1;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.role-tab:hover { border-color: var(--gold); }
.role-tab[aria-selected="true"] { background: var(--navy); color: var(--gold); border-color: var(--navy); border-left-color: var(--gold); }
.role-panel { background: var(--navy); border-radius: var(--radius); padding: 32px 36px; display: flex; flex-direction: column; justify-content: center; }
.role-panel .role-tag { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--gold); }
.role-panel h3 { color: var(--ivory); font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 8px 0 12px; }
.role-panel p { color: rgba(247,244,238,0.78); font-size: 1.05rem; max-width: 520px; margin: 0; }
.role-panel .btn-ghost { color: var(--gold); margin-top: 18px; }

/* Steps with descriptions (How we work) */
.stepper-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.stepper-card .lifecycle-steps { padding: 26px 20px 24px; }
.step-text { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.step-desc { font-size: 0.82rem; color: var(--charcoal-soft); line-height: 1.45; max-width: 190px; }

/* Industries: open columns with a gold rule instead of boxes */
.industry-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.industry-col { display: block; border-top: 2px solid var(--gold); padding-top: 16px; }
.industry-col h3 { margin-bottom: 6px; }
.industry-col p { font-size: 0.92rem; margin-bottom: 10px; }
.industry-col .go { font-weight: 600; font-size: 0.88rem; color: var(--navy); }
.industry-col:hover .go { color: var(--gold); }

@media (max-width: 1100px) {
  .hero-split { grid-template-columns: 1fr; gap: 32px; }
  .stepper-card .steps-desc { padding: 22px 22px 22px 40px; }
  .steps-desc li { display: block; position: relative; padding: 0 0 22px 34px; border-left: 2px solid var(--gold); text-align: left; }
  .steps-desc li:last-child { border-left-color: transparent; padding-bottom: 0; }
  .steps-desc li + li::before, .steps-desc li + li::after { display: none; }
  .steps-desc .step-dot { position: absolute; left: -20px; top: 0; }
  .steps-desc .step-text { align-items: flex-start; padding-top: 6px; }
  .steps-desc .step-desc { max-width: none; }
}
@media (max-width: 980px) {
  .why-split { grid-template-columns: 1fr; gap: 28px; }
  .module-grid { grid-template-columns: 1fr 1fr; }
  .industry-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .service-row { grid-template-columns: 40px 1fr; gap: 4px 12px; align-items: start; }
  .service-num { grid-row: 1 / span 3; }
  .service-go { justify-self: start; margin-top: 4px; }
  .role-tabs { grid-template-columns: 1fr; }
  .role-list { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .role-tab { flex: 0 0 auto; }
  .role-panel { padding: 24px; }
}
@media (max-width: 640px) {
  .reason-grid, .module-grid, .industry-row { grid-template-columns: 1fr; }
}

/* ---------- Solutions / Industries / service pages ---------- */

/* index rows can carry a description plus capability tags */
.service-row[id] { scroll-margin-top: 170px; }
.bg-white .service-row:hover { background: var(--ivory-dim); }
.service-row h3 a:hover { color: var(--gold); }
.service-body p { font-size: 0.92rem; margin: 0; max-width: 620px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; list-style: none; }
.tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--charcoal-soft);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 8px;
}
a.tag-more { color: var(--navy); border-color: var(--gold); }
a.tag-more:hover { background: var(--gold); }

/* slim navy product strip (Solutions page) */
.platform-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 24px 28px;
  background: var(--navy);
  border-radius: var(--radius);
}
.platform-strip h3 { color: var(--ivory); font-size: 1.35rem; margin-bottom: 6px; }
.platform-strip p { color: rgba(247,244,238,0.72); font-size: 0.92rem; margin: 0; max-width: 560px; }
.platform-strip .eyebrow { margin-bottom: 8px; }
.platform-strip .accent-serif { color: #E3A1B8; }
.platform-strip-cta { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }

/* service pages: solution sidebar + two-column capability list */
.eyebrow a { color: inherit; }
.eyebrow a:hover { text-decoration: underline; }
.cap-split { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.solution-nav { position: sticky; top: 170px; display: flex; flex-direction: column; border-left: 2px solid var(--line); }
.solution-nav-title { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--gold); padding: 0 0 10px 16px; }
.solution-nav a {
  padding: 9px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--charcoal-soft);
}
.solution-nav a:hover { color: var(--navy); }
.solution-nav a.active { color: var(--navy); border-left-color: var(--gold); }
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin-top: 4px; }
.cap-item { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.cap-num { min-width: 28px; font-family: var(--font-display); font-weight: 600; color: var(--gold); }
.cap-item h4 { margin-bottom: 2px; }
.cap-item p { font-size: 0.9rem; margin: 0; }
.cap-split .contact-strip { margin-top: 28px; }

@media (max-width: 980px) {
  .cap-split { grid-template-columns: 1fr; gap: 24px; }
  .solution-nav { position: static; flex-direction: row; border-left: none; overflow-x: auto; gap: 8px; padding-bottom: 6px; }
  .solution-nav-title { display: none; }
  .solution-nav a { flex: 0 0 auto; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
  .solution-nav a.active { background: var(--navy); color: var(--gold); border-color: var(--navy); }
  .platform-strip { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .cap-grid { grid-template-columns: 1fr; }
  /* on phones the capability tags are hidden - the link leads to the full list */
  .service-body .tag-row { display: none; }
}

/* spam trap field: invisible to people, tempting to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* multi-select answers shown as tappable chips */
.field-label { font-size: 0.86rem; font-weight: 600; color: var(--navy); }
.field-label small { font-weight: 400; color: var(--charcoal-soft); margin-left: 6px; }
.check-group { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip { position: relative; cursor: pointer; }
.check-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-chip span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ivory);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.check-chip:hover span { border-color: var(--gold); }
.check-chip input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--gold); }
.check-chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.field-error { color: #b3261e; font-size: 0.84rem; margin: 2px 0 0; }
.form-aside { margin-top: 14px; font-size: 0.9rem; }
.form-aside a { color: var(--navy); text-decoration: underline; font-weight: 600; }

/* ---------- FAQ accordion ---------- */

.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--navy);
  font-weight: 600;
}
.faq-icon { transition: transform 0.2s ease; color: var(--gold); font-size: 1.2rem; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-item.open .faq-answer { max-height: 240px; }
.faq-answer p { padding-bottom: 22px; font-size: 0.94rem; max-width: 640px; }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--navy);
  color: var(--ivory);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
}
.cta-band h2 { color: var(--ivory); margin-bottom: 14px; }
.cta-band p { color: rgba(247,244,238,0.75); max-width: 560px; margin: 0 auto 32px; }
.cta-band .hero-ctas { justify-content: center; }

/* Beauty accent (ERP + industries pages only) */
.accent-serif { font-family: var(--font-accent); font-style: italic; color: var(--rose); }
/* the brand rose (#963B5C) is too dark to read on navy, so use a lighter tint there */
.bg-navy .accent-serif { color: #E3A1B8; }

/* Small sub-brand aside lockup — used on the homepage teaser, where the
   Beauty & Wellness mark is a supporting mention, not the main subject. */
.subbrand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.subbrand-mark img { height: 44px; width: auto; }
.subbrand-mark .subbrand-caption {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247,244,238,0.55);
  border-left: 1px solid var(--line-on-dark);
  padding-left: 14px;
}

/* Large sub-brand lockup for the ERP product pages themselves — the
   Beauty & Wellness mark takes the lead here since these pages ARE that
   product line, unlike the small aside version used elsewhere. */
.subbrand-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.subbrand-hero img { height: 92px; width: auto; }
.subbrand-hero .tagline {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  border-left: 1px solid var(--line-on-dark);
  padding-left: 24px;
}
@media (max-width: 640px) {
  .subbrand-hero .tagline { border-left: none; padding-left: 0; }
}

/* ---------- Product Demo Videos ---------- */

.demo-videos-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: 0.04em;
  color: var(--gold);
  margin-bottom: 24px;
}
.demo-videos-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 48px;
  align-items: start;
}
.demo-videos-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 8px;
}
.demo-videos-list::-webkit-scrollbar { width: 6px; }
.demo-videos-list::-webkit-scrollbar-track { background: rgba(233,221,190,0.08); border-radius: 4px; }
.demo-videos-list::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
.demo-videos-list { scrollbar-width: thin; scrollbar-color: var(--gold) rgba(233,221,190,0.08); }
.demo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  color: rgba(247,244,238,0.75);
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}
.demo-item::before { content: "•"; color: var(--gold); }
.demo-item:hover { background: rgba(233,221,190,0.06); color: var(--ivory); }
.demo-item.active {
  color: var(--gold);
  font-weight: 600;
  border-left-color: var(--gold);
  background: rgba(233,221,190,0.08);
}
.demo-player-frame {
  background: var(--ivory);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.demo-player-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: var(--ivory-dim);
  border-bottom: 1px solid var(--line);
}
.demo-player-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(14,31,60,0.18); }
.demo-player-body {
  aspect-ratio: 2/1;   /* matches 4 of the 6 demo videos, so they fill the frame without black bars */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.demo-player-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}
.demo-player-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}
.demo-play-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.demo-player-caption { font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: 1.05rem; }
.demo-player-note { font-size: 0.82rem; color: var(--charcoal-soft); }

/* Compact teaser variant (used where a full section would be redundant) */
.demo-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--navy);
  color: var(--ivory);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.demo-teaser-text { display: flex; align-items: center; gap: 18px; }
.demo-teaser .demo-play-btn { width: 52px; height: 52px; font-size: 1.1rem; flex-shrink: 0; }
.demo-teaser h4 { color: var(--ivory); margin-bottom: 4px; }
.demo-teaser p { color: rgba(247,244,238,0.65); font-size: 0.88rem; margin: 0; }

/* The generic ".bg-navy h2 / p" colours are more specific than the classes above,
   so they must be re-asserted here: gold heading (as in the design sample) and
   dark caption text on the light player panel. */
.bg-navy .demo-videos-title { color: var(--gold); }
.bg-navy .demo-player-caption { color: var(--navy); }
.bg-navy .demo-player-note { color: var(--charcoal-soft); }

/* Desktop: the list is exactly as tall as the video panel; items share the
   height evenly, and the list scrolls if more items are ever added. */
.demo-videos-listwrap { position: relative; min-height: 280px; }
.demo-videos-listwrap > .demo-videos-list { position: absolute; inset: 0; max-height: none; }
.demo-videos-layout { align-items: stretch; }
.demo-player-frame { align-self: start; }
.demo-item { flex: 1 0 auto; font-size: 1rem; }

@media (max-width: 800px) {
  .demo-videos-layout { grid-template-columns: 1fr; }
  .demo-videos-listwrap { min-height: 0; }
  .demo-videos-listwrap > .demo-videos-list { position: static; max-height: 320px; }
  .demo-item { flex: 0 0 auto; }
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

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

/* Desktop header tightening so nav + logo + buttons fit without wrapping */
@media (max-width: 1320px) {
  .logo-img { height: 96px; }
  .header-inner { padding: 10px 24px; }
  .main-nav { gap: 20px; }
  .main-nav ul { gap: 18px; }
  .header-ctas .btn { padding: 12px 16px; }
}

/* Collapse to the hamburger menu before the nav would need to wrap */
@media (max-width: 1180px) {
  /* backdrop-filter would make the header the containing block for the fixed
     full-screen menu and collapse it to the header's height, so drop it here */
  #site-header { background: var(--ivory); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .logo-img { height: 64px; }
  .header-inner { padding: 10px 20px; }
  .main-nav { position: fixed; top: 85px; left: 0; right: 0; bottom: 0; background: var(--ivory); flex-direction: column; align-items: stretch; padding: 24px; transform: translateX(100%); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); visibility: visible; transition: transform 0.25s ease, visibility 0s; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a.nav-link { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; display: none; padding-left: 12px; }
  .has-dropdown.open .dropdown { display: block; }
  .header-ctas { margin-top: 20px; flex-direction: column; }
  .header-ctas .btn { padding: 14px 26px; justify-content: center; }
  .nav-toggle { display: block; }
}

@media (max-width: 980px) {
  .grid-2, .grid-3, .grid-4, .pillars, .dash-grid, .timeline, .reason-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { padding: 26px 18px; }
  section { padding: 32px 0; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .matrix-table { font-size: 0.72rem; }
}
