/* ──────────────────────────────────────────────────────────────────────
   Zyvra Studio — light editorial design system
   ────────────────────────────────────────────────────────────────────── */

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

:root {
  /* surface */
  --paper:        #faf8f4;
  --paper-elev:   #ffffff;
  --paper-sunk:   #f3efe8;

  /* ink */
  --ink:          #14141a;
  --ink-2:        #3a3a45;
  --ink-3:        #6b6b78;
  --ink-4:        #9a9aa6;

  /* rules */
  --rule:         rgba(20, 20, 26, 0.08);
  --rule-strong:  rgba(20, 20, 26, 0.16);

  /* accent — primary (deep indigo, trust + infrastructure) */
  --accent:       #3730a3;
  --accent-deep:  #2e2885;
  --accent-soft:  #eceaff;
  --accent-tint:  rgba(55, 48, 163, 0.08);

  /* accent — secondary (warm terracotta, sparing) */
  --ember:        #b6552a;
  --ember-soft:   #f6e9df;

  /* gradient (single key word, hero halo) */
  --accent-gradient: linear-gradient(105deg, #3730a3 0%, #5b21b6 55%, #b6552a 100%);

  /* layout */
  --max-narrow:   720px;
  --max-wide:     1180px;
  --gutter:       clamp(20px, 4vw, 32px);

  /* effects */
  --shadow-sm:    0 1px 2px rgba(20, 20, 26, 0.04), 0 1px 1px rgba(20, 20, 26, 0.03);
  --shadow-md:    0 4px 18px rgba(20, 20, 26, 0.06), 0 1px 2px rgba(20, 20, 26, 0.04);
  --shadow-lg:    0 20px 48px rgba(20, 20, 26, 0.08), 0 2px 6px rgba(20, 20, 26, 0.04);
  --ring:         0 0 0 3px rgba(55, 48, 163, 0.20);

  /* timing */
  --ease:         cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast:       120ms;
  --t-med:        180ms;
  --t-slow:       320ms;

  /* form */
  --input-bg:           var(--paper-elev);
  --input-bg-focus:     #ffffff;
  --input-border:       var(--rule-strong);
  --input-border-focus: var(--accent);
  --input-placeholder:  var(--ink-4);
  --autofill-bg:        #fffaf2;
}

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

body {
  position: relative;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Subtle paper grain — fixed full-bleed, behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 0 0.05 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: multiply;
}

nav, section, footer, main {
  position: relative;
  z-index: 1;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ─── Layout wraps ──────────────────────────────────────────────────── */

.wrap {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: 96px 0; }

section:not(:last-of-type)::after {
  content: '';
  display: block;
  height: 1px;
  width: calc(100% - 48px);
  max-width: var(--max-wide);
  margin: 96px auto 0;
  background: linear-gradient(90deg, transparent, var(--rule-strong), transparent);
}

section:last-of-type::after { display: none; }

/* ─── Nav ───────────────────────────────────────────────────────────── */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
  padding: 16px var(--gutter);
}

nav .inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
}

/* When the nav has only 2 children (logo + CTA), collapse to two columns */
nav .inner:not(:has(> :nth-child(3))) {
  grid-template-columns: 1fr auto;
}

nav .inner > :nth-child(2):not(:last-child) { justify-self: center; }
nav .inner > :last-child   { justify-self: end; }

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  max-width: min(100%, 320px);
}

.logo img { display: block; }

nav a.nav-link {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}

nav a.nav-link:hover { color: var(--accent); text-decoration: none; }

nav a.cta {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--accent);
  border: none;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--t-med) var(--ease),
              transform var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
  white-space: nowrap;
}

nav a.cta::after {
  content: ' →';
  font-weight: 500;
  display: inline-block;
  margin-left: 2px;
  transition: transform var(--t-med) var(--ease);
}

nav a.cta:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-tint);
  text-decoration: none;
}

nav a.cta:hover::after { transform: translateX(3px); }

/* Scroll progress bar — pure CSS, supported browsers only */
@supports (animation-timeline: scroll()) {
  body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    transform-origin: 0 50%;
    background: var(--accent-gradient);
    z-index: 200;
    animation: scrollProgress linear;
    animation-timeline: scroll(root);
  }
  @keyframes scrollProgress {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
  }
}

/* ─── Typography ────────────────────────────────────────────────────── */

/* Display headings: Plex Sans, tight tracking, weighty */
h1, h2, h3, h4, h5, h6 {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.15;
  font-weight: 600;
}

h2 {
  font-size: clamp(28px, 4.4vw, 44px);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(18px, 2.4vw, 22px);
  margin: 28px 0 12px;
  letter-spacing: -0.01em;
}

p { color: var(--ink-2); }
strong, b { color: var(--ink); font-weight: 600; }

/* Mono utility — used for nav, eyebrow, pills, prices, code-like UI */
.mono,
.eyebrow,
.pill,
.tag,
.metric,
.service-price,
.service-meta,
.service-numeral,
nav a.nav-link,
nav a.cta,
.btn,
button[type="submit"],
.footer-links a,
.hero-trust,
.case-status {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ─── Section head pattern ──────────────────────────────────────────── */

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 48px;
  max-width: var(--max-narrow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.20em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.section-intro {
  font-size: 17px;
  color: var(--ink-2);
  margin-top: 4px;
  max-width: 38em;
  line-height: 1.6;
}

/* ─── Hero ──────────────────────────────────────────────────────────── */

#hero {
  position: relative;
  padding: 120px 0 96px;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -10%;
  width: 80%;
  height: 90%;
  background:
    radial-gradient(circle at 30% 40%, rgba(182, 85, 42, 0.12), transparent 55%),
    radial-gradient(circle at 70% 30%, rgba(55, 48, 163, 0.10), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

#hero::after {
  content: 'SECURITY-FIRST';
  position: absolute;
  top: 50%;
  right: -5%;
  transform: translateY(-50%);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: clamp(80px, 14vw, 200px);
  font-weight: 700;
  letter-spacing: -0.04em;
  -webkit-text-stroke: 1px rgba(20, 20, 26, 0.05);
  color: transparent;
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  user-select: none;
}

#hero > * { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.20em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.hero-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.hero-brand {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 24px;
  max-width: 18ch;
}

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

h1 {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  margin-bottom: 20px;
  max-width: 42em;
}

/* On service pages h1 IS the main headline (no .hero-brand sibling) */
#hero .hero-eyebrow + h1 {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 24px;
  max-width: 20ch;
}

.hero-sub {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 38em;
}

.hero-sub strong { color: var(--ink); font-weight: 600; }

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
  margin-bottom: 36px;
}

/* Trust strip (chips below CTAs) */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  max-width: 38em;
}

.trust-strip .metric {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-strip .metric::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.trust-strip .metric + .metric::before {
  background: var(--ember);
}
.trust-strip .metric + .metric + .metric::before {
  background: var(--ink-3);
}

.hero-trust {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.10em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-top: 20px;
}

/* ─── Buttons ───────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 24px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--t-med) var(--ease),
              transform var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
  cursor: pointer;
}

.btn::after {
  content: '→';
  font-size: 14px;
  font-weight: 400;
  display: inline-block;
  transition: transform var(--t-med) var(--ease);
}

.btn:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-tint);
  text-decoration: none;
  color: #fff;
}

.btn:hover::after { transform: translateX(3px); }

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-md), var(--ring);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  box-shadow: none;
}
.btn-secondary::after {
  content: '↓';
}
.btn-secondary:hover {
  background: var(--paper-elev);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover::after { transform: translateY(2px); }

/* ─── Services — stacked rich cards ─────────────────────────────────── */

.services {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
}

.service {
  position: relative;
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 40px 44px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  transition: border-color var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
  overflow: hidden;
}

.service::before {
  content: attr(data-numeral);
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 96px;
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--paper-sunk);
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}

.service.is-featured {
  border-color: rgba(55, 48, 163, 0.20);
  box-shadow: var(--shadow-sm);
}

.service:hover {
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service > * { position: relative; z-index: 1; }

/* Top meta row (eyebrow + featured badge) */
.service-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.service-phase {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.20em;
  color: var(--accent);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.service-phase::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.service-badge {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ember);
  background: var(--ember-soft);
  padding: 5px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Headline + sub */
.service-headline {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin: 4px 0 0;
  max-width: 22ch;
}

.service-sub {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
  max-width: 56ch;
}

/* Two-column internal grid — What we examine / You leave with */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.service-col-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.20em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin: 0 0 14px;
}

.service-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.service-col li {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.service-col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.service-col.is-deliverables li::before { background: var(--ember); }

/* For / Not paired qualifiers — handles 1 or 2 children */
.service-qualifiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  padding-top: 4px;
}

.service-qualifiers:has(> :only-child) {
  grid-template-columns: 1fr;
  max-width: 640px;
}

.service-q {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
}

.service-q-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 0 0;
  border-top: 2px solid var(--accent);
}

.service-q.is-not .service-q-label {
  color: var(--ink-3);
  border-top-color: var(--ink-4);
}

.service-q.is-for .service-q-label {
  color: var(--accent);
}

.service-q p {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}

/* Footer row — price + CTA */
.service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}

.service-price-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.service-price {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.service-price-note {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.price-intro-note {
  margin: 6px 0 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ember, #b6552a);
}

.service-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.service-actions .btn {
  padding: 12px 22px;
  font-size: 10.5px;
}

/* Legacy in-card link (kept for any other pages using the pattern) */
.service-more {
  display: inline-block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 6px;
  text-decoration: none;
}

.service-more::after {
  content: ' →';
  transition: transform var(--t-med) var(--ease);
  display: inline-block;
}

.service-more:hover { text-decoration: none; color: var(--accent-deep); }
.service-more:hover::after { transform: translateX(3px); }

/* ─── Reasons ───────────────────────────────────────────────────────── */

.reasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px 32px;
}

.reasons > div {
  position: relative;
  padding-top: 20px;
  border-top: 1px solid var(--rule-strong);
}

.reasons > div::before {
  content: attr(data-num);
  position: absolute;
  top: -1px;
  left: 0;
  height: 2px;
  width: 36px;
  background: var(--accent);
  font-size: 0;
}

.reason-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.35;
}

.reason-body {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}

.reason-body ul { margin: 0 0 0 18px; padding: 0; }
.reason-body li { margin-bottom: 6px; }

/* Audience panels — paired contrast (legacy) + single (current) */
.audience-pair,
.audience-single {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.audience-single { max-width: 720px; }

.audience-pair > div,
.audience-single > div {
  padding: 32px;
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 12px;
  position: relative;
}

.audience-pair > div::before,
.audience-single > div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 3px;
  border-radius: 12px 0 0 12px;
}

.audience-pair > div.is-fit::before,
.audience-single > div.is-fit::before { background: var(--accent); }
.audience-pair > div.is-not::before    { background: var(--ink-4); }

.audience-pair .reason-title,
.audience-single .reason-title { margin-bottom: 12px; }

.audience-redirect {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  color: var(--ink-3);
  line-height: 1.55;
}

/* ─── AI cost discipline ───────────────────────────────────────────── */

.cost-lifecycle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px 32px;
  margin-bottom: 40px;
}

.cost-lifecycle > div {
  position: relative;
  padding-top: 20px;
  border-top: 1px solid var(--rule-strong);
}

.cost-stage-label {
  display: block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.20em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 10px;
}

.cost-lifecycle p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
}

.cost-lifecycle a {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  text-decoration: none;
}

.cost-lifecycle a:hover { color: var(--accent); }

.cost-monitor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 32px;
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 12px;
  margin-bottom: 28px;
}

.cost-monitor-col {
  position: relative;
}

.cost-monitor-col + .cost-monitor-col {
  padding-left: 32px;
  border-left: 1px solid var(--rule);
}

.cost-monitor-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.20em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin: 0 0 16px;
}

.cost-monitor-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cost-monitor-col li {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.cost-monitor-col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.cost-monitor-col.is-manual li::before { background: var(--ember); }

.cost-example {
  display: block;
  padding: 22px 28px;
  background: var(--paper);
  border-left: 3px solid var(--ember);
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-radius: 0 8px 8px 0;
  max-width: 820px;
}

.cost-example-label {
  display: block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.20em;
  color: var(--ember);
  text-transform: uppercase;
  margin: 0 0 10px;
}

.cost-example p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ─── Cases ─────────────────────────────────────────────────────────── */

.cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.cases > div {
  position: relative;
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
}

.cases > div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 999px;
}

.cases > div:hover {
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.case-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 0;
  line-height: 1.3;
  padding-right: 100px;
}

.case-body {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}

.case-body p + p { margin-top: 10px; }
.case-body strong { color: var(--ink); }

.case-status {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ember);
  background: var(--ember-soft);
  padding: 5px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* ─── Step path pattern (used in "How it works" timelines) ────────── */

.steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 32px;
}

.step {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  align-items: start;
  position: relative;
}

.step::before {
  content: '';
  position: absolute;
  left: 76px;
  top: 32px;
  bottom: -28px;
  width: 1px;
  background: var(--rule);
}

.step:last-child::before { display: none; }

.step-marker {
  padding-top: 4px;
  display: grid;
  grid-template-columns: 10px 1fr;
  column-gap: 12px;
  row-gap: 4px;
  align-items: start;
  text-transform: uppercase;
}

.step-marker::before {
  content: '';
  grid-row: 1 / span 2;
  grid-column: 1;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
  position: relative;
  z-index: 1;
}

.step-marker-number {
  grid-column: 2;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.step-marker-duration {
  grid-column: 2;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.steps-note {
  font-size: 14.5px;
  color: var(--ink-3);
  line-height: 1.55;
  margin: 0 0 8px;
  max-width: 56em;
  font-style: italic;
}

.step-title {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 12px;
}

.step-body p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0 0 12px;
}

.step-body p:last-child { margin-bottom: 0; }

.step-deliverables {
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--paper-sunk);
  border-radius: 8px;
}

.step-deliverables-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 10px;
}

.step-deliverables ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-deliverables li {
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.step-deliverables li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
}

/* ─── Pricing scenario calculator (CSS-only) ───────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.calculator {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1.4fr;
  gap: 28px;
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.calc-options {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px 14px;
  align-items: start;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color var(--t-med) var(--ease),
              background-color var(--t-med) var(--ease);
}

.calc-option:hover {
  border-color: var(--rule-strong);
}

.calc-option input[type="radio"] {
  grid-row: 1;
  grid-column: 1;
  margin: 2px 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.calc-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.calc-option-title {
  grid-row: 1;
  grid-column: 2;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.calc-option-desc {
  grid-row: 2;
  grid-column: 2;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}

.calc-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 28px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.calc-row:last-of-type { border-bottom: none; }

.calc-row-label {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 14.5px;
  color: var(--ink-2);
  font-weight: 400;
}

.calc-row-value {
  display: none;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-align: right;
}

/* Total row: bigger, accent colour */
.calc-row--total {
  padding-top: 18px;
  padding-bottom: 14px;
  border-top: 1px solid var(--rule-strong);
  border-bottom: none;
  margin-top: 4px;
}

.calc-row--total .calc-row-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.calc-row--total .calc-row-value {
  font-size: 28px;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.calc-row--monthly .calc-row-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.calc-row--monthly .calc-row-value {
  font-size: 16px;
  color: var(--ember);
}

.calc-note {
  display: none;
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.5;
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

/* The CSS-only state machine — toggle visibility based on which radio is checked */
.calculator:has(#s1:checked) [data-shape="s1"],
.calculator:has(#s2:checked) [data-shape="s2"],
.calculator:has(#s3:checked) [data-shape="s3"] {
  display: block;
}

.calculator:has(#s1:checked) .calc-row-value[data-shape="s1"],
.calculator:has(#s2:checked) .calc-row-value[data-shape="s2"],
.calculator:has(#s3:checked) .calc-row-value[data-shape="s3"] {
  display: block;
}

/* Homepage pricing summary callout */
.pricing-summary {
  margin-top: 48px;
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px 32px;
  align-items: center;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-summary-label {
  display: block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.20em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.pricing-summary-text {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.5;
  margin: 0;
}

.pricing-summary-text strong {
  color: var(--accent);
  font-weight: 600;
}

.pricing-summary-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--t-med) var(--ease),
              transform var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
}

.pricing-summary-cta::after {
  content: '→';
  font-size: 14px;
  transition: transform var(--t-med) var(--ease);
}

.pricing-summary-cta:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-tint);
  text-decoration: none;
  color: #fff;
}

.pricing-summary-cta:hover::after { transform: translateX(3px); }

/* ─── Pills / Tags ──────────────────────────────────────────────────── */

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  background: var(--paper-sunk);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  text-transform: uppercase;
}

.tag {
  display: inline-block;
  margin-top: 14px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* ─── FAQ ───────────────────────────────────────────────────────────── */

.faq-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 12px;
}

details.faq-item,
.faq-item {
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0;
  transition: border-color var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
}

details.faq-item:hover,
.faq-item:hover {
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-sm);
}

details.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 24px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  position: relative;
  user-select: none;
}

details.faq-item > summary::-webkit-details-marker { display: none; }

details.faq-item > summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  transition: transform var(--t-med) var(--ease);
  line-height: 1;
}

details.faq-item[open] > summary::after {
  transform: translateY(-50%) rotate(45deg);
}

details.faq-item .faq-a {
  padding: 0 24px 22px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
}

/* Legacy (non-details) FAQ fallback — used by anchor links or older pages */
.faq-item .faq-q {
  padding: 20px 24px 10px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.faq-item .faq-a:not(details .faq-a) {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ─── Prose (long-form on service pages) ────────────────────────────── */

.prose {
  color: var(--ink-2);
  max-width: 40em;
  font-size: 16px;
  line-height: 1.65;
}

.prose p + p { margin-top: 14px; }
.prose ul    { margin: 14px 0 0 22px; }
.prose ol    { margin: 14px 0 0 22px; }
.prose li    { margin-bottom: 10px; line-height: 1.6; }
.prose li strong { color: var(--ink); font-weight: 600; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { color: var(--ink-3); font-style: italic; }
.prose a { color: var(--accent); }
.prose a:hover { color: var(--accent-deep); }
.prose code {
  background: var(--paper-sunk);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ─── Contact form ──────────────────────────────────────────────────── */

.contact-intro { margin-bottom: 36px; max-width: 40em; }

.contact-intro h3 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.contact-intro p {
  color: var(--ink-2);
  line-height: 1.6;
}

#contact form,
form#zyvra-contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-transform: uppercase;
}

input, textarea, select {
  text-transform: none;
  letter-spacing: 0;
  background: var(--paper);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 15px;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  padding: 12px 14px;
  transition: border-color var(--t-med) var(--ease),
              background-color var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
  outline: none;
  width: 100%;
}

input::placeholder, textarea::placeholder {
  color: var(--input-placeholder);
  opacity: 1;
}

input:hover, textarea:hover, select:hover {
  border-color: var(--rule-strong);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--input-border-focus);
  background: var(--input-bg-focus);
  box-shadow: var(--ring);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink) !important;
  caret-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--autofill-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--autofill-bg) inset !important;
  transition: background-color 99999s ease-out;
}

select option { background: var(--paper-elev); color: var(--ink); }

textarea { resize: vertical; min-height: 140px; line-height: 1.55; }

button[type="submit"] {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 14px 28px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color var(--t-med) var(--ease),
              transform var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  text-transform: uppercase;
  margin-top: 4px;
}

button[type="submit"]:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-tint);
}

button[type="submit"]:focus-visible {
  outline: none;
  box-shadow: var(--shadow-md), var(--ring);
}

.email-alt {
  margin-top: 24px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.email-alt a {
  color: var(--accent);
  text-decoration: none;
}

.email-alt a:hover { color: var(--accent-deep); text-decoration: underline; }

/* "After you submit" block on service pages */
.next-steps {
  margin-top: 36px;
  padding: 24px 28px;
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
}

.next-steps p { margin: 0 0 10px; }
.next-steps p strong { color: var(--ink); }
.next-steps ol { margin: 0 0 0 20px; }
.next-steps li { margin-bottom: 6px; }

/* ─── Footer ────────────────────────────────────────────────────────── */

footer {
  padding: 56px var(--gutter) 40px;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
  background: var(--paper);
  position: relative;
  z-index: 1;
}

footer .footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 28em;
}

.footer-brand .logo img {
  height: 40px;
  width: auto;
}

.footer-brand p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}

.footer-col h4 {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-transform: uppercase;
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

.footer-col a:hover { color: var(--accent); text-decoration: none; }

.footer-legal {
  max-width: var(--max-wide);
  margin: 40px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.footer-legal p { margin: 0; color: var(--ink-3); }

/* Legacy flat footer (for service pages that still use the simple format) */
footer:not(:has(.footer-inner)) {
  text-align: center;
  padding: 48px var(--gutter);
}

footer:not(:has(.footer-inner)) .footer-links {
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 0;
  max-width: var(--max-wide);
  margin-left: auto;
  margin-right: auto;
}

footer:not(:has(.footer-inner)) .footer-links a {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  text-transform: uppercase;
  text-decoration: none;
  margin: 0 12px;
  transition: color var(--t-fast) var(--ease);
}

footer:not(:has(.footer-inner)) .footer-links a:hover { color: var(--accent); }

footer:not(:has(.footer-inner)) > p {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-top: 6px;
}

/* ─── Motion ────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  #hero::before {
    animation: haloDrift 28s ease-in-out infinite alternate;
    transform-origin: center;
  }

  @keyframes haloDrift {
    0%   { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
    50%  { transform: translate(40px, 20px) rotate(3deg) scale(1.05); opacity: 0.9; }
    100% { transform: translate(-30px, 30px) rotate(-2deg) scale(1.02); opacity: 1; }
  }

  /* Scroll-driven entrance fades — supported browsers only */
  @supports (animation-timeline: view()) {
    .section-head,
    .service,
    .cases > div,
    .reasons > div,
    .audience-pair > div,
    details.faq-item {
      animation: fadeUp linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 50%;
    }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(14px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }
}

@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;
  }

  #hero::after { display: none; }
}

/* ─── Mobile ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  footer .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  nav { padding: 12px 18px; }
  nav .inner { grid-template-columns: 1fr auto; }
  nav .inner > * { min-width: 0; }
  nav .inner > :nth-child(2) { display: none; }
  nav .inner > :last-child { justify-self: end; }

  nav a.cta {
    padding: 10px 16px;
    font-size: 10px;
  }

  .logo img { max-width: 150px; height: auto; }

  section { padding: 64px 0; }

  section:not(:last-of-type)::after {
    margin: 64px auto 0;
  }

  #hero { padding: 72px 0 52px; }
  #hero::after { display: none; }

  .hero-brand,
  h1, h2, h3,
  .service-name,
  .case-title,
  .reason-title {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .btn { display: flex; justify-content: center; text-align: center; width: 100%; }

  .reasons  { grid-template-columns: 1fr; }
  .cost-lifecycle { grid-template-columns: 1fr; }
  .cost-monitor { grid-template-columns: 1fr; padding: 22px; gap: 24px; }
  .cost-monitor-col + .cost-monitor-col { padding-left: 0; padding-top: 24px; border-left: 0; border-top: 1px solid var(--rule); }
  .cost-example { padding: 18px 22px; }
  .audience-pair, .audience-single { grid-template-columns: 1fr; }
  .audience-pair > div, .audience-single > div { padding: 22px; }
  .cases    { grid-template-columns: 1fr; }
  .faq-list { grid-template-columns: 1fr; }

  /* Service cards — collapse internal grids */
  .service { padding: 28px 24px 24px; }
  .service::before { font-size: 64px; top: 16px; right: 18px; }
  .service-grid { grid-template-columns: 1fr; gap: 24px; }
  .service-qualifiers { grid-template-columns: 1fr; gap: 16px; }
  .service-q { grid-template-columns: 40px 1fr; gap: 12px; }
  .service-footer { flex-direction: column; align-items: stretch; gap: 20px; }
  .service-actions { flex-direction: column; align-items: stretch; }
  .service-actions .btn { width: 100%; justify-content: center; }
  .service-headline { font-size: clamp(20px, 5vw, 24px); }

  /* Step pattern — stack marker above body on mobile */
  .step { grid-template-columns: 1fr; gap: 8px; }
  .step::before { display: none; }
  .step-marker { padding-top: 0; }

  /* Pricing calculator — stack on mobile */
  .calculator { grid-template-columns: 1fr; padding: 22px; gap: 20px; }
  .calc-result { padding: 18px 20px; }
  .calc-row--total .calc-row-value { font-size: 24px; }
  .calc-option { padding: 14px 16px; }

  /* Pricing summary callout */
  .pricing-summary { grid-template-columns: 1fr; padding: 22px; text-align: left; }
  .pricing-summary-cta { justify-self: stretch; justify-content: center; }

  .case-title { padding-right: 0; }
  .case-status {
    position: static;
    align-self: flex-start;
    margin-top: 4px;
  }

  footer { padding: 40px 20px 28px; }
  footer .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-legal { flex-direction: column; align-items: flex-start; }

  #contact form,
  form#zyvra-contact-form {
    padding: 22px;
  }
}

@media (max-width: 400px) {
  nav a.cta {
    padding: 9px 13px;
    font-size: 9px;
  }
}
