/* ==========================================================================
   ISA — Nearshore Staffing Authority
   Design System: Confident Authority (adapted for B2B staffing marketplace)
   Palette: Midnight Teal + Burnished Amber on Warm Sand
   ========================================================================== */

/* --- CUSTOM PROPERTIES --- */
:root {
  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* Palette — from approved vision */
  --color-primary: #0C2E3B;
  --color-accent: #C8792A;
  --color-accent-hover: #A8621E;
  --color-bg: #F6F4EF;
  --color-text: #1C1F21;
  --color-text-secondary: #5C6166;
  --color-text-muted: #8A8E93;
  --color-text-on-dark: #F0EDE6;
  --color-text-muted-on-dark: #A3A09A;
  --color-border-light: #DDD9D1;
  --color-border-dark: #1A4354;
  --color-overlay: rgba(12, 46, 59, 0.12);

  /* Surface tokens — structured surfaces from vision */
  --surface-sand-bg: #F6F4EF;
  --surface-sand-text: #1C1F21;
  --surface-sand-display-weight: 600;
  --surface-sand-display-ls: -0.02em;

  --surface-slate-bg: #0C2E3B;
  --surface-slate-text: #F0EDE6;
  --surface-slate-display-weight: 700;
  --surface-slate-display-ls: -0.03em;

  --surface-clay-bg: #E9E3D8;
  --surface-clay-text: #1C1F21;
  --surface-clay-display-weight: 600;
  --surface-clay-display-ls: -0.02em;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;
  --text-editorial: 6rem;

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

  /* Radius — sharp, 2px max per design direction */
  --radius-sm: 2px;
  --radius-base: 2px;

  /* Transitions */
  --ease-authority: cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration-hover: 0.2s;
  --duration-reveal: 0.6s;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--surface-sand-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* --- SURFACE UTILITY CLASSES --- */
.surface-sand {
  background: var(--surface-sand-bg);
  color: var(--surface-sand-text);
}
.surface-sand h1, .surface-sand h2, .surface-sand h3 {
  font-weight: var(--surface-sand-display-weight);
  letter-spacing: var(--surface-sand-display-ls);
}

.surface-slate {
  background: var(--surface-slate-bg);
  color: var(--surface-slate-text);
}
.surface-slate h1, .surface-slate h2, .surface-slate h3 {
  font-weight: var(--surface-slate-display-weight);
  letter-spacing: var(--surface-slate-display-ls);
}
.surface-slate .eyebrow { color: var(--color-accent); }
.surface-slate .text-secondary { color: var(--color-text-muted-on-dark); }

.surface-clay {
  background: var(--surface-clay-bg);
  color: var(--surface-clay-text);
}
.surface-clay h1, .surface-clay h2, .surface-clay h3 {
  font-weight: var(--surface-clay-display-weight);
  letter-spacing: var(--surface-clay-display-ls);
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.1;
  color: inherit;
}

h1 { font-size: clamp(2.5rem, 5vw, var(--text-5xl)); }
h2 { font-size: clamp(1.75rem, 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(1.25rem, 2vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }

p { max-width: 68ch; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-editorial {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, var(--text-editorial));
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* --- LAYOUT --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(var(--space-6), 5vw, var(--space-16));
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 clamp(var(--space-6), 5vw, var(--space-16));
}

/* Section spacing — measured authority (100-130px between sections) */
.section {
  padding: var(--space-28) 0;
}
.section-dense {
  padding: var(--space-16) 0;
}
.section-sparse {
  padding: var(--space-32) 0;
}

@media (max-width: 768px) {
  .section { padding: var(--space-16) 0; }
  .section-dense { padding: var(--space-12) 0; }
  .section-sparse { padding: var(--space-20) 0; }
}

/* --- NAVIGATION --- */
[data-nav-role="header"] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-sand-bg);
  border-bottom: 1px solid transparent;
  transition: background var(--duration-hover) var(--ease-authority),
              border-color var(--duration-hover) var(--ease-authority),
              backdrop-filter var(--duration-hover) var(--ease-authority);
}

[data-nav-role="header"].is-scrolled {
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--color-border-light);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-4) clamp(var(--space-6), 5vw, var(--space-16));
  gap: var(--space-8);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  white-space: nowrap;
}

[data-nav-role="desktop-nav"] {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

[data-nav-role="desktop-nav"] a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--duration-hover) ease;
  position: relative;
}

[data-nav-role="desktop-nav"] a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s var(--ease-authority);
}

[data-nav-role="desktop-nav"] a:hover {
  color: var(--color-primary);
}

[data-nav-role="desktop-nav"] a:hover::after {
  width: 100%;
}

[data-nav-role="desktop-nav"] a[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 600;
}

[data-nav-role="desktop-nav"] a[aria-current="page"]::after {
  width: 100%;
}

.nav-cta {
  margin-left: var(--space-4);
}

/* Mobile toggle (hamburger) */
[data-nav-role="mobile-toggle"] {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 110;
}

[data-nav-role="mobile-toggle"] span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.3s ease, opacity 0.2s ease;
  position: relative;
}

[data-nav-role="mobile-toggle"] span::before,
[data-nav-role="mobile-toggle"] span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.3s ease;
}

[data-nav-role="mobile-toggle"] span::before { top: -7px; }
[data-nav-role="mobile-toggle"] span::after { bottom: -7px; }

[data-nav-role="mobile-toggle"][aria-expanded="true"] span {
  background: transparent;
}
[data-nav-role="mobile-toggle"][aria-expanded="true"] span::before {
  transform: rotate(45deg) translate(5px, 5px);
}
[data-nav-role="mobile-toggle"][aria-expanded="true"] span::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile drawer */
[data-nav-role="mobile-drawer"] {
  display: none;
}

[data-nav-role="mobile-drawer"][aria-expanded="true"] {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 105;
  background: var(--surface-sand-bg);
  padding: calc(var(--space-32) + var(--space-8)) var(--space-8) var(--space-8);
  gap: var(--space-2);
  overflow-y: auto;
}

[data-nav-role="mobile-drawer"] a {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-primary);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border-light);
  letter-spacing: -0.02em;
}

[data-nav-role="mobile-drawer"] a:last-of-type {
  border-bottom: none;
}

[data-nav-role="mobile-drawer"] .btn {
  margin-top: var(--space-8);
  text-align: center;
  font-size: var(--text-lg);
}

@media (max-width: 1023px) {
  [data-nav-role="desktop-nav"] { display: none; }
  .nav-cta-desktop { display: none; }
  [data-nav-role="mobile-toggle"] { display: inline-flex; }
}

@media (min-width: 1024px) {
  [data-nav-role="mobile-drawer"] { display: none !important; }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-base);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background var(--duration-hover) ease,
              transform 0.15s ease,
              box-shadow var(--duration-hover) ease;
  min-height: 48px;
  min-width: 160px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(200, 121, 42, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  padding: 0.75rem 1.875rem;
}
.btn-secondary:hover {
  background: var(--color-accent);
  color: #FFFFFF;
}

.btn-outline-light {
  background: transparent;
  color: var(--color-text-on-dark);
  border: 2px solid var(--color-text-on-dark);
  padding: 0.75rem 1.875rem;
}
.btn-outline-light:hover {
  background: var(--color-text-on-dark);
  color: var(--color-primary);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color var(--duration-hover) ease;
  padding: 0;
  min-width: auto;
  min-height: auto;
  background: none;
  border-radius: 0;
}
.btn-text:hover {
  border-bottom-color: var(--color-accent);
}

/* On slate surfaces */
.surface-slate .btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
}
.surface-slate .btn-secondary {
  color: var(--color-text-on-dark);
  border-color: rgba(240, 237, 230, 0.4);
}
.surface-slate .btn-secondary:hover {
  background: var(--color-text-on-dark);
  color: var(--color-primary);
}

/* --- HERO --- */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(var(--space-8), 6vw, 80px);
  align-items: center;
}

.hero-content { max-width: 560px; }

.hero h1 {
  font-size: clamp(2.75rem, 5.5vw, 4rem);
  line-height: 1.05;
  margin-bottom: var(--space-6);
}

.hero-sub {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 460px;
  margin-bottom: var(--space-10);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.hero-image-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-base);
}

.hero-image-wrap > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero { min-height: auto; padding: var(--space-16) 0 var(--space-12); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .hero-image-wrap { order: -1; aspect-ratio: 16 / 10; }
}

/* Page hero (inner pages) */
.page-hero {
  padding: var(--space-24) 0 var(--space-16);
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2.25rem, 4.5vw, var(--text-5xl));
  margin-bottom: var(--space-4);
}

.page-hero .hero-sub {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.page-hero-split {
  padding: var(--space-20) 0;
}

.page-hero-split .hero-grid {
  min-height: auto;
}

.surface-slate .page-hero .hero-sub,
.surface-slate .page-hero-split .hero-sub {
  color: var(--color-text-muted-on-dark);
}

/* --- STAT STRIP --- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  text-align: center;
  padding: var(--space-10) var(--space-6);
  border-right: 1px solid var(--color-border-dark);
}

.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-2);
  letter-spacing: -0.03em;
}

.stat-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted-on-dark);
}

@media (max-width: 768px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-bottom: 1px solid var(--color-border-dark); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) { border-bottom: none; }
}

/* --- BENTO GRID (Industry Verticals) --- */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-base);
  aspect-ratio: 4 / 3;
}

.bento-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-authority);
}

.bento-card:hover > img {
  transform: scale(1.04);
}

.bento-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(12, 46, 59, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-8);
}

.bento-card-overlay h3 {
  color: var(--color-text-on-dark);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.bento-card-overlay p {
  color: rgba(240, 237, 230, 0.8);
  font-size: var(--text-sm);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card { aspect-ratio: 16 / 10; }
}

/* --- SPLIT LAYOUT --- */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

.split-layout-60-40 {
  grid-template-columns: 1.2fr 0.8fr;
}

.split-content {
  max-width: 520px;
}

.split-content h2 {
  margin-bottom: var(--space-6);
}

.split-content p {
  margin-bottom: var(--space-6);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.split-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-base);
}

.split-image-wrap > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-layout.reverse .split-image-wrap {
  order: -1;
}

@media (max-width: 768px) {
  .split-layout,
  .split-layout-60-40 { grid-template-columns: 1fr; }
  .split-layout.reverse .split-image-wrap { order: -1; }
  .split-image-wrap { aspect-ratio: 16 / 10; }
}

/* --- PROCESS STEPS (How It Works) --- */
.process-steps {
  counter-reset: process-step;
}

.process-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-8);
  padding-bottom: var(--space-12);
  margin-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-border-light);
  position: relative;
}

.process-step:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.process-step-number {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-accent);
  opacity: 0.4;
  line-height: 1;
}

.process-step h3 {
  margin-bottom: var(--space-3);
}

.process-step p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.surface-clay .process-step {
  border-bottom-color: rgba(28, 31, 33, 0.12);
}

@media (max-width: 640px) {
  .process-step { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* --- TIMELINE LAYOUT --- */
.timeline {
  position: relative;
  padding-left: var(--space-16);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border-light);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-12);
}

.timeline-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-16) + 20px);
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--surface-sand-bg);
}

.surface-clay .timeline::before {
  background: rgba(28, 31, 33, 0.15);
}

.surface-clay .timeline-item::before {
  border-color: var(--surface-clay-bg);
}

.timeline-item h3 { margin-bottom: var(--space-3); }
.timeline-item p { color: var(--color-text-secondary); line-height: 1.7; }

/* --- GRID LAYOUTS --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

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

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

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

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

/* --- CARDS --- */
.card {
  background: var(--surface-sand-bg);
  border-top: 3px solid var(--color-accent);
  padding: var(--space-10) var(--space-8);
  border-radius: var(--radius-base);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--color-overlay);
}

.card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.card p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.surface-slate .card {
  background: rgba(240, 237, 230, 0.06);
  border-top-color: var(--color-accent);
}

.surface-slate .card p {
  color: var(--color-text-muted-on-dark);
}

/* Guarantee / feature card on dark */
.guarantee-card {
  text-align: center;
  padding: var(--space-10) var(--space-6);
}

.guarantee-card .card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-6);
  color: var(--color-accent);
}

.guarantee-card .card-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* --- TESTIMONIAL --- */
.testimonial-block {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
}

.testimonial-block::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 8rem;
  color: var(--color-accent);
  opacity: 0.25;
  position: absolute;
  top: -3rem;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1;
}

.testimonial-block blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.45;
  color: var(--color-text-on-dark);
  margin-bottom: var(--space-8);
}

.testimonial-block cite {
  display: block;
  font-style: normal;
}

.testimonial-reviewer {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}

.testimonial-role {
  font-size: var(--text-sm);
  color: var(--color-text-muted-on-dark);
}

/* --- TEAM GRID --- */
.team-card {
  text-align: center;
}

.team-card-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-base);
  margin-bottom: var(--space-4);
}

.team-card-image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(15%);
  transition: filter 0.4s ease;
}

.team-card:hover .team-card-image > img {
  filter: grayscale(0%);
}

.team-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}

.team-card .team-title {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* --- CLIENT LOGOS --- */
.logo-wall {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-12);
  opacity: 0.5;
}

.logo-wall img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: opacity var(--duration-hover) ease;
}

.logo-wall img:hover {
  opacity: 1;
}

/* --- FAQ ACCORDION --- */
[data-accordion] {
  border-bottom: 1px solid rgba(28, 31, 33, 0.12);
}

[data-accordion] summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: inherit;
  list-style: none;
  letter-spacing: -0.01em;
}

[data-accordion] summary::-webkit-details-marker { display: none; }

[data-accordion] summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: var(--space-4);
}

[data-accordion].is-open summary::after {
  transform: rotate(45deg);
}

[data-accordion] .accordion-body {
  padding-bottom: var(--space-6);
  max-width: 68ch;
}

[data-accordion] .accordion-body p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  font-size: var(--text-base);
}

.surface-clay [data-accordion] {
  border-bottom-color: rgba(28, 31, 33, 0.1);
}

/* --- CONTACT FORM --- */
.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: #FFFFFF;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-base);
  transition: border-color var(--duration-hover) ease, box-shadow var(--duration-hover) ease;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200, 121, 42, 0.12);
}

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

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%235C6166' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* --- CTA BAND --- */
.cta-band {
  text-align: center;
}

.cta-band h2 {
  margin-bottom: var(--space-4);
}

.cta-band p {
  margin: 0 auto var(--space-8);
  color: var(--color-text-secondary);
}

.cta-band .btn { margin: 0 var(--space-3); }

.surface-slate .cta-band p {
  color: var(--color-text-muted-on-dark);
}

/* --- ROLE TAGS (for vertical pages) --- */
.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.role-tag {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(12, 46, 59, 0.08);
  border-radius: var(--radius-sm);
}

.surface-clay .role-tag {
  background: rgba(12, 46, 59, 0.1);
}

/* --- GOLD DIVIDER --- */
.gold-divider {
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  margin-bottom: var(--space-8);
}

.gold-divider-center {
  margin-left: auto;
  margin-right: auto;
}

/* --- FOOTER --- */
.site-footer {
  background: var(--color-primary);
  color: var(--color-text-on-dark);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.footer-desc {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted-on-dark);
  max-width: 300px;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.footer-links li { margin-bottom: var(--space-3); }

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted-on-dark);
  transition: color var(--duration-hover) ease;
}

.footer-links a:hover { color: var(--color-text-on-dark); }

.footer-bottom {
  border-top: 1px solid var(--color-border-dark);
  padding-top: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-copyright {
  font-size: var(--text-xs);
  color: var(--color-text-muted-on-dark);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* --- SCROLL REVEAL --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--duration-reveal) var(--ease-authority),
              transform var(--duration-reveal) var(--ease-authority);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--duration-reveal) var(--ease-authority),
              transform var(--duration-reveal) var(--ease-authority);
}

[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0s; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 0.08s; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 0.16s; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 0.24s; }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 0.32s; }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: 0.4s; }

[data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- IMAGE LOAD FADE --- */
img { opacity: 0; transition: opacity 0.4s ease; }
img.is-loaded { opacity: 1; }

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

.text-center { text-align: center; }
.text-balance { text-wrap: balance; }

/* --- RESPONSIVE FINE-TUNING --- */
@media (min-width: 1280px) {
  .hero h1 { font-size: 4.25rem; }
}

@media (max-width: 640px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
  .btn-text { width: auto; }
}


/* ── CSS safety-net (injected by proxy-orchestrator) ──
   Ensures image containers always have resolvable dimensions so imgs with
   height:100% don't collapse. Scoped to common container class patterns.

   :where() gives zero specificity so any explicit rule the Styles agent wrote
   (e.g. .hero-image-wrap { aspect-ratio: 4/5 }) wins. Without this, the broad
   [class*="image-wrap"] selector at equal specificity but later source order
   was overriding intended hero portrait ratios to landscape. */
:where(
  [class*="image-col"],
  [class*="image-wrap"],
  [class*="img-wrap"],
  [class*="img-container"],
  [class*="image-container"],
  [class*="photo-wrap"],
  [class*="photo-container"],
  .bento-card,
  .listing-img-wrap,
  .card-image,
  .feature-image,
  .hero-image,
  .hero-media
) {
  min-height: 320px;
  aspect-ratio: 3 / 2;
  position: relative;
}

/* Nav role contract (Phase 6a+, 2026-04-20). Elements declare semantic role
   via data-nav-role; safety-net targets roles, not structural attributes.
   Roles: header | desktop-nav | mobile-toggle | mobile-drawer.
   Styles Agent stays free to invent any HTML + layout; must annotate roles.
   This replaces the earlier [data-mobile-nav]{display:none} rule, which
   collided when Styles used one container for both desktop + mobile nav. */
[data-nav-role="mobile-drawer"] { display: none; }
[data-nav-role="mobile-toggle"] { display: none; }
@media (max-width: 1023px) {
  [data-nav-role="desktop-nav"] { display: none; }
  [data-nav-role="mobile-toggle"] { display: inline-flex; }
  [data-nav-role="mobile-drawer"][aria-expanded="true"] { display: flex; }
}
[class*="image-col"] > img,
[class*="image-wrap"] > img,
[class*="img-wrap"] > img,
[class*="img-container"] > img,
[class*="image-container"] > img,
[class*="photo-wrap"] > img,
[class*="photo-container"] > img,
.bento-card > img,
.bento-card-image > img,
.listing-img-wrap > img,
.card-image > img,
.feature-image > img,
.hero-image > img,
.hero-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (min-width: 768px) {
  .hero-image-col,
  .hero-media,
  .hero-image {
    aspect-ratio: auto;
    min-height: 100vh;
  }
}
/* Fallback for any bare img with percentage height */
img[style*="height: 100%"],
img[style*="height:100%"] {
  min-height: 320px;
}
/* ── end safety-net ── */
