/* ==========================================================================
   Venturim & Guimarães — Advogados Associados
   Design System v2.0 — HTML/CSS estático
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Cores */
  --navy: #004490;
  --navy-dark: #00336b;
  --navy-ink: #0a2240;
  --gold: #8a6b3f;
  --gold-light: #b89a6f;
  --gold-dark: #7a5c35;
  --gold-text: #6b532f;
  --green: #1b2922;
  --ink: #1c1c1c;
  --graphite: #4a4a4a;
  --paper: #faf8f5;
  --paper-dark: #f1ede6;
  --white: #ffffff;
  --line: #e4ddd2;

  /* Superfícies (alternam no dark theme) */
  --surface: #ffffff;
  --heading: var(--navy-ink);
  --icon-bg: rgba(0, 68, 144, 0.08);
  --icon-color: var(--navy);
  --focus-ring: rgba(0, 68, 144, 0.14);
  --glow: rgba(159, 127, 84, 0.2);

  /* Heróis (mantêm tom escuro nos dois temas) */
  --hero-a: #081226;
  --hero-b: #0d2b52;
  --hero-c: #10407e;

  /* Tipografia */
  --font-heading: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Merriweather", Georgia, "Times New Roman", serif;
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Espaçamento */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 5rem;
  --space-10: 6rem;

  /* Raio & Sombra */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(28, 28, 28, 0.08);
  --shadow: 0 4px 16px rgba(28, 28, 28, 0.08);
  --shadow-lg: 0 12px 40px rgba(28, 28, 28, 0.12);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 200ms;
  --dur: 300ms;
  --dur-slow: 500ms;

  /* Layout */
  --container: 1200px;
  --header-h: 76px;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  color-scheme: dark;
  --navy: #6ea1da;
  --navy-dark: #8fb8e4;
  --gold-light: #d4b27f;
  --gold-text: #d0ad7c;
  --ink: #e8ecf1;
  --graphite: #9aa4b1;
  --paper: #0d1117;
  --paper-dark: #141b23;
  --surface: #182028;
  --line: #27323f;
  --heading: #f1f5f9;
  --icon-bg: rgba(212, 178, 127, 0.14);
  --icon-color: var(--gold-light);
  --focus-ring: rgba(212, 178, 127, 0.3);
  --glow: rgba(212, 178, 127, 0.16);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.55);
  scrollbar-color: var(--line) var(--paper);
}

[data-theme="dark"] .header {
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

[data-theme="dark"] .footer {
  background: #070a10;
}

[data-theme="dark"] .btn--primary {
  background: #2c6fb0;
}

[data-theme="dark"] .btn--primary:hover {
  background: #3a82c4;
}

[data-theme="dark"] .btn--ghost:hover {
  background: var(--navy);
  color: #0d1117;
}

[data-theme="dark"] .btn--light {
  color: #123f7a;
}

[data-theme="dark"] .btn--light:hover {
  color: #0d2b52;
}

[data-theme="dark"] .to-top {
  background: #2c6fb0;
}

[data-theme="dark"] .to-top:hover {
  background: #3a82c4;
}

[data-theme="dark"] .form__error {
  color: #f0a3a3;
}

[data-theme="dark"] #form-success {
  background: #12241a !important;
  color: #7fd0a2 !important;
}

[data-theme="dark"] #form-fail {
  background: #2a1418 !important;
  color: #f2a9a9 !important;
}

[data-theme="dark"] .form__input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

a:hover {
  color: var(--navy-dark);
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--gold);
  color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--heading);
  letter-spacing: -0.01em;
}

/* ---------- Layout ---------- */
.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

.section {
  padding-block: var(--space-9);
}

.section--tint {
  background: var(--paper-dark);
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-7);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: var(--space-4);
}

.section-sub {
  color: var(--graphite);
  font-size: 1.125rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--navy-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn--ghost:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--gold {
  position: relative;
  overflow: hidden;
  background: var(--gold);
  color: var(--white);
}

.btn--gold:hover {
  background: var(--gold-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn--light {
  background: var(--white);
  color: var(--navy);
}

.btn--light:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn--gold::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 60%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-160%) skewX(-20deg);
  transition: transform 0.7s var(--ease);
  pointer-events: none;
}

.btn--gold:hover::after {
  transform: translateX(280%) skewX(-20deg);
}

.btn:active {
  transform: scale(0.97);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header.is-scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  max-height: 6vh;
}

.nav__logo img {
  max-height: 6vh;
  width: auto;
}

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

.nav__link {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding-block: var(--space-2);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-dark);
  color: var(--ink);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.theme-toggle:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.45s var(--ease);
}

.theme-toggle.is-switching svg {
  transform: rotate(180deg) scale(0.4);
}

.theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--heading);
}

.nav__toggle svg {
  width: 28px;
  height: 28px;
}

.nav__toggle line {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
}

.nav__toggle.is-open line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav__toggle.is-open line:nth-child(2) {
  transform: scaleX(0);
}

.nav__toggle.is-open line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: var(--space-10) var(--space-9);
  background: linear-gradient(160deg, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 100%);
  color: var(--white);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, var(--glow) 0%, transparent 55%);
  pointer-events: none;
  animation: heroGlow 16s ease-in-out infinite alternate;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  color: var(--gold-light);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
  display: inline-block;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  color: var(--white);
  max-width: 16em;
  margin-bottom: var(--space-5);
}

.hero__title em {
  font-style: normal;
  color: var(--gold-light);
}

.hero__sub {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 40rem;
  margin-bottom: var(--space-7);
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ---------- Cards ---------- */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-light);
}

.card:hover::before {
  opacity: 1;
}

.card:hover .card__icon {
  background: var(--gold);
  color: var(--white);
  animation: iconPop 0.4s var(--ease);
}

.card__icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--icon-bg);
  color: var(--icon-color);
  margin-bottom: var(--space-5);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.card__icon svg {
  width: 26px;
  height: 26px;
}

.card__title {
  font-size: 1.375rem;
  margin-bottom: var(--space-3);
}

.card__text {
  color: var(--graphite);
  font-size: 0.9688rem;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  min-height: 44px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.card__link svg {
  width: 18px;
  height: 18px;
  transition: transform var(--dur-fast) var(--ease);
}

.card:hover .card__link svg {
  transform: translateX(4px);
}

/* ---------- Áreas de Atuação (cards empilhados) ---------- */
.section--h-scroll {
  height: auto;
}

.h-scroll {
  position: static;
  overflow: visible;
  min-height: auto;
  cursor: auto;
  padding-bottom: var(--space-6);
  background: var(--paper-dark);
}
.h-scroll:active {
  cursor: auto;
}

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

.h-scroll__track .card--wide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

/* ---------- Depth Card (tilt 3D + brilho que segue o cursor) ---------- */
.h-scroll__track .depth-card {
  will-change: transform;
  transition: transform 0.45s var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.h-scroll__track .depth-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: radial-gradient(
    600px circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 255, 255, 0.45),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.h-scroll__track .depth-card:hover {
  transform: perspective(1000px) translateY(-6px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.14s var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.h-scroll__track .depth-card:hover::after {
  opacity: 1;
}

/* Card inteiro clicável (overlay) */
.h-scroll__track .card__link-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.h-scroll__track .card__link {
  position: relative;
  z-index: 2;
}

.card__body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card__media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--icon-bg), var(--line));
  min-height: 200px;
}

.card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--graphite);
  opacity: 0.3;
}

.card__placeholder svg {
  width: 64px;
  height: 64px;
}

/* ---------- Pilares ---------- */
.pillar {
  border-left: 3px solid var(--gold);
  padding-left: var(--space-5);
}

.pillar__num {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: var(--gold-text);
  margin-bottom: var(--space-2);
}

.pillar__title {
  font-size: 1.1875rem;
  margin-bottom: var(--space-2);
}

/* ---------- Sócios ---------- */
.socio {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.socio:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.socio__photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-dark);
}

.socio__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

.socio:hover .socio__photo img {
  transform: scale(1.04);
}

.socio__body {
  padding: var(--space-6);
}

.socio__name {
  font-size: 1.5rem;
  margin-bottom: var(--space-1);
}

.socio__oab {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-text);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.socio__bio {
  color: var(--graphite);
  font-size: 0.9688rem;
}

/* ---------- Diferenciais ---------- */
.diff {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: start;
  padding-block: var(--space-5);
  border-top: 1px solid var(--line);
}

.diff:last-child {
  border-bottom: 1px solid var(--line);
}

.diff__num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1;
}

/* ---------- Contato ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: var(--shadow-sm);
}

.form__field {
  margin-bottom: var(--space-5);
}

.form__label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

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

.form__check {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-block: var(--space-5);
  font-size: 0.875rem;
  color: var(--graphite);
}

.form__check input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.3rem;
  accent-color: var(--navy);
}

.form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form__error {
  display: none;
  font-size: 0.8125rem;
  color: #b3261e;
  margin-top: var(--space-2);
}

.form__error.is-visible {
  display: block;
}

.contact-info {
  display: grid;
  gap: var(--space-6);
}

.contact-info__item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.contact-info__icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--icon-bg);
  color: var(--icon-color);
}

.contact-info__icon svg {
  width: 22px;
  height: 22px;
}

.contact-info__label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: var(--space-1);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-ink);
  color: rgba(255, 255, 255, 0.8);
  padding-block: var(--space-8) var(--space-6);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}

.footer__logo {
  max-height: 25vh;
  margin-bottom: var(--space-5);
  filter: brightness(0) invert(1);
}

.footer__brand p {
  max-width: 30rem;
  font-size: 0.9375rem;
}

.footer__title {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: var(--space-4);
}

.footer__links li {
  margin-bottom: var(--space-2);
}

.footer__links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
}

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

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: 0.8125rem;
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  box-shadow: 0 0 10px rgba(184, 154, 111, 0.5);
  z-index: 200;
}

/* ---------- Keyframes (micro-animações) ---------- */
@keyframes heroGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.7;
  }
  to {
    transform: translate3d(5%, 8%, 0) scale(1.2);
    opacity: 1;
  }
}

@keyframes iconPop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.1) rotate(-4deg);
  }
  100% {
    transform: scale(1);
  }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  box-shadow: var(--shadow);
  z-index: 90;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--navy-dark);
}

.to-top svg {
  width: 22px;
  height: 22px;
}

/* ---------- Mobile menu ---------- */
@media (max-width: 900px) {
  .nav__toggle {
    display: inline-flex;
  }

  .nav__menu {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-left: 1px solid var(--line);
    padding: var(--space-6);
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
    z-index: 150;
  }

  .nav__menu.is-open {
    transform: none;
    box-shadow: var(--shadow-lg);
  }

  .nav__menu li {
    width: 100%;
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  }

  .nav__menu.is-open li {
    opacity: 1;
    transform: none;
  }

  .nav__menu.is-open li:nth-child(1) { transition-delay: 60ms; }
  .nav__menu.is-open li:nth-child(2) { transition-delay: 110ms; }
  .nav__menu.is-open li:nth-child(3) { transition-delay: 160ms; }
  .nav__menu.is-open li:nth-child(4) { transition-delay: 210ms; }
  .nav__menu.is-open li:nth-child(5) { transition-delay: 260ms; }

  .nav__link {
    display: block;
    padding-block: var(--space-4);
    font-size: 1.125rem;
    border-bottom: 1px solid var(--line);
  }

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

  .h-scroll__track { grid-template-columns: repeat(2, 1fr); }
  .card__media { min-height: 240px; }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .section { padding-block: var(--space-7); }
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }

  .h-scroll__track { grid-template-columns: 1fr; }
  .card__media { min-height: 180px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  margin-bottom: var(--space-5);
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb a {
  color: var(--graphite);
  transition: color var(--dur-fast) var(--ease);
}

.breadcrumb a:hover {
  color: var(--ink);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--line);
  font-weight: 400;
}

.breadcrumb li:last-child {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Page hero (internal) ---------- */
.page-hero {
  background: linear-gradient(160deg, var(--hero-a), var(--hero-b));
  color: var(--white);
  padding-block: var(--space-8);
  margin-bottom: var(--space-2);
}

.page-hero__title {
  color: var(--white);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.page-hero__sub {
  color: rgba(255, 255, 255, 0.85);
  max-width: 44rem;
  margin-top: var(--space-4);
}

/* ---------- Prose ---------- */
.prose h2 {
  font-size: 1.75rem;
  margin-top: var(--space-7);
  margin-bottom: var(--space-4);
}

.prose h3 {
  font-size: 1.25rem;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.prose p {
  margin-bottom: var(--space-5);
  color: var(--graphite);
}

.prose ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: var(--space-5);
}

.prose ul li {
  margin-bottom: var(--space-2);
  color: var(--graphite);
}

.prose strong {
  color: var(--ink);
}

/* ---------- Service list ---------- */
.services-list {
  display: grid;
  gap: var(--space-4);
}

.services-list li {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
}

.services-list svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--gold);
  margin-top: 0.15rem;
}

.services-list strong {
  display: block;
  margin-bottom: var(--space-1);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(160deg, var(--hero-a), var(--hero-c));
  color: var(--white);
  text-align: center;
  padding-block: var(--space-9);
}

.cta-band h2 {
  color: var(--white);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-4);
}

.cta-band p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 36rem;
  margin: 0 auto var(--space-6);
}

/* ---------- 404 ---------- */
.error-404 {
  text-align: center;
  padding-block: var(--space-10);
}

.error-404__code {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 15vw, 9rem);
  color: var(--gold);
  line-height: 1;
}

/* ---------- Spotlight Cards ---------- */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.spotlight-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  overflow: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg);
  cursor: default;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--glow-color, rgba(0, 68, 144, 0.14)),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.spotlight-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: skewX(-15deg);
  transition: transform 0.7s ease;
  pointer-events: none;
  z-index: 2;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card:hover::after {
  transform: skewX(-15deg) translateX(300%);
}

.spotlight-card:hover {
  border-color: var(--line);
  z-index: 10;
}

.spotlight-card__accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color, var(--gold)), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.spotlight-card:hover .spotlight-card__accent {
  transform: scaleX(1);
}

.spotlight-card__icon {
  position: relative;
  z-index: 3;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-bg);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease;
}

.spotlight-card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--icon-color);
}

.spotlight-card__title {
  position: relative;
  z-index: 3;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: var(--space-2);
}

.spotlight-card__text {
  position: relative;
  z-index: 3;
  font-size: 0.9375rem;
  color: var(--graphite);
  line-height: 1.6;
}

/* Focus dimming - siblings dim when one is hovered */
.spotlight-grid:hover .spotlight-card:not(:hover) {
  transform: scale(0.96);
  opacity: 0.5;
}

/* Dark theme adjustments */
[data-theme="dark"] .spotlight-card {
  background: rgba(24, 32, 40, 0.8);
  border-color: rgba(39, 50, 63, 0.6);
}

[data-theme="dark"] .spotlight-card:hover {
  border-color: rgba(39, 50, 63, 0.8);
}

[data-theme="dark"] .spotlight-card::before {
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--glow-color, rgba(212, 178, 127, 0.16)),
    transparent 40%
  );
}

/* Responsive */
@media (max-width: 900px) {
  .spotlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ---------- Trust Grid ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.trust-item {
  text-align: center;
  padding: var(--space-6);
}

.trust-item__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-bg);
  border-radius: var(--radius);
  margin: 0 auto var(--space-4);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.trust-item__icon svg {
  width: 28px;
  height: 28px;
  color: var(--icon-color);
}

.trust-item__title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: var(--space-2);
}

.trust-item__text {
  font-size: 0.9375rem;
  color: var(--graphite);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .trust-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* ---------- Services Grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-bg);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}

.service-card__icon svg {
  width: 22px;
  height: 22px;
  color: var(--icon-color);
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: var(--space-2);
}

.service-card__text {
  font-size: 0.9375rem;
  color: var(--graphite);
  line-height: 1.6;
}

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

/* ---------- Steps Grid ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
}

.step-card__num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: var(--space-4);
  display: block;
}

.step-card__title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: var(--space-3);
}

.step-card__text {
  font-size: 0.9375rem;
  color: var(--graphite);
  line-height: 1.6;
}

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

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

.step-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: var(--space-3);
}

.step-card__text {
  font-size: 0.9375rem;
  color: var(--graphite);
  line-height: 1.6;
}

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

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

/* ---------- Diff Card ---------- */
.diff-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.diff-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.diff-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-bg);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}

.diff-card__icon svg {
  width: 22px;
  height: 22px;
  color: var(--icon-color);
}

.diff-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: var(--space-2);
}

.diff-card__text {
  font-size: 0.9375rem;
  color: var(--graphite);
  line-height: 1.6;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
  background: var(--surface);
  overflow: hidden;
}

.faq-item__question {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease;
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--graphite);
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-item__question::after {
  transform: rotate(45deg);
}

.faq-item__question:hover {
  background: var(--paper-dark);
}

.faq-item__answer {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--graphite);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
