/*
 * Site chrome: reset, layout wrapper, header/nav (desktop + mobile),
 * buttons, section/heading scaffolding, footer. Reused unchanged from
 * the original static design so no CSS needed rewriting — only the
 * markup source changed (PHP + blocks instead of static HTML).
 *
 * Block-specific styles (hero, stats bar, services grid, work grid,
 * process steps, testimonials, pricing grid, CTA banner, FAQ, contact
 * form) live in each block's own blocks/{name}/style.css instead of
 * here, per the recommended file structure.
 */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--band-bg); color: rgba(255,255,255,0.75); font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar a { font-weight: 600; color: #fff; }

/* ---------- Nav ---------- */
header {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
nav.wrap { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 24px; }
.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.logo img { max-height: 40px; width: auto; }

.nav-center { flex: 1; display: flex; align-items: center; justify-content: center; gap: 34px; font-size: 14px; font-weight: 500; }
.nav-center a { opacity: 0.75; transition: opacity 0.2s; }
.nav-center a:hover { opacity: 1; }
.nav-center a.active { opacity: 1; color: var(--accent); }

/* Dropdown support (nav-walker.php) — the parent item (e.g. "Work") is a
   real link so clicking the label navigates there; the small arrow next
   to it is the only thing that opens/closes the submenu. */
.nav-dropdown { position: relative; display: flex; align-items: center; gap: 3px; }
.nav-dropdown-toggle {
  background: none; border: none; font: inherit; cursor: pointer;
  display: flex; align-items: center;
  opacity: 0.75; padding: 4px; color: inherit;
}
.nav-dropdown-toggle svg { transition: transform 0.15s ease; }
.nav-dropdown-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-dropdown-toggle:hover, .nav-dropdown-toggle.active { opacity: 1; }
.nav-dropdown-toggle.active { color: var(--accent); }
.dropdown-panel {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}
.dropdown-panel.open { display: block; }
.dropdown-panel a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.dropdown-panel a:hover { background: var(--bg); }
.mobile-menu .dropdown-panel { position: static; border: none; box-shadow: none; padding: 0 0 0 16px; }

/* Mobile: the parent link takes the row, the arrow is a compact button
   on the right — both share the row's single border instead of each
   drawing its own (the generic ".mobile-menu a" rule below would
   otherwise give the parent link a full-width row of its own). The `>`
   scoping is deliberate: without it this would also strip the border
   off the dropdown-panel's own child links, which sit nested inside
   this same .nav-dropdown. */
.mobile-menu .nav-dropdown { justify-content: space-between; border-bottom: 1px solid var(--line); }
.mobile-menu .nav-dropdown > a { border-bottom: none; width: auto; flex: 1; }
.mobile-menu .nav-dropdown > .nav-dropdown-toggle { border-bottom: none; width: auto; padding: 14px 8px; }

.nav-cta { background: var(--band-bg); color: var(--band-ink); padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: 14px; flex-shrink: 0; }

/* ---------- Light/dark toggle ---------- */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { display: block; width: 19px; height: 19px; }
.theme-toggle .icon-moon { display: none; }
/* Light mode (no data-theme attribute): show the moon — click to go dark.
   Dark mode: show the sun — click to go back to light. */
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer; padding: 0;
  flex-shrink: 0;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; flex-direction: column; background: var(--bg); border-top: 1px solid var(--line); padding: 8px 32px 20px; }
.mobile-menu.open { display: flex; }
.mobile-menu a, .mobile-menu .nav-dropdown-toggle { padding: 14px 0; font-size: 15px; font-weight: 500; border-bottom: 1px solid var(--line); color: var(--ink); width: 100%; text-align: left; }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a.active { color: var(--accent); }

/* ---------- Typography / buttons shared across every block ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--accent); display: inline-block; }
h1 { font-family: var(--font-display); font-size: 56px; line-height: 1.05; letter-spacing: -0.02em; font-weight: 600; margin-bottom: 24px; }
h1 em { color: var(--accent); font-style: normal; }
h2 { font-family: var(--font-display); font-size: 40px; letter-spacing: -0.01em; font-weight: 600; margin-bottom: 14px; }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 16px 30px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  /* .btn is mostly used on <a> tags, which have no native chrome — but
     the contact form's Send button is a real <button>, and without
     these resets the browser's default beveled border (light top edge,
     dark bottom edge) shows through underneath the background colour. */
  border: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px var(--accent-shadow); }
.btn-secondary { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-dark { background: var(--band-bg); color: var(--band-ink); }

/* ---------- Section / heading scaffolding used by every block ---------- */
section, .wp-block-thinkbridge-hero, .wp-block-thinkbridge-stats-bar { padding: 100px 0; }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-head.left { text-align: left; margin: 0 0 56px; }
.section-head.left .eyebrow { justify-content: flex-start; }
.section-head p { color: var(--ink-soft); font-size: 16px; }

.page-banner { padding: 64px 0 56px; border-bottom: 1px solid var(--line); background: var(--surface); }
.page-banner .eyebrow { justify-content: flex-start; }
.page-banner h1 { font-size: 46px; margin-bottom: 14px; }
.page-banner p { color: var(--ink-soft); font-size: 17px; max-width: 560px; }

/* ---------- Footer ---------- */
footer { background: var(--band-bg); color: rgba(255,255,255,0.6); padding: 60px 0 28px; }
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,0.12); margin-bottom: 24px;
}
.footer-top .logo { color: #fff; }
.footer-top p { font-size: 14px; margin-top: 14px; max-width: 260px; }
.footer-col h4 { color: #fff; font-size: 13px; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-col a { display: block; font-size: 14px; padding: 6px 0; opacity: 0.75; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { display: flex; justify-content: space-between; font-size: 13px; }

/* ---------- Empty-state placeholder (editors only) ---------- */
.thinkbridge-empty-state { padding: 24px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-soft); font-size: 14px; }

@media (max-width: 900px) {
  h1 { font-size: 40px; }
  .footer-top { grid-template-columns: 1fr; }
  .nav-center { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 480px) {
  .nav-cta { display: none; }
}
