/* ============================================================
   DATA DESIGN DYNAMICS — Design System
   Dark editorial. Premium boutique studio.
   ============================================================ */

/* === GOOGLE FONTS IMPORT === */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* === CSS CUSTOM PROPERTIES === */
:root {
  /* Colors */
  --bg:           #241C14;   /* warm dark brown */
  --bg-2:         #2E2418;   /* slightly lighter — sections, cards */
  --bg-3:         #38291C;   /* lightest dark — hover states, inputs */
  --border:       #4A3426;   /* warm brown borders */
  --border-light: #5E4432;   /* more visible borders */

  --text:         #EDE4D0;   /* warm beige cream — primary text */
  --text-muted:   #A89070;   /* warm tan — secondary text */
  --text-dim:     #6A5440;   /* very muted — placeholders, captions */

  --accent:       #8B72BE;   /* muted sophisticated purple */
  --accent-hover: #A088D4;   /* lighter purple on hover */
  --accent-dim:   #3A2860;   /* dark purple — subtle backgrounds */

  --white:        #F4EAD8;   /* warm beige near-white */

  /* Typography */
  --font-serif:   'DM Serif Display', Georgia, serif;
  --font-sans:    'DM Sans', system-ui, sans-serif;

  /* Type Scale */
  --text-xs:      0.8125rem; /* 13px */
  --text-sm:      0.9375rem; /* 15px */
  --text-base:    1.0625rem; /* 17px */
  --text-lg:      1.125rem;  /* 18px */
  --text-xl:      1.25rem;   /* 20px */
  --text-2xl:     1.5rem;    /* 24px */
  --text-3xl:     2rem;      /* 32px */
  --text-4xl:     2.75rem;   /* 44px */
  --text-5xl:     3.75rem;   /* 60px */
  --text-6xl:     5rem;      /* 80px */
  --text-7xl:     6.5rem;    /* 104px */

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;
  --space-40:  10rem;

  /* Layout */
  --container:     1200px;
  --container-sm:  760px;
  --radius-sm:     4px;
  --radius:        8px;
  --radius-lg:     16px;

  /* Transitions */
  --ease:          cubic-bezier(0.25, 0, 0.1, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --duration:      200ms;
  --duration-slow: 400ms;

  --bp-desktop: 1440px;
  --bp-laptop: 1200px;
  --bp-tablet: 768px;
  --bp-phablet: 430px;

  --section-pad-desktop: 8rem;
  --section-pad-tablet: 3.75rem;
  --section-pad-phone: 2.25rem;

  --fluid-h1: clamp(2.25rem, 5.2vw, 3.75rem);
  --fluid-h2: clamp(1.5rem, 3.2vw, 2.25rem);
  --fluid-body: clamp(1rem, 2.2vw, 1.0625rem);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--fluid-body);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

input, textarea, select {
  font: inherit;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
}

h1 { font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); line-height: 1.15; }
h3 { font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl)); line-height: 1.2; }
h4 { font-size: var(--text-xl); line-height: 1.3; letter-spacing: -0.01em; }

p {
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 65ch;
}

p.lead {
  font-size: var(--text-lg);
  color: var(--text);
  font-weight: 300;
}

strong { font-weight: 500; color: var(--text); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.5vw, 2rem);
}

.container-sm {
  width: 100%;
  max-width: var(--container-sm);
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.5vw, 2rem);
}

section {
  padding-block: clamp(4rem, 4vw, 8rem);
}

section.tight {
  padding-block: clamp(2.5rem, 3vw, 4rem);
}

/* ───────────────────────────────────────────────
   Angled section transitions — diagonal join line
   from upper-right to lower-left (52px tall on the
   right edge). Apply to any section that sits above
   a contrasting section to create the editorial
   asymmetric handoff used on the home page.
─────────────────────────────────────────────── */
.section-angle-bottom {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 52px), 0 100%);
  padding-bottom: calc(6rem + 52px);
}

.section-angle-bottom-reverse {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 52px));
  padding-bottom: calc(6rem + 52px);
}

@media (max-width: 768px) {
  .section-angle-bottom {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), 0 100%);
    padding-bottom: calc(3.75rem + 32px);
  }

  .section-angle-bottom-reverse {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 32px));
    padding-bottom: calc(3.75rem + 32px);
  }
}

section.flush {
  padding-block: 0;
}

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

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

/* === NAVIGATION === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding-block: var(--space-6);
  transition: background var(--duration-slow) var(--ease),
              padding var(--duration-slow) var(--ease);
}

.nav.scrolled {
  background: rgba(15, 11, 10, 0.92);
  backdrop-filter: blur(12px);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--border);
}

/* When the mobile menu is open, suppress backdrop-filter on the nav.
   backdrop-filter creates a new containing block which breaks
   position:fixed for descendants (.nav-links drawer would otherwise
   collapse into the shrunk nav bar instead of filling the viewport). */
.nav.scrolled:has(.nav-links.open) {
  backdrop-filter: none;
  background: var(--bg);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  color: var(--white);
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1.1;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-links > li {
  position: relative;
}

.nav-links a {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--duration) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

/* === SERVICES DROPDOWN (desktop) === */
.nav-has-dropdown > a .dropdown-caret {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transform-origin: 60% 60%;
  transition: transform var(--duration) var(--ease);
  margin-left: 2px;
  margin-top: -3px;
  opacity: 0.7;
}

.nav-has-dropdown:hover > a .dropdown-caret,
.nav-has-dropdown:focus-within > a .dropdown-caret {
  transform: rotate(225deg);
  opacity: 1;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + var(--space-4));
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 260px;
  padding: var(--space-3);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease),
              transform var(--duration) var(--ease),
              visibility 0s linear var(--duration);
  z-index: 1000;
}

/* Hover bridge so dropdown stays open while moving down */
.nav-has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: var(--space-5);
  pointer-events: none;
}

.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity var(--duration) var(--ease),
              transform var(--duration) var(--ease),
              visibility 0s linear 0s;
}

.nav-has-dropdown:hover::after,
.nav-has-dropdown:focus-within::after {
  pointer-events: auto;
}

.nav-dropdown li {
  list-style: none;
}

.nav-dropdown a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px var(--space-4);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease);
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible,
.nav-dropdown a.active {
  background: rgba(139, 114, 190, 0.12);
  color: var(--white);
  outline: none;
}

.nav-dropdown a .dropdown-sub {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-dim);
}

.nav-dropdown a:hover .dropdown-sub,
.nav-dropdown a:focus-visible .dropdown-sub,
.nav-dropdown a.active .dropdown-sub {
  color: var(--text-muted);
}

.nav-links a:focus-visible,
.nav-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.nav-cta {
  font-size: var(--text-xs) !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--white) !important;
  padding: var(--space-3) var(--space-6) !important;
  border: 1px solid var(--accent) !important;
  border-radius: var(--radius-sm) !important;
  white-space: nowrap !important;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease) !important;
}

.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--bg) !important;
}

.nav-cta-active {
  background: var(--accent) !important;
  color: var(--bg) !important;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  min-height: 44px;
  transition: color var(--duration) var(--ease),
              background-color var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  cursor: pointer;
}

.btn, td, th {
  overflow-wrap: break-word;
  word-break: break-word;
}

section { padding-block: var(--section-pad-desktop); }
@media (max-width: 768px) { section { padding-block: var(--section-pad-tablet); } }
@media (max-width: 430px) { section { padding-block: var(--section-pad-phone); } }

.compare-table, .compare-table * { min-width: 0 !important; }
.table-comparison-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 600px) {
  .table-comparison--stack,
  .table-comparison--stack thead,
  .table-comparison--stack tbody,
  .table-comparison--stack tr,
  .table-comparison--stack th,
  .table-comparison--stack td {
    display: block;
    width: 100%;
  }
  .table-comparison--stack tr {
    margin-bottom: var(--space-6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4);
    background: var(--bg-2);
  }
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding-inline: var(--space-4);
}

.btn-ghost:hover {
  color: var(--white);
}

/* === CARDS === */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2vw, 2rem);
  min-width: 0;
  transition: border-color var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.card-accent {
  border-top: 2px solid var(--accent);
}

/* === DIVIDERS === */
hr {
  border: none;
  border-top: 1px solid var(--border);
}

.section-divider {
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin-block: var(--space-6);
}

/* === TAGS / BADGES === */
.tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(139, 114, 190, 0.12);
  padding: var(--space-1) var(--space-3);
  border-radius: 100px;
}

/* === FORMS === */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input,
.form-textarea,
.form-select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  color: var(--text);
  font-size: var(--text-base);
  font-weight: 300;
  transition: border-color var(--duration) var(--ease);
  width: 100%;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-input:focus-visible,
.form-textarea:focus-visible,
.form-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-dim);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* === FOOTER === */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: var(--space-16);
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: var(--white);
}

.footer-links {
  display: flex;
  gap: var(--space-8);
}

.footer-links a {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--duration) var(--ease);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* === UTILITY === */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-white   { color: var(--white); }
.text-center  { text-align: center; }
.text-left    { text-align: left; }

.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

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

/* === SCROLL ANIMATION BASE === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out),
              transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === HAMBURGER (mobile) === */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-3);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Submenu toggle (mobile only — checkbox hidden, label rendered as + button) */
.nav-dropdown-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

.nav-dropdown-toggle {
  display: none;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: all var(--duration) var(--ease);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  :root {
    --text-7xl: 3.5rem;
    --text-6xl: 3rem;
    --text-5xl: 2.5rem;
  }

  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }

  .footer-links {
    flex-wrap: wrap;
    gap: var(--space-4);
  }

  .container,
  .container-sm {
    padding-inline: var(--space-5);
  }
}

/* === MOBILE NAV — hamburger triggers at 1023px === */
@media (max-width: 1023px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100%;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: calc(var(--space-20) + var(--space-8)) var(--space-6) var(--space-10);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links > li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-links > li:last-child {
    border-bottom: none;
    margin-top: var(--space-6);
  }

  .nav-links a {
    font-size: var(--text-lg);
    letter-spacing: 0.05em;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    transition: background var(--duration) var(--ease),
                color var(--duration) var(--ease);
  }

  .nav-links > li > a:hover,
  .nav-links > li > a:focus-visible,
  .nav-links > li > a.active {
    background: rgba(139, 114, 190, 0.12);
    color: var(--white);
    outline: none;
  }

  /* Hide desktop caret; dropdown expanded via toggle on mobile */
  .nav-has-dropdown > a .dropdown-caret {
    display: none;
  }

  /* Mobile nav dropdown — collapsed by default, expanded via toggle */
  .nav-dropdown,
  .nav-has-dropdown:hover .nav-dropdown,
  .nav-has-dropdown:focus-within .nav-dropdown {
    position: static;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 0 0 var(--space-3);
    min-width: 0;
    width: 100%;
    gap: 0;
    transition: none;
    display: none;
  }

  /* Expand when the toggle checkbox is checked */
  .nav-dropdown-toggle-input:checked ~ .nav-dropdown {
    display: flex;
  }

  /* Mobile submenu toggle button (the "+") */
  .nav-dropdown-toggle {
    display: inline-flex;
    position: absolute;
    top: 8px;
    right: var(--space-4);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    cursor: pointer;
    user-select: none;
    z-index: 2;
    border-radius: 50%;
    transition: transform var(--duration) var(--ease),
                background var(--duration) var(--ease);
  }

  .nav-dropdown-toggle::before,
  .nav-dropdown-toggle::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 2px;
  }
  .nav-dropdown-toggle::before { width: 14px; height: 2px; }
  .nav-dropdown-toggle::after  { width: 2px;  height: 14px; }

  .nav-dropdown-toggle:hover {
    background: rgba(139, 114, 190, 0.18);
  }

  /* Rotate the "+" 45° into an "×" when expanded */
  .nav-dropdown-toggle-input:checked ~ .nav-dropdown-toggle {
    transform: rotate(45deg);
  }

  .nav-dropdown a {
    font-size: var(--text-base);
    letter-spacing: 0.04em;
    text-transform: none;
    font-weight: 400;
    padding: var(--space-3) var(--space-4);
    min-height: 48px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    justify-content: center;
    text-align: center;
  }

  .nav-dropdown a .dropdown-sub {
    display: none;
  }

  .nav-has-dropdown::after {
    display: none;
  }

  /* Center the CTA on mobile */
  .nav-links > li:last-child {
    display: flex;
    justify-content: center;
  }

  .nav-links .nav-cta {
    text-align: center;
    justify-content: center;
    width: auto;
    min-width: 200px;
    padding: var(--space-4) var(--space-8) !important;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }
}

/* ---- Tablet landscape: keep 2-col on grids that would otherwise jump
   straight from 3-col desktop to 1-col mobile at 1080px. ---- */
@media (max-width: 1080px) and (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media (max-width: 480px) {
  h1 { font-size: clamp(2.5rem, 10vw, 3.5rem); }

  /* Allow logo wordmark to wrap on very small viewports */
  .nav-logo {
    white-space: normal;
    font-size: var(--text-xl);
  }

  /* Tighter footer link spacing for narrow screens */
  .footer-links {
    gap: var(--space-3);
  }

  /* Body-level form labels and dense text scale down */
  .form-label {
    font-size: var(--text-xs);
  }
}

/* === LIGHT SECTION THEME === */
/* Apply .section-light to any section for the beige/taupe alternating treatment */
.section-light {
  --bg:           #EFE4CC;   /* warm sandy beige */
  --bg-2:         #E3D5B8;   /* slightly deeper beige — cards, nested bg */
  --bg-3:         #D6C6A2;   /* deeper beige — hover states */
  --border:       #C4AD88;   /* warm tan border */
  --border-light: #A8906C;   /* more visible tan border */

  --white:        #2C1E0F;   /* rich dark brown — headings */
  --text:         #3C2C18;   /* warm dark brown — primary text */
  --text-muted:   #6B5038;   /* medium warm brown — secondary text */
  --text-dim:     #9A7A58;   /* muted warm brown — placeholders, captions */

  background-color: var(--bg);
}

/* Buttons inside light sections */
.section-light .btn-outline {
  color: var(--white);
  border-color: var(--border-light);
}

.section-light .btn-outline:hover {
  border-color: var(--white);
  background: rgba(0,0,0,0.06);
}

/* === OPTION B: LIGHT INSET ELEMENTS === */
/* Use .inset-light on cards/panels inside dark sections */
.inset-light {
  background: #EFE4CC;
  border-color: #C4AD88;
}

.inset-light h4,
.inset-light .value-card-number {
  color: #2C1E0F;
}

.inset-light p {
  color: #6B5038;
}

.inset-light:hover {
  border-color: #A8906C;
  background: #E3D5B8;
}

/* === SHARED NAV JS SCROLL BEHAVIOR === */
/* Applied via nav.js inline script in each page */


/* ================================================================
   === PRE-LAUNCH UTILITIES ===
   Appended for pre-launch polish. Page agents may opt into these
   utilities by adding the class names below to existing markup.
   No existing rules above were modified.
   ================================================================ */

/* ----------------------------------------------------------------
   1. WARMER MID-TONE DARK SECTION
   Swap onto sections that currently feel "harsh/cold" — gives a
   warmer brown that reads premium without losing the dark theme.
   Locally overrides --bg / --bg-2 / --bg-3 so descendants (cards,
   inputs, .text-muted, etc.) automatically restyle.
---------------------------------------------------------------- */
.section-warm-dark {
  --bg:           #241C14;   /* matches About dark — global brand dark */
  --bg-2:         #2E2418;   /* card surface inside warm-dark */
  --bg-3:         #38291C;   /* hover / input surface */
  --border:       #4A3624;   /* warm border that reads on dark bg */
  --border-light: #6A4C32;   /* visible border / divider */

  --text:         #F2E9D4;   /* keep premium cream */
  --text-muted:   #C4A87E;   /* lifted muted tone for contrast */
  --text-dim:     #8B6E4C;   /* placeholder / caption */

  background-color: var(--bg);
  color: var(--text);
}

.section-warm-dark h1,
.section-warm-dark h2,
.section-warm-dark h3,
.section-warm-dark h4,
.section-warm-dark h5,
.section-warm-dark h6 {
  color: var(--white);
}

.section-warm-dark p {
  color: var(--text-muted);
}

.section-warm-dark .text-muted { color: var(--text-muted); }
.section-warm-dark .text-white { color: var(--white); }
.section-warm-dark .eyebrow    { color: var(--accent-hover); }

/* Smooth handoff between a light section and a warm-dark section
   (and the inverse) — subtle inner-edge treatment, no harsh cut. */
.section-light + .section-warm-dark {
  box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.18);
}

.section-warm-dark + .section-light {
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
}

/* ----------------------------------------------------------------
   2. SPLIT CTA SECTION (left-aligned, two-column)
   Eyebrow + heading on left; supporting paragraph + buttons on
   right. Stacks on mobile, still left-aligned.
---------------------------------------------------------------- */
.cta-section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-8);
  text-align: left;
}

.cta-section-split__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.cta-section-split__right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
}

.cta-section-split__right p {
  max-width: 48ch;
}

.cta-section-split__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* Larger, more prominent eyebrow in this layout while preserving
   the .eyebrow typography. Apply both .eyebrow and .eyebrow--lg. */
.cta-section-split .eyebrow,
.eyebrow--lg {
  font-size: var(--text-sm);
  letter-spacing: 0.22em;
}

.cta-section-split h2 {
  margin: 0;
}

@media (max-width: 1080px) {
  .cta-section-split {
    gap: var(--space-10);
  }
}

@media (max-width: 768px) {
  .cta-section-split {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: left;
  }

  .cta-section-split__left,
  .cta-section-split__right {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .cta-section-split {
    padding-inline: var(--space-5);
  }

  .cta-section-split__actions {
    width: 100%;
  }

  .cta-section-split__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* ----------------------------------------------------------------
   3. HERO TWO-LINE HEADING UTILITY
   Use on hero <h1> elements that contain an explicit <br>. Keeps
   the two-line shape predictable across breakpoints.
---------------------------------------------------------------- */
.hero-twoline {
  text-wrap: balance;
  max-width: 18ch;
  line-height: 1.05;
  margin-inline: auto;
}

.hero-twoline--short {
  max-width: 14ch;
}

/* Ensure explicit <br> renders predictably on all breakpoints */
.hero-twoline br {
  display: block;
  content: "";
}

@media (max-width: 1080px) {
  .hero-twoline {
    max-width: 20ch;
  }
  .hero-twoline--short {
    max-width: 16ch;
  }
}

@media (max-width: 768px) {
  .hero-twoline,
  .hero-twoline--short {
    max-width: none;
    line-height: 1.08;
  }
}

@media (max-width: 480px) {
  .hero-twoline,
  .hero-twoline--short {
    line-height: 1.1;
  }
}

/* ----------------------------------------------------------------
   4. RESPONSIVE COMPARISON TABLE
   Fixed layout, equal columns, all columns wrap consistently
   (fixes col-1-no-wrap bug). Pair with .table-comparison-wrap for
   horizontal-scroll safety on very narrow viewports.
---------------------------------------------------------------- */
.table-comparison-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}

.table-comparison {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text);
}

.table-comparison th,
.table-comparison td {
  width: 1%;                       /* equal column widths under fixed layout */
  padding: var(--space-4) var(--space-5);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  word-wrap: break-word;
  overflow-wrap: anywhere;          /* col 1 wraps the same as 2/3 */
  word-break: normal;
  hyphens: auto;
}

.table-comparison thead th {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--border-light);
  background: transparent;
}

.table-comparison tbody tr:last-child th,
.table-comparison tbody tr:last-child td {
  border-bottom: none;
}

.table-comparison tbody th {
  font-weight: 500;
  color: var(--white);
}

@media (max-width: 768px) {
  .table-comparison {
    font-size: var(--text-xs);
  }
  .table-comparison th,
  .table-comparison td {
    padding: var(--space-3) var(--space-4);
  }
}

/* Optional stacked-card view at very small viewports. Apply
   .table-comparison--stack to opt in; otherwise the wrapper's
   horizontal scroll handles overflow. */
@media (max-width: 480px) {
  .table-comparison--stack,
  .table-comparison--stack thead,
  .table-comparison--stack tbody,
  .table-comparison--stack tr,
  .table-comparison--stack th,
  .table-comparison--stack td {
    display: block;
    width: 100%;
  }

  .table-comparison--stack thead {
    position: absolute;
    left: -9999px;
    top: -9999px;
  }

  .table-comparison--stack tr {
    margin-bottom: var(--space-6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4);
    background: var(--bg-2);
  }

  .table-comparison--stack td,
  .table-comparison--stack th {
    border-bottom: 1px solid var(--border);
    padding: var(--space-3) 0;
  }

  .table-comparison--stack tr > *:last-child {
    border-bottom: none;
  }
}

/* ----------------------------------------------------------------
   5. BRAND MARQUEE / SCROLLING WORD STRIP
   Subtle, slow horizontal marquee with edge-fade masks. Runs
   continuously on all pages (no pause on hover). Honors
   prefers-reduced-motion (static centered layout).
---------------------------------------------------------------- */
.brand-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-block: var(--space-6);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 12%,
    #000 88%,
    transparent 100%
  );
          mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 12%,
    #000 88%,
    transparent 100%
  );
}

.brand-marquee__track {
  display: inline-flex;
  align-items: center;
  gap: var(--space-12);
  white-space: nowrap;
  will-change: transform;
  animation: brand-marquee-scroll 30s linear infinite;
}

.brand-marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-serif);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.brand-marquee__item::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: var(--space-12);
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  vertical-align: middle;
}

.brand-marquee__item:last-child::after {
  margin-left: 0;
}

@keyframes brand-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .brand-marquee__track {
    gap: var(--space-8);
    animation-duration: 24s;
  }
  .brand-marquee__item::after {
    margin-left: var(--space-8);
  }
}

@media (max-width: 480px) {
  .brand-marquee {
    padding-block: var(--space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-marquee {
    -webkit-mask-image: none;
            mask-image: none;
    overflow: visible;
  }
  .brand-marquee__track {
    animation: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
    white-space: normal;
  }
  .brand-marquee__item::after {
    margin-left: var(--space-4);
  }
}

/* ----------------------------------------------------------------
   6. WARM DIVIDER (replacement visual for clip-path angle)
   Tasteful gradient fade + thin accent ornamental line. Apply on
   a section to separate it from the next without a hard cut.
   .section-angle-bottom is intentionally preserved above.
---------------------------------------------------------------- */
.section-warm-divider {
  position: relative;
}

.section-warm-divider::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(36, 28, 20, 0.0) 40%,
    rgba(36, 28, 20, 0.35) 100%
  );
}

.section-warm-divider::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: var(--space-8);
  transform: translateX(-50%);
  width: 56px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--accent) 50%,
    transparent 100%
  );
  opacity: 0.7;
  pointer-events: none;
}

@media (max-width: 768px) {
  .section-warm-divider::after {
    height: 64px;
  }
  .section-warm-divider::before {
    width: 40px;
    bottom: var(--space-5);
  }
}

/* ----------------------------------------------------------------
   7. ITALIC ACCENT HELPER
   Inline span: serif italic in --accent purple. For words like
   "you work." in the Build Packages hero.
---------------------------------------------------------------- */
.italic-accent {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

/* ----------------------------------------------------------------
   8. NO-ORPHAN TEXT UTILITY
   text-wrap: pretty for body paragraphs so trailing words don't
   get cut off / orphaned on narrow screens.
---------------------------------------------------------------- */
.no-orphan {
  text-wrap: pretty;
}

/* ----------------------------------------------------------------
   9. GLOBAL RESPONSIVE SAFETY NETS (pre-launch)
   Prevent any inline width, oversized image, or long URL/word
   from triggering horizontal scroll at narrow viewports.
---------------------------------------------------------------- */
img, svg, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

body, main, section, header, footer, article, aside {
  max-width: 100%;
}

/* Grid/flex children should be allowed to shrink below content size
   to avoid overflow from long URLs, code, or pasted content. */
.grid-2 > *,
.grid-3 > *,
.form-group,
.form-row-2 > * {
  min-width: 0;
}

/* ----------------------------------------------------------------
   10. CRED STRIP — collapse vertical dividers below tablet
   Dividers float orphaned to their own line when the cred-inner
   wraps below ~900px; hide them and let gaps do the work.
---------------------------------------------------------------- */
@media (max-width: 900px) {
  .cred-divider { display: none; }
  .cred-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-6);
    row-gap: var(--space-8);
    justify-items: center;
    align-items: start;
    text-align: center;
  }
  .cred-item {
    flex: initial;
    align-items: center;
    min-width: 0;
  }
  .cred-num {
    font-size: clamp(1.1rem, 4.4vw, 2rem);
    text-align: center;
    white-space: nowrap;
  }
  .cred-label {
    text-align: center;
  }
}

/* ----------------------------------------------------------------
   11. INTAKE FORM RESPONSIVE OVERRIDES (pre-launch)
   Loaded BEFORE per-page embedded styles, so these are baseline
   defaults; embedded blocks may further refine. Keep specificity
   low — embedded styles win ties.
---------------------------------------------------------------- */
@media (max-width: 768px) {
  .form-row-2 {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .intake-hero {
    padding-top: var(--space-24);
    padding-bottom: var(--space-12);
  }
  .form-section,
  .intake-form-footer {
    padding: var(--space-8) var(--space-7);
  }
}

@media (max-width: 640px) {
  .intake-hero {
    padding-top: var(--space-20);
  }
  .form-section,
  .intake-form-footer {
    padding: var(--space-8) var(--space-6);
  }
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
  .intake-submit-btn {
    width: 100%;
    padding: var(--space-5) var(--space-6);
    justify-content: center;
  }
  .intake-form-footer {
    align-items: stretch;
  }
}

/* Color swatch touch target + label readability (build intakes) */
.color-swatch-ring {
  min-width: 44px;
  min-height: 44px;
}

.color-swatch-label {
  font-size: var(--text-xs);
}

/* "Need help?" sidebar note — promote to visible on mobile so
   the support email remains reachable when sidebar is hidden. */
@media (max-width: 900px) {
  .intake-sidebar {
    display: block !important;
    position: static;
    order: 2;
    margin-top: var(--space-10);
  }
  .intake-sidebar > *:not(.intake-sidebar-note) {
    display: none;
  }
  .intake-sidebar-note {
    margin-top: 0;
  }
}

/* ================================================================
   HOMEPAGE — PROCESS BLOCK (nested in Services / Section 3)
   Scoped to .services-section .process-block only. Beige inset
   cards on the light services-section background, matching the
   inset-light / cred-strip beige palette already used site-wide.
   ================================================================ */
.services-section .process-block {
  margin-top: var(--space-10);
  padding-top: var(--space-4);
  border-top: 0;
}

.services-section .process-block-header {
  margin-bottom: var(--space-10);
  max-width: 56ch;
}

.services-section .process-block-header .eyebrow {
  color: #8B72BE;
}

.services-section .process-block-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 4vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #2C1E0F;
  margin-top: var(--space-3);
}

.services-section .process-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.services-section .process-row {
  display: grid;
  grid-template-columns: clamp(80px, 11vw, 130px) 1fr;
  gap: var(--space-8);
  align-items: start;
  padding: var(--space-8) var(--space-8);
  background: #E3D5B8;
  border: 1px solid #A8906C;
  border-radius: var(--radius-lg);
  transition:
    background 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.services-section .process-row:hover {
  background: #E3D5B8;
  border-color: #8B72BE;
  box-shadow:
    0 0 0 1px rgba(139, 114, 190, 0.55),
    0 18px 40px -22px rgba(110, 85, 160, 0.45);
  transform: translateY(-2px);
}

.services-section .process-row:hover .process-content h4 {
  color: #4A2E72;
}

.services-section .process-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  color: #8B72BE;
  opacity: 0.85;
  line-height: 0.9;
  letter-spacing: -0.04em;
  padding-top: var(--space-1);
  padding-left: var(--space-4);
  user-select: none;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.services-section .process-row:hover .process-num {
  opacity: 1;
  color: #6E55A0;
}

.services-section .process-content h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: #2C1E0F;
  margin-bottom: var(--space-2);
  padding-top: var(--space-2);
}

.services-section .process-content p {
  font-size: var(--text-base);
  color: #6B5038;
  line-height: 1.65;
  max-width: 56ch;
}

/* Stagger reveal so the rows cascade in. */
.services-section .process-row:nth-of-type(1).reveal { transition-delay: 0ms; }
.services-section .process-row:nth-of-type(2).reveal { transition-delay: 90ms; }
.services-section .process-row:nth-of-type(3).reveal { transition-delay: 180ms; }
.services-section .process-row:nth-of-type(4).reveal { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  .services-section .process-row.reveal { transition-delay: 0ms !important; }
  .services-section .process-row:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .services-section .process-block {
    margin-top: var(--space-16);
    padding-top: var(--space-12);
  }
  .services-section .process-row {
    grid-template-columns: clamp(60px, 15vw, 80px) 1fr;
    gap: var(--space-5);
    padding: var(--space-6) var(--space-6);
  }
}
