/* TreadChain marketing site — shared styles */

/* Five named palettes — a deliberate mix of dark and light modes, not just accent-
   color swaps. Variable NAMES stay fixed across every theme (--rust/--rust-light/
   --steel/--heading etc.) so the rest of this file never needs to know which theme
   or which mode (light/dark) is active — only the values change, per data-theme on
   <html>. "rust" is the default (no data-theme attribute needed). --heading is the
   near-white (dark mode) or near-black (light mode) color for headings and other
   full-contrast text; --ink-rgb/--overlay-rgb are the RGB triplets of --ink and of
   the "lighten to elevate" overlay direction, needed wherever a plain hex can't be
   wrapped in rgba() for translucency (sticky header, zebra striping, even-section
   tint). Each theme tints its own ground neutral toward its accent's hue family
   rather than reusing one grey everywhere. */
:root {
  /* Rust & Steel — dark, industrial warehouse */
  --rust: #c1603a;
  --rust-light: #e0925f;
  --steel: #6e8583;
  --rust-rgb: 193, 96, 58;
  --steel-rgb: 110, 133, 131;
  --ink: #14120f;
  --ink-rgb: 20, 18, 15;
  --ink-soft: #1e1b17;
  --charcoal: #2a2622;
  --paper: #f2ede3;
  --paper-dim: #ded4c3;
  --heading: #ffffff;
  --line: rgba(242, 237, 227, 0.12);
  --overlay-rgb: 255, 255, 255;
  --max-width: 1120px;
  --radius: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* Racing Green & Brass — light mode, parchment & automotive heritage */
:root[data-theme="racing-green"] {
  --rust: #2f6b4f;
  --rust-light: #1f6b46;
  --steel: #8a6d2f;
  --rust-rgb: 47, 107, 79;
  --steel-rgb: 138, 109, 47;
  --ink: #f7f5ef;
  --ink-rgb: 247, 245, 239;
  --ink-soft: #eeebe1;
  --charcoal: #e3ddcd;
  --paper: #1a221c;
  --paper-dim: #5b6a60;
  --heading: #10160f;
  --line: rgba(16, 24, 18, 0.12);
  --overlay-rgb: 0, 0, 0;
}

/* Steel Blue & Chrome — light mode, clean precision engineering */
:root[data-theme="steel-blue"] {
  --rust: #3d6fa8;
  --rust-light: #2c5686;
  --steel: #6b7680;
  --rust-rgb: 61, 111, 168;
  --steel-rgb: 107, 118, 128;
  --ink: #f4f6f8;
  --ink-rgb: 244, 246, 248;
  --ink-soft: #e7ebef;
  --charcoal: #dbe1e6;
  --paper: #10161c;
  --paper-dim: #57626b;
  --heading: #0b1116;
  --line: rgba(10, 20, 30, 0.12);
  --overlay-rgb: 0, 0, 0;
}

/* Midnight Amber & Hazard — dark, road-safety, night warehouse */
:root[data-theme="midnight-amber"] {
  --rust: #d99a2b;
  --rust-light: #f0bc5e;
  --steel: #4a5568;
  --rust-rgb: 217, 154, 43;
  --steel-rgb: 74, 85, 104;
  --ink: #0e1016;
  --ink-rgb: 14, 16, 22;
  --ink-soft: #171a22;
  --charcoal: #22262f;
  --paper: #f2f0e8;
  --paper-dim: #d6d2c2;
  --heading: #ffffff;
  --line: rgba(242, 240, 232, 0.12);
  --overlay-rgb: 255, 255, 255;
}

/* Graphite & Crimson — dark, bold brand-forward red */
:root[data-theme="graphite-crimson"] {
  --rust: #b8302f;
  --rust-light: #de5f5c;
  --steel: #7a7f85;
  --rust-rgb: 184, 48, 47;
  --steel-rgb: 122, 127, 133;
  --ink: #121213;
  --ink-rgb: 18, 18, 19;
  --ink-soft: #1c1c1e;
  --charcoal: #28282a;
  --paper: #f1f0ef;
  --paper-dim: #d4d2d0;
  --heading: #ffffff;
  --line: rgba(241, 240, 239, 0.12);
  --overlay-rgb: 255, 255, 255;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Smooth color swap on theme change for everything that doesn't already
   define its own transition (more specific rules below win as normal). */
*, *::before, *::after {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  color: var(--heading);
}

p { margin: 0 0 1em; color: var(--paper-dim); }

a { color: var(--rust-light); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(var(--ink-rgb), 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  /* Wider than the content .container on purpose — the logo, 9 links, 5
     theme swatches, and CTA need more than 1120px to sit in one row. */
  max-width: 1600px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--heading);
  flex: none;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.brand-word { letter-spacing: 0.01em; }

/* Hamburger toggle — hidden on wide screens, shown once the collapsed
   nav breakpoint kicks in below. */
.nav-toggle {
  display: none;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--heading);
  border-radius: 2px;
}
.nav-toggle:hover { border-color: var(--rust-light); }
.nav-toggle:focus-visible {
  outline: 2px solid var(--rust-light);
  outline-offset: 2px;
}

/* Everything right of the brand — links, theme switch, CTA. Stays inline
   on desktop; becomes a dropdown panel once .nav-toggle takes over. */
.nav-collapse {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--paper-dim);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-links a.active,
.nav-links a:hover { color: var(--heading); text-decoration: none; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rust-light), var(--rust));
  color: #1a1310 !important;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  flex: none;
  box-shadow: 0 8px 20px rgba(var(--rust-rgb), 0.25);
}
.nav-cta:hover { text-decoration: none; filter: brightness(1.08); }

/* Below this width the full row (logo + 9 links + 5 swatches + CTA) no
   longer fits without crowding, so it collapses into a hamburger-driven
   dropdown instead of wrapping mid-header. */
@media (max-width: 1440px) {
  .nav-toggle { display: flex; }

  .nav-collapse {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    background: var(--ink-soft);
    border-bottom: 1px solid var(--line);
    padding: 20px 24px 28px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
  }
  .nav-collapse.open { display: flex; }

  .nav-links { flex-direction: column; gap: 14px; }
  .theme-switch, .nav-cta { align-self: flex-start; }
}

/* ---------- Theme switcher ---------- */

.theme-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.theme-switch button {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.theme-switch button:hover { transform: scale(1.18); }
.theme-switch button.active {
  border-color: var(--heading);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 0 0 4px rgba(var(--overlay-rgb), 0.18);
}
.theme-switch button:focus-visible {
  outline: 2px solid var(--rust-light);
  outline-offset: 2px;
}

.theme-switch button[data-set-theme="rust"] { background: linear-gradient(135deg, #e0925f, #c1603a); }
.theme-switch button[data-set-theme="racing-green"] { background: linear-gradient(135deg, #5a9b78, #2f6b4f); }
.theme-switch button[data-set-theme="steel-blue"] { background: linear-gradient(135deg, #6f9bd1, #3d6fa8); }
.theme-switch button[data-set-theme="midnight-amber"] { background: linear-gradient(135deg, #f0bc5e, #d99a2b); }
.theme-switch button[data-set-theme="graphite-crimson"] { background: linear-gradient(135deg, #de5f5c, #b8302f); }

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

.hero {
  padding: 96px 0 80px;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(var(--rust-rgb), 0.25), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(var(--steel-rgb), 0.15), transparent 50%);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--rust);
  border-radius: 999px;
  color: var(--rust-light);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  max-width: 820px;
  line-height: 1.15;
}

.hero .lede {
  max-width: 640px;
  font-size: 1.15rem;
  color: var(--paper-dim);
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rust-light), var(--rust));
  color: #1a1310;
}
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--rust-light); color: var(--heading); text-decoration: none; }

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

section { padding: 72px 0; }

.section-head {
  max-width: 680px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.section-head p { font-size: 1.05rem; }

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Cards / grids ---------- */

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

.card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(var(--rust-rgb),0.25), rgba(var(--steel-rgb),0.10));
  border: 1px solid rgba(var(--rust-rgb),0.35);
  margin-bottom: 18px;
  font-size: 1.3rem;
}

.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* ---------- Dealer-tier strip ---------- */

.spirit-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.spirit-chip {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  background: var(--charcoal);
  text-align: center;
}

.spirit-chip .glyph { font-size: 1.8rem; margin-bottom: 8px; }
.spirit-chip h4 { margin: 0 0 6px; font-size: 1.05rem; }
.spirit-chip p { font-size: 0.85rem; margin: 0; }

/* ---------- Process steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: stretch;
}

.step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  background: var(--ink-soft);
  position: relative;
}

.step .num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--rust);
  color: #1a1310;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.step h4 { font-size: 0.98rem; margin-bottom: 6px; }
.step p { font-size: 0.82rem; margin: 0; }

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stats .num {
  font-family: Georgia, serif;
  font-size: 2.2rem;
  color: var(--rust-light);
  font-weight: 700;
}
.stats .label { font-size: 0.9rem; color: var(--paper-dim); }

/* ---------- Quote ---------- */

.quote {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 0;
}
.quote blockquote {
  font-family: Georgia, serif;
  font-size: 1.4rem;
  color: var(--heading);
  margin: 0 0 16px;
  font-style: italic;
}
.quote cite { color: var(--rust-light); font-style: normal; font-size: 0.9rem; }

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

.cta-band {
  background: linear-gradient(135deg, rgba(var(--rust-rgb),0.18), rgba(var(--steel-rgb),0.08));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band .btn { margin-top: 20px; }

/* ---------- Pricing ---------- */

.price-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  background: var(--ink-soft);
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--rust);
  box-shadow: var(--shadow);
  position: relative;
}
.price-card.featured::before {
  content: "Most Popular";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rust);
  color: #1a1310;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}
.price-card h3 { font-size: 1.3rem; }
.price-card .tagline { color: var(--rust-light); font-size: 0.85rem; margin-bottom: 18px; }
.price-card ul { list-style: none; margin: 0 0 28px; padding: 0; flex: 1; }
.price-card li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
  color: var(--paper-dim);
}
.price-card li:last-child { border-bottom: none; }

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

.form-wrap {
  max-width: 640px;
  margin: 0 auto;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}

.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 0.85rem;
  color: var(--paper-dim);
  margin-bottom: 6px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.95rem;
  font-family: inherit;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--rust-light);
}
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.contact-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  text-align: center;
}
.contact-info .card h3 { font-size: 1rem; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  color: var(--paper-dim);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 {
  color: var(--heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--paper-dim); font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}

/* ---------- Page header (non-home pages) ---------- */

.page-header {
  padding: 64px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% -20%, rgba(var(--rust-rgb),0.18), transparent 60%);
}
.page-header .eyebrow { margin-bottom: 16px; }
.page-header h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-header p { max-width: 620px; margin: 12px auto 0; font-size: 1.05rem; }

/* ---------- Feature detail rows ---------- */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0;
}
.feature-row:not(:last-child) { border-bottom: 1px solid var(--line); }
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }

.feature-visual {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--charcoal), var(--ink-soft));
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--rust-light);
}

.feature-copy h2 { font-size: 1.6rem; }
.feature-copy ul { padding-left: 20px; color: var(--paper-dim); }
.feature-copy li { margin-bottom: 8px; }

/* ---------- How It Works: jump-nav ---------- */

.spirit-jumpnav {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.spirit-jumpnav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 600;
}
.spirit-jumpnav a:hover {
  border-color: var(--rust-light);
  color: var(--heading);
  text-decoration: none;
}

/* ---------- How It Works: per-stage section ---------- */

.craft-section {
  padding: 72px 0;
  scroll-margin-top: 90px;
}
.craft-section:not(:last-of-type) { border-bottom: 1px solid var(--line); }
.craft-section:nth-of-type(even) {
  background: linear-gradient(180deg, rgba(var(--overlay-rgb),0.03), transparent);
}

.craft-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.craft-header .glyph-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, rgba(var(--rust-rgb),0.28), rgba(var(--steel-rgb),0.10));
  border: 1px solid rgba(var(--rust-rgb),0.35);
}
.craft-header h2 { margin-bottom: 4px; font-size: 1.9rem; }
.craft-header .craft-tagline { color: var(--rust-light); font-size: 0.95rem; margin: 0; }

.craft-at-a-glance {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}
.craft-at-a-glance .fact {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--ink-soft);
}
.craft-at-a-glance .fact .k {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--paper-dim);
  margin-bottom: 4px;
}
.craft-at-a-glance .fact .v {
  font-family: Georgia, serif;
  color: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.craft-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: craftstep;
}
.craft-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  position: relative;
  padding-bottom: 32px;
}
.craft-step:last-child { padding-bottom: 0; }
.craft-step::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.craft-step:last-child::before { display: none; }

.craft-step .num {
  counter-increment: craftstep;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rust-light), var(--rust));
  color: #1a1310;
  font-family: Georgia, serif;
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  z-index: 1;
}
.craft-step .num::before { content: counter(craftstep); }

.craft-step h3 { font-size: 1.15rem; margin-bottom: 6px; }
.craft-step p { margin-bottom: 0; font-size: 0.95rem; }

.craft-callout {
  margin-top: 40px;
  border: 1px dashed var(--rust);
  border-radius: var(--radius);
  padding: 20px 24px;
  background: rgba(var(--rust-rgb), 0.08);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.craft-callout .glyph { font-size: 1.4rem; flex: none; }
.craft-callout p { margin-bottom: 0; font-size: 0.92rem; color: var(--paper-dim); }
.craft-callout strong { color: var(--heading); }

/* ---------- Data tables (Modules, Platform) ---------- */

/* Table content has a real minimum width (long descriptions, wide key-fields
   column); below that width it scrolls sideways inside its own wrapper
   instead of forcing the whole page wider than the viewport — the latter is
   what makes mobile browsers zoom the entire page out. */
.table-scroll, .role-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  margin-bottom: 32px;
  font-size: 0.92rem;
}
.data-table th {
  background: var(--ink-soft);
  color: var(--heading);
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 2px solid var(--rust);
}
.data-table td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--paper-dim);
}
.data-table tr:nth-child(even) td { background: rgba(var(--overlay-rgb),0.03); }
.data-table td strong { color: var(--heading); }

/* ---------- Flow chain (module pipelines) ---------- */

.flow-chain {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.flow-chain .fstep {
  background: var(--ink-soft);
  border: 1px solid var(--rust);
  color: var(--heading);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 16px;
  border-radius: 8px;
}
.flow-chain .farrow { color: var(--rust-light); font-weight: 700; font-size: 1.1rem; }

/* ---------- Worked example callout ---------- */

.example-callout {
  border: 1.5px dashed var(--rust);
  border-radius: var(--radius);
  padding: 24px 28px;
  background: rgba(var(--rust-rgb), 0.06);
  margin-bottom: 32px;
}
.example-callout .ribbon {
  display: inline-block;
  background: var(--ink);
  border: 1px solid var(--rust);
  color: var(--rust-light);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.example-callout p { margin-bottom: 0; font-size: 0.95rem; }
.example-callout .mono {
  font-family: "Courier New", monospace;
  background: rgba(var(--overlay-rgb),0.08);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--heading);
  font-size: 0.88rem;
}
.example-callout .result { color: var(--rust-light); font-weight: 700; }

/* ---------- Module section wrapper (mirrors craft-section) ---------- */

.module-section {
  padding: 72px 0;
  scroll-margin-top: 90px;
}
.module-section:not(:last-of-type) { border-bottom: 1px solid var(--line); }
.module-section:nth-of-type(even) {
  background: linear-gradient(180deg, rgba(var(--overlay-rgb),0.03), transparent);
}

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

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 48px;
}
.faq-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.faq-item .q {
  font-family: Georgia, serif;
  font-size: 1.05rem;
  color: var(--heading);
  margin-bottom: 8px;
  font-weight: 700;
}
.faq-item .q::before { content: "Q. "; color: var(--rust-light); }
.faq-item .a { font-size: 0.92rem; margin-bottom: 0; }

/* ---------- Roles table wrapper ---------- */

.role-table-wrap { margin-bottom: 32px; }

/* ---------- Case studies / testimonials ---------- */

.testimonial-card { display: flex; flex-direction: column; }
.testimonial-card .stars { color: var(--rust-light); font-size: 0.9rem; margin-bottom: 14px; letter-spacing: 2px; }
.testimonial-card blockquote {
  margin: 0 0 20px;
  font-family: Georgia, serif;
  font-size: 1.02rem;
  font-style: italic;
  color: var(--paper);
  flex: 1;
}
.testimonial-card .person { display: flex; align-items: center; gap: 12px; }
.testimonial-card .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--rust-light), var(--rust));
  color: #1a1310;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 0.95rem;
}
.testimonial-card .name { color: var(--heading); font-weight: 700; font-size: 0.92rem; }
.testimonial-card .role { font-size: 0.8rem; color: var(--paper-dim); }

.case-study-card { display: flex; flex-direction: column; }
.case-study-card .tag {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--rust);
  color: var(--rust-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.case-study-card h3 { font-size: 1.2rem; }
.case-study-card .metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}
.case-study-card .metrics .num {
  font-family: Georgia, serif;
  color: var(--rust-light);
  font-size: 1.35rem;
  font-weight: 700;
}
.case-study-card .metrics .label {
  font-size: 0.7rem;
  color: var(--paper-dim);
  letter-spacing: 0.02em;
}

.disclosure-note {
  max-width: 760px;
  margin: 40px auto 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--paper-dim);
  padding: 16px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

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

.footer-address {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--paper-dim);
  line-height: 1.6;
}

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

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .spirit-strip { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(1, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; direction: ltr; }
  .contact-info { grid-template-columns: 1fr; }
  .form-two { grid-template-columns: 1fr; }
  .craft-at-a-glance { grid-template-columns: repeat(2, 1fr); }
  .faq-grid { grid-template-columns: 1fr; }
  .data-table { font-size: 0.85rem; }
  .data-table th, .data-table td { padding: 10px 12px; }
}

@media (max-width: 520px) {
  .craft-step { grid-template-columns: 40px 1fr; gap: 14px; }
  .craft-step .num { width: 40px; height: 40px; font-size: 1rem; }
  .craft-step::before { left: 19px; top: 40px; }
}

@media (max-width: 640px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
}
