/* =========================================================================
   Stulworth — Layout: Header, Nav, Mega-menu, Footer, Sections, Reveal
   ========================================================================= */

/* Skip + reveal -------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.site-header.header--dark { background: var(--dark); color: #fff; }
.site-header.header--dark a:not(.nav-cta) { color: rgba(255,255,255,0.88); }
.site-header.header--dark a:not(.nav-cta):hover { background: rgba(255,255,255,0.08); color: #fff; }
.site-header.header--dark .nav-toggle span,
.site-header.header--dark .nav-toggle span::before,
.site-header.header--dark .nav-toggle span::after { background: #fff; }
.site-header.header--dark .brand .mark { color: var(--accent); }
.nav {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5);
}
.brand {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 400; letter-spacing: 0;
  text-transform: none; line-height: 0.85;
  font-size: 1.5rem; display: inline-flex; align-items: center; gap: 10px;
}
.brand .mark { color: var(--accent); }
.brand-icon { height: 2.2em; max-height: 48px; width: auto; display: block; flex-shrink: 0; }
.brand-text { display: inline-block; }

.nav-links { display: flex; align-items: center; gap: var(--s-2); }
.nav-item { position: relative; }
.nav-item > a, .nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: var(--r-pill);
  font-weight: 600; color: var(--ink-soft); font-size: 0.96rem;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-item > a:hover { background: var(--surface-2); color: var(--ink); }
.nav-item > a .caret { transition: transform var(--dur-fast); font-size: 0.7rem; }
.nav-item.open > a .caret { transform: rotate(180deg); }

.nav-cta {
  background: var(--accent); color: #fff; font-weight: 700;
}
.nav-cta:hover { background: var(--accent-deep); color: #fff; }

/* Mega menu ------------------------------------------------------------ */
.mega {
  position: absolute; top: calc(100% + 8px); left: 0;
  width: min(720px, 90vw);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: var(--s-6);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-6);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility var(--dur-fast);
}
.nav-item.open .mega { opacity: 1; visibility: visible; transform: none; }
.mega h5 {
  font-size: var(--fs-eyebrow); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: var(--s-3);
}
.mega a.sub {
  display: block; padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--ink-soft); font-weight: 500; font-size: 0.96rem;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.mega a.sub:hover { background: var(--accent-tint); color: var(--accent-deep); }
/* Keep mega menu text dark even when header is in dark mode */
.site-header.header--dark .mega a.sub { color: var(--ink-soft); }
.site-header.header--dark .mega a.sub:hover { background: var(--accent-tint); color: var(--accent-deep); }
.site-header.header--dark .mega h5 { color: var(--muted); }

/* Mobile nav ----------------------------------------------------------- */
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: var(--r-sm);
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; display: block; width: 22px; height: 2px; background: var(--ink);
  position: relative; transition: transform var(--dur-fast);
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 150;
  background: #fff; padding: calc(var(--header-h) + var(--s-5)) var(--gutter) var(--s-7);
  transform: translateX(100%); transition: transform var(--dur) var(--ease);
  overflow-y: auto;
}
.mobile-menu.open { transform: none; }
.mobile-menu .m-link {
  display: block; padding: 16px 4px; border-bottom: 1px solid var(--line);
  font-size: 1.2rem; font-weight: 700;
}
.mobile-menu .m-sub { padding-left: var(--s-5); }
.mobile-menu .m-sub a { display: block; padding: 10px 0; color: var(--muted); font-weight: 600; }
.mobile-menu .m-cta { margin-top: var(--s-6); }
.mobile-close {
  position: fixed; top: 18px; right: 18px; z-index: 160;
  width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2);
  font-size: 1.4rem; display: none; align-items: center; justify-content: center;
}
.mobile-close.show { display: flex; }
body.menu-open { overflow: hidden; }

/* Sections ------------------------------------------------------------- */
section { padding: var(--s-9) 0; }
.section-head { max-width: 760px; margin-bottom: var(--s-7); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: var(--s-3); }
.section-head h2 { font-size: var(--fs-h2); margin-bottom: var(--s-4); }
.section-head p { color: var(--muted); font-size: var(--fs-lead); }
.section-actions { margin-top: var(--s-6); }

/* Grids ---------------------------------------------------------------- */
.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Hero ----------------------------------------------------------------- */
.hero { position: relative; padding-top: var(--s-8); }
.hero-slides { position: relative; border-radius: var(--r-xl); overflow: hidden; min-height: 560px; box-shadow: var(--shadow-lg); }
.slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
  display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
  padding: clamp(32px, 6vw, 80px);
}
.slide.active { opacity: 1; position: relative; }
.slide::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,15,14,0.15) 0%, rgba(12,15,14,0.72) 100%);
}
.slide .slide-inner { position: relative; color: #fff; max-width: 720px; }
.slide .eyebrow { color: #fff; }
.slide h1 { font-size: var(--fs-display); color: #fff; margin: var(--s-3) 0 var(--s-5); }
.slide .hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }

.hero-controls {
  position: absolute; bottom: var(--s-6); right: var(--s-6); z-index: 3;
  display: flex; gap: var(--s-2); align-items: center;
}
.hero-dots { display: flex; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.hero-dots button.active { background: #fff; width: 26px; border-radius: var(--r-pill); }
.hero-arrow {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,0.18); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem;
  transition: background var(--dur-fast);
}
.hero-arrow:hover { background: rgba(255,255,255,0.32); }

/* Manifesto ------------------------------------------------------------ */
.manifesto {
  font-size: clamp(1.6rem, 3.4vw, 2.8rem);
  line-height: 1.15; font-weight: 700; letter-spacing: -0.02em;
  max-width: 1000px;
}
.manifesto .accent { color: var(--accent-deep); }

/* Approach pillars ----------------------------------------------------- */
.pillar { padding: var(--s-6); }
.pillar .num {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--accent-deep);
  font-weight: 800; margin-bottom: var(--s-4);
}
.pillar h3 { font-size: 1.25rem; margin-bottom: var(--s-3); }
.pillar p { color: var(--muted); }

/* Process steps -------------------------------------------------------- */
.process-step { padding: var(--s-6); min-height: 240px; display: flex; flex-direction: column; }
.process-step .num {
  font-size: 1.1rem; font-weight: 800; color: var(--accent-deep);
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: var(--s-4);
}
.process-step h4 { font-size: 1.15rem; margin-bottom: var(--s-2); }
.process-step p { color: var(--muted); font-size: 0.96rem; }

/* CTA band ------------------------------------------------------------- */
.cta-band {
  background: var(--dark); color: #fff; border-radius: var(--r-xl);
  padding: clamp(40px, 7vw, 88px); text-align: center;
}
.cta-band h2 { color: #fff; font-size: var(--fs-h2); margin-bottom: var(--s-4); }
.cta-band p { color: rgba(255,255,255,0.78); max-width: 620px; margin: 0 auto var(--s-6); font-size: var(--fs-lead); }

/* Footer --------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--s-9) 0 var(--s-7);
  background: var(--bg-soft);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: var(--s-6);
}
.footer-grid .f-brand .brand { font-size: 1.1rem; }
.footer-grid .f-brand p { color: var(--muted); margin-top: var(--s-4); max-width: 280px; }
.footer-col h5 {
  font-size: var(--fs-eyebrow); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: var(--s-4);
}
.footer-col a { display: block; padding: 6px 0; color: var(--ink-soft); font-weight: 500; transition: color var(--dur-fast); }
.footer-col a:hover { color: var(--accent-deep); }
.footer-col .foot-addr { display: block; padding: 6px 0; color: var(--muted); font-weight: 500; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s-3);
  margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.9rem;
}
.footer-social { display: flex; gap: var(--s-2); }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; transition: all var(--dur-fast);
}
.footer-social a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Band system (high-contrast rhythm) ---------------------------------- */
.band { padding: var(--s-9) 0; outline: 1px solid transparent; background: var(--bg); }
.band--soft { background: var(--bg-soft); }
.band--dark { background: var(--dark); color: #fff; min-height: 100vh; }

.band--dark .section-head p,
.band--dark p { color: rgba(255, 255, 255, 0.82); }
.band--dark .eyebrow { color: var(--accent); }
.band--dark .eyebrow .dot { background: var(--accent); }
.band--dark .card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}
.band--dark .card:hover { border-color: var(--accent); }
.band--accent { background: var(--accent); color: #fff; }
.band--accent .section-head p,
.band--accent p { color: rgba(255, 255, 255, 0.9); }
.band--accent .eyebrow { color: #fff; }
.band--accent .eyebrow .dot { background: #fff; }

/* Section index label */
.sec-index {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.85rem; letter-spacing: 0.22em;
  color: var(--accent-deep); margin-bottom: var(--s-3);
}
.sec-index::before { content: ''; width: 28px; height: 2px; background: currentColor; opacity: 0.6; }
.band--dark .sec-index,
.band--accent .sec-index { color: var(--accent); }
.band--accent .sec-index { color: #fff; }

/* Manifesto (bolder) --------------------------------------------------- */
.manifesto {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.08; font-weight: 700; letter-spacing: -0.03em;
  max-width: 1100px; position: relative;
}
.manifesto::before {
  content: '“'; font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 9rem); line-height: 0.6;
  color: var(--accent); display: block; margin-bottom: var(--s-3); opacity: 0.9;
}
.manifesto .accent { color: var(--accent-deep); }
.band--dark .manifesto .accent { color: var(--accent); }

/* Approach pillars (bolder) ------------------------------------------- */
.pillar { padding: var(--s-7); }
.pillar .num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.8rem); width: auto; height: auto;
  background: none; color: var(--accent-deep); margin-bottom: var(--s-4);
}
.band--dark .pillar .num { color: var(--accent); }
.pillar h3 { font-size: 1.5rem; margin-bottom: var(--s-3); }

/* Capability cards (hover invert) ------------------------------------- */
.cap-card h4 { font-size: 1.3rem; }
.cap-card:hover,
.cap-card:focus-within {
  background: var(--accent); border-color: var(--accent); color: #fff;
  transform: translateY(-6px);
}
.cap-card:hover p, .cap-card:hover .meta,
.cap-card:focus-within p, .cap-card:focus-within .meta { color: rgba(255, 255, 255, 0.92); }
.cap-card:hover .meta { color: #fff; }

/* Process steps (oversized, dark band) -------------------------------- */
.process-step .num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 700;
  width: auto; height: auto; border: none; color: var(--accent); margin-bottom: var(--s-4);
}
.process-step h4 { font-size: 1.4rem; }
.process-step p { font-size: 1rem; }

/* Work carousel -------------------------------------------------------- */
.work-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-6); flex-wrap: wrap; }
.work-carousel {
  display: flex; gap: var(--s-5); overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: var(--s-4); scrollbar-width: thin;
}
.work-carousel .work-card { flex: 0 0 min(86%, 540px); scroll-snap-align: start; }
.work-carousel .work-meta {
  position: absolute; top: var(--s-4); left: var(--s-4); z-index: 2;
  background: rgba(12, 15, 14, 0.55); color: #fff; padding: 6px 12px;
  border-radius: var(--r-pill); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; backdrop-filter: blur(6px);
}
.work-nav { display: flex; gap: var(--s-2); }
.work-nav button {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 1.2rem; transition: all var(--dur-fast);
}
.work-nav button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Team (bolder) -------------------------------------------------------- */
.team-card .photo { aspect-ratio: 3 / 4; }
.team-card .body { padding: var(--s-5); }
.team-card h4 { font-size: 1.2rem; }

/* Industries (bolder) -------------------------------------------------- */
.industry-block { padding: var(--s-6); border-left: 3px solid var(--accent); }
.band--dark .industry-block { border-color: var(--accent); }
.industry-block h4 { font-size: 1.35rem; }

/* Sticky bottom CTA bar ------------------------------------------------ */
.cta-bar-fixed {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  background: var(--ink); color: #fff;
  transform: translateY(140%); transition: transform var(--dur) var(--ease);
  box-shadow: 0 -10px 30px rgba(12, 15, 14, 0.25);
}
.cta-bar-fixed.show { transform: none; }
.cta-bar-fixed .inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: 14px var(--gutter);
}
.cta-bar-fixed .msg { font-weight: 600; font-size: 0.98rem; }
.cta-bar-fixed .msg b { color: var(--accent); }
.cta-bar-fixed .btn { padding: 12px 20px; }

/* Responsive ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid .f-brand { grid-column: 1 / -1; }
  .pin-slide { padding: clamp(24px, 4vw, 60px); }
  .pin-slide .circle { width: 64px; height: 64px; font-size: 1.5rem; }
}
@media (max-width: 980px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pin-slide .circle { width: 52px; height: 52px; font-size: 1.2rem; }
  .pin-slide-body h4 { font-size: 1.3rem; }
  .pin-slide-body p { font-size: 0.95rem; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .mega { grid-template-columns: 1fr; }
  .section-head { margin-bottom: var(--s-6); }
  .hero-slides { min-height: 480px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .band { padding: var(--s-8) 0; }
  .work-carousel .work-card { flex-basis: 88%; }
  .cta-bar-fixed .msg { font-size: 0.86rem; }
  .pin-slide .circle { width: 44px; height: 44px; font-size: 1rem; }
  .pin-slide-inner { gap: var(--s-4); }
  .pin-slide-body h4 { font-size: 1.2rem; }
  .pin-slide-body p { font-size: 0.9rem; }
  .pin-slide::before { border-radius: var(--r-md); }
  .horiz-panel { padding: var(--s-6) var(--s-5); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}
