/* ═════════════════════════════════════════════════════════════════════════
   NLC DESIGN SYSTEM v1.0
   Three-tier token architecture: PRIMITIVE → SEMANTIC → COMPONENT
   ═════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────
   LEVEL 1: PRIMITIVE TOKENS (raw values)
   ───────────────────────────────────────────────────────────────────── */

:root {
  /* Colors — PRIMITIVE */
  --red-600: #d80000;
  --red-700: #a80800;
  --red-500: #f82010;

  --ink-900: #121212;
  --ink-800: #1b1b1d;
  --ink-700: #2c2c2e;

  --paper: #ffffff;
  --paper-2: #f5f4f2;
  --paper-3: #e8e6e0;

  --line: #e6e4e0;
  --line-dark: #3c3c3e;

  --muted: #55555a;
  --muted-light: #8e8e93;

  /* Spacing Scale (modular: 4px base) */
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.5rem; /* 24px */
  --space-6: 2rem; /* 32px */
  --space-7: 3rem; /* 48px */
  --space-8: 4rem; /* 64px */
  --space-9: 6rem; /* 96px */
  --space-10: 8rem; /* 128px */

  /* Type Scale (modular: 1.25 multiplier) */
  --fs-xs: 0.75rem; /* 12px */
  --fs-sm: 0.875rem; /* 14px */
  --fs-base: 1rem; /* 16px */
  --fs-lg: 1.25rem; /* 20px */
  --fs-xl: 1.5625rem; /* 25px */
  --fs-2xl: 1.953rem; /* 31px */
  --fs-3xl: 2.441rem; /* 39px */
  --fs-4xl: 3.052rem; /* 49px */
  --fs-5xl: 3.815rem; /* 61px */

  /* Line height */
  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.75;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(18, 18, 18, 0.05);
  --shadow-md: 0 4px 6px rgba(18, 18, 18, 0.1);
  --shadow-lg: 0 10px 15px rgba(18, 18, 18, 0.15);
  --shadow-xl: 0 20px 25px rgba(18, 18, 18, 0.2);

  /* Layout */
  --container: 1280px;
  --container-md: 960px;
  --container-sm: 640px;

  /* Animation */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 600ms;
}

/* ─────────────────────────────────────────────────────────────────────
   LEVEL 2: SEMANTIC TOKENS (roles & intentions)
   ───────────────────────────────────────────────────────────────────── */

:root {
  /* Brand colors */
  --color-brand: var(--red-600); /* Primary CTA, accents */
  --color-brand-strong: var(--red-700); /* Hover, emphasis */
  --color-brand-light: #fff3f2; /* Brand bg tint */

  /* Text colors */
  --color-text: var(--ink-900); /* Primary text */
  --color-text-secondary: var(--ink-700);
  --color-text-muted: var(--muted);
  --color-text-light: var(--muted-light);

  /* Background colors */
  --color-bg: var(--paper); /* Default bg */
  --color-bg-alt: var(--paper-2); /* Secondary section */
  --color-bg-tertiary: var(--paper-3); /* Subtle bg */
  --color-bg-dark: var(--ink-800); /* Dark section */
  --color-bg-dark-strong: var(--ink-900);

  /* Interactive */
  --color-border: var(--line);
  --color-border-dark: var(--line-dark);

  /* Status (for future use) */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
}

/* ─────────────────────────────────────────────────────────────────────
   LEVEL 3: COMPONENT TOKENS (optional, reusable patterns)
   ───────────────────────────────────────────────────────────────────── */

:root {
  /* Button */
  --btn-padding-y: var(--space-3);
  --btn-padding-x: var(--space-5);
  --btn-radius: var(--radius-sm);
  --btn-font-size: var(--fs-base);
  --btn-font-weight: 600;

  /* Card */
  --card-padding: var(--space-6);
  --card-radius: var(--radius-lg);
  --card-shadow: var(--shadow-md);

  /* Input */
  --input-padding: var(--space-3) var(--space-4);
  --input-radius: var(--radius-md);
  --input-border: 1px solid var(--color-border);

  /* Header */
  --header-height: 80px;
  --header-bg: var(--color-bg);
  --header-shadow: 0 2px 8px rgba(18, 18, 18, 0.08);

  /* Breakpoints (mobile-first) */
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
}

/* ═════════════════════════════════════════════════════════════════════════
   GLOBAL STYLES
   ═════════════════════════════════════════════════════════════════════════ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Page-to-page navigation as one soft transition instead of a hard cut
     (cross-document View Transitions: Chrome/Edge 126+, Safari 18.2+; others navigate as before). */
  @view-transition {
    navigation: auto;
  }
}

/* The header is its own transition group, so it stays put while the content changes. */
header {
  view-transition-name: site-header;
}

::view-transition-old(root) {
  animation: page-out 160ms cubic-bezier(0.3, 0, 1, 1) both;
}

::view-transition-new(root) {
  animation: page-in 240ms cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes page-out {
  to {
    opacity: 0;
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 1100;
  background: var(--color-bg);
  color: var(--color-text);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  top: var(--space-2);
}

body {
  font-family:
    "Inter",
    "Inter Fallback",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

/* Typography base */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", "Playfair Fallback", Georgia, serif;
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--fs-5xl);
  margin-bottom: var(--space-5);
}

h2 {
  font-size: var(--fs-4xl);
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-3);
}

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-smooth);
}

a:hover {
  color: var(--color-brand-strong);
}

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

/* ═════════════════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
   ═════════════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.container-md {
  width: 100%;
  max-width: var(--container-md);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

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

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

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

.grid-6 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-space-4 {
  gap: var(--space-4);
}
.gap-space-6 {
  gap: var(--space-6);
}

.mt-space-4 {
  margin-top: var(--space-4);
}
.mt-space-6 {
  margin-top: var(--space-6);
}
.mt-space-9 {
  margin-top: var(--space-9);
}

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

.py-space-6 {
  padding: var(--space-6) 0;
}
.py-space-9 {
  padding: var(--space-9) 0;
}

.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}

/* ═════════════════════════════════════════════════════════════════════════
   HEADER (sticky)
   ═════════════════════════════════════════════════════════════════════════ */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--header-shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--space-5);
}

.logo {
  flex: 0 0 auto;
  width: 120px;
}

.logo img {
  width: 100%;
  height: auto;
}

#nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex: 1;
  margin-left: var(--space-8);
}

#nav-menu a {
  font-size: var(--fs-sm);
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}

#nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-brand);
  transition: width var(--duration-fast) var(--ease-smooth);
}

#nav-menu a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* 24px icon inside a 44px touch area; the negative margin keeps the visual spacing unchanged. */
.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -10px;
  cursor: pointer;
  flex: 0 0 auto;
}

.search-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-brand);
  fill: none;
}

.btn-phone {
  background: var(--color-brand);
  color: var(--color-bg);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-radius);
  font-weight: var(--btn-font-weight);
  font-size: var(--fs-sm);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.btn-phone:hover {
  background: var(--color-brand-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* The header phone is a .btn link; keep it compact where .btn goes full width. */
.header-actions .btn-phone {
  width: auto;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Phone in landscape: a shorter sticky header leaves room for content. */
@media (orientation: landscape) and (max-height: 500px) {
  :root {
    --header-height: 60px;
  }

  .logo {
    width: 84px;
  }
}

.lang-switch {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-1);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
  padding: 8px;
  margin: -8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: all var(--duration-normal) var(--ease-smooth);
  transform-origin: center;
}

/* Bars are 2px tall with a 4px gap: 6px between centres, so outer bars meet in the middle. */
.burger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ─────────────────────────────────────────────────────────────────────
   MOBILE: BURGER MENU
   Six nav items + phone + EN need ~1100px on one line, so the burger takes over below 1180px.
   ───────────────────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  #nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    margin-left: 0;
    background: var(--color-bg);
    flex-direction: column;
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4);
    gap: var(--space-4);
    z-index: 999;
  }

  #nav-menu.active {
    display: flex;
  }

  .burger {
    display: flex;
  }

  .header-inner {
    padding: 0 var(--space-4);
  }

  .logo {
    width: 100px;
  }

  #nav-menu a {
    font-size: var(--fs-base);
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═════════════════════════════════════════════════════════════════════════ */

.hero {
  background: var(--color-bg);
  padding: var(--space-9) var(--space-5);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.hero h1 {
  font-size: var(--fs-5xl);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-4);
}

.hero-subtitle {
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-6);
  max-width: 30rem; /* rem, not ch: ch is 0.5em until the web font loads, so a ch measure reflows (CLS) */
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

/* One entrance for the whole hero; transform only, so LCP text is painted on the first frame. */
.hero-content,
.hero-image {
  animation: riseIn 0.45s var(--ease-smooth) both;
}

.hero-image {
  animation-delay: 0.08s;
}

.btn {
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-radius);
  font-weight: var(--btn-font-weight);
  font-size: var(--fs-base);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-family: "Inter", "Inter Fallback", Arial, sans-serif;
}

.btn-primary {
  background: var(--color-brand);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: var(--color-brand-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
  background: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border);
  transform: translateY(-3px);
}

.btn-secondary:disabled {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border-color: var(--color-border);
  cursor: not-allowed;
  transform: none;
}

/* Buttons rendered as links keep their own text colour over the global a:hover. */
.btn-primary:hover,
.btn-cta:hover,
.btn-phone:hover,
.sticky-cta:hover {
  color: var(--color-bg);
}

.btn-secondary:hover {
  color: var(--color-text);
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

/* ─────────────────────────────────────────────────────────────────────
   ANIMATIONS
   ───────────────────────────────────────────────────────────────────── */

@keyframes riseIn {
  from {
    transform: translateY(12px);
  }
  to {
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────────────────────────────
   ACCESSIBILITY: RESPECT REDUCED MOTION PREFERENCES
   ───────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   STATS SECTION
   ═════════════════════════════════════════════════════════════════════════ */

.stats {
  background: var(--color-bg-alt);
  padding: var(--space-9) var(--space-5);
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
  max-width: var(--container);
  margin: 0 auto;
}

.stat-card {
  text-align: center;
  padding: var(--space-6);
}

.stat-number {
  font-size: var(--fs-5xl);
  font-family: "Playfair Display", "Playfair Fallback", Georgia, serif;
  font-variant-numeric: lining-nums;
  color: var(--color-brand);
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--fs-lg);
  color: var(--color-text-secondary);
  line-height: var(--lh-normal);
}

/* ═════════════════════════════════════════════════════════════════════════
   ABOUT SECTION
   ═════════════════════════════════════════════════════════════════════════ */

.about {
  padding: var(--space-9) var(--space-5);
  background: var(--color-bg);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-content h2 {
  margin-bottom: var(--space-4);
}

.about-content p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  line-height: var(--lh-relaxed);
}

/* ═════════════════════════════════════════════════════════════════════════
   SERVICES SECTION
   ═════════════════════════════════════════════════════════════════════════ */

.services {
  padding: var(--space-9) var(--space-5);
  background: var(--color-bg-alt);
}

.services-header {
  text-align: center;
  max-width: var(--container-md);
  margin: 0 auto var(--space-9) auto;
}

.services-header h2 {
  margin-bottom: var(--space-4);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: var(--container);
  margin: 0 auto;
}

a.service-card {
  color: inherit;
}

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

.service-card {
  background: var(--color-bg);
  padding: var(--space-6);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  transition: all var(--duration-normal) var(--ease-smooth);
  display: flex;
  flex-direction: column;
  text-align: center;
}

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

.service-number {
  width: 80px;
  height: 80px;
  background: var(--color-brand);
  color: var(--color-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-3xl);
  font-family: "Playfair Display", "Playfair Fallback", Georgia, serif;
  font-weight: 700;
  /* Playfair defaults to old-style figures (3/4/5 drop below the baseline, 6 rises):
     lining figures + a cap-height text box put every digit on the circle's optical centre. */
  font-variant-numeric: lining-nums;
  line-height: 1;
  text-box: trim-both cap alphabetic;
  padding-bottom: 0.08em; /* measured: ink sat ~1.2px low after trimming */
  margin: 0 auto var(--space-5) auto;
  flex: 0 0 auto;
  aspect-ratio: 1;
}

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

.service-card p {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
  margin: 0;
}

/* ═════════════════════════════════════════════════════════════════════════
   PRACTICE SECTION
   ═════════════════════════════════════════════════════════════════════════ */

.practice {
  padding: var(--space-9) var(--space-5);
  background: var(--color-bg);
}

.practice-header {
  text-align: center;
  max-width: var(--container-md);
  margin: 0 auto var(--space-9) auto;
}

.practice-header h2 {
  margin-bottom: var(--space-4);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  max-width: var(--container);
  margin: 0 auto;
}

.case-card {
  background: var(--color-bg-alt);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all var(--duration-normal) var(--ease-smooth);
  cursor: pointer;
}

.case-card {
  position: relative;
}

/* The whole card is clickable through its heading link. */
.case-content h3 a {
  color: inherit;
}

.case-content h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.case-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--color-brand-light), var(--color-bg-alt));
  overflow: hidden;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-content {
  padding: var(--space-5);
}

.case-content h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-2);
}

.case-content p {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* ═════════════════════════════════════════════════════════════════════════
   TRUST SECTION (dark)
   ═════════════════════════════════════════════════════════════════════════ */

.trust {
  position: relative;
  padding: var(--space-9) var(--space-5);
  color: var(--color-bg);
  overflow: hidden;
}

.trust::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("library-1280.webp");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.trust::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(27, 27, 29, 0.88);
  z-index: 1;
}

.trust-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container-md);
  margin: 0 auto;
  text-align: center;
}

.trust h2 {
  color: var(--color-bg);
  margin-bottom: var(--space-4);
}

.trust p {
  font-size: var(--fs-lg);
  color: var(--color-bg);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-6);
}

/* ═════════════════════════════════════════════════════════════════════════
   FORM SECTION
   ═════════════════════════════════════════════════════════════════════════ */

.form-section {
  background: var(--color-bg-dark);
  padding: var(--space-9) var(--space-5);
  color: var(--color-bg);
}

.form-inner {
  max-width: var(--container-md);
  margin: 0 auto;
}

/* callback.html puts .form-section on the <form> itself: section-sized padding is too much there */
form.form-section {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
}

.form-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.form-header h2 {
  color: var(--color-bg);
  margin-bottom: var(--space-3);
}

.form-header p {
  color: var(--color-bg);
  font-size: var(--fs-lg);
}

form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

label {
  font-size: var(--fs-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-bg);
}

.form-section :is(input, select, textarea) {
  padding: var(--input-padding);
  border: var(--input-border);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--input-radius);
  font-family: "Inter", "Inter Fallback", Arial, sans-serif;
  font-size: var(--fs-base);
  color: var(--color-bg);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.form-section :is(input, textarea)::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.form-section :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-color: var(--color-brand);
  background: rgba(255, 255, 255, 0.1);
}

.form-section :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--color-brand);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(216, 0, 0, 0.1);
}

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

select option {
  color: var(--color-text);
  background: var(--color-bg);
}

.optional {
  font-weight: 400;
  opacity: 0.75;
}

.req {
  color: var(--color-brand);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-weight: 400;
  line-height: var(--lh-normal);
  margin: 0;
  cursor: pointer;
}

.consent input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  padding: 0;
  accent-color: var(--color-brand);
}

.consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.form-status {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-success);
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-bg);
}

.form-submit {
  align-self: center;
  margin-top: var(--space-4);
}

.btn-cta {
  background: var(--color-brand);
  color: var(--color-bg);
  padding: var(--space-4) var(--space-8);
  font-size: var(--fs-lg);
  font-weight: 700;
}

.btn-cta:hover {
  background: var(--color-brand-strong);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(216, 0, 0, 0.3);
}

.btn-cta:disabled {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ═════════════════════════════════════════════════════════════════════════
   FOOTER
   ═════════════════════════════════════════════════════════════════════════ */

footer {
  background: var(--color-bg-dark);
  color: var(--color-bg);
  padding: var(--space-9) var(--space-5) var(--space-6) var(--space-5);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-8);
}

.footer-col h3 {
  color: var(--color-bg);
  font-size: var(--fs-lg);
  margin-bottom: var(--space-3);
}

.footer-col p,
.footer-col a {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.85);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-2);
}

.footer-col a:hover {
  color: var(--color-brand);
}

.footer-col ul {
  list-style: none;
}

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

/* Footer links: at least 24px tall touch targets (WCAG 2.5.8). */
.footer-col li a,
.footer-col p a {
  display: inline-block;
  padding: 3px 0;
  margin-bottom: 0;
}

.footer-logo {
  width: 140px;
  height: auto;
  margin-bottom: var(--space-5);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.65);
}

.footer-bottom a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ═════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN (mobile-first)
   ═════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .hero-inner,
  .about-inner {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: var(--fs-4xl);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --fs-5xl: 2.441rem;
    --fs-4xl: 1.953rem;
    --fs-3xl: 1.563rem;
    --space-9: 3rem;
    --space-8: 2rem;
  }

  h1 {
    font-size: var(--fs-4xl);
  }

  .hero,
  .about,
  .services,
  .practice,
  .trust,
  .form-section {
    padding: var(--space-6) var(--space-4);
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .services-grid,
  .practice-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .footer-col {
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-col:last-child {
    border-bottom: none;
  }
}

@media (max-width: 640px) {
  /* Keep the scale monotonic: h2 in articles (2xl) must stay above h3 (xl). */
  :root {
    --fs-5xl: 2rem;
    --fs-4xl: 1.625rem;
    --fs-3xl: 1.375rem;
    --fs-2xl: 1.25rem;
    --fs-xl: 1.125rem;
  }

  .stats-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  .stat-card {
    padding: var(--space-3) var(--space-2);
  }

  .stat-number {
    font-size: 1.625rem;
  }

  .stat-label {
    font-size: var(--fs-sm);
  }

  .logo {
    width: 80px;
  }

  .header-actions {
    gap: var(--space-2);
  }

  .btn-phone {
    padding: var(--space-2) var(--space-3);
    font-size: var(--fs-xs);
  }

  .hero-image img {
    aspect-ratio: 3 / 4;
  }

  .service-number {
    width: 60px;
    height: 60px;
    font-size: var(--fs-2xl);
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY & UTILITIES
   ═════════════════════════════════════════════════════════════════════════ */

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

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* ═════════════════════════════════════════════════════════════════════════
   INTERNAL PAGE STYLES
   ═════════════════════════════════════════════════════════════════════════ */

/* Page Hero Section */
.page-hero {
  background: linear-gradient(135deg, var(--color-brand-light), var(--color-bg-alt));
  padding: var(--space-9) var(--space-5) var(--space-6);
  border-bottom: 2px solid var(--color-border);
}

.page-hero-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.page-hero h1 {
  font-size: var(--fs-4xl);
  margin-bottom: var(--space-3);
  line-height: var(--lh-tight);
}

.breadcrumbs {
  display: flex;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

.breadcrumbs a {
  color: var(--color-brand);
  display: inline-block;
  padding: 3px 0;
}

/* Links inside running text are underlined, not told apart by colour alone (WCAG 1.4.1). */
main :is(p, li) > a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Inline links: vertical padding grows the hit area to 24px without changing line layout. */
main :is(p, li) > a:not(.btn),
.map-link a,
.consent a,
.footer-bottom a,
.cookie-consent a {
  padding-block: 4px;
}

main .sidebar-services li > a {
  padding-block: var(--space-2);
}

main .sidebar-services li > a {
  text-decoration: none;
}

.breadcrumbs span {
  color: var(--color-text-muted);
}

/* Page Layout: 2-Column on desktop, 1-column mobile */
.page-layout {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-9) var(--space-5);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-8);
}

/* Text-only pages (privacy, consent, 404): one readable column. */
.page-layout--text {
  grid-template-columns: minmax(0, 800px);
}

.article {
  line-height: var(--lh-relaxed);
}

.article h2 {
  font-size: var(--fs-3xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-brand);
}

.article h3 {
  font-size: var(--fs-2xl);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--color-brand);
}

.article p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  max-width: 45rem;
}

.article ul,
.article ol {
  margin-bottom: var(--space-5);
  margin-left: var(--space-6);
}

.article li {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  line-height: var(--lh-relaxed);
}

.article img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin: var(--space-6) 0;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.sidebar-cta {
  background: var(--color-bg-dark);
  color: var(--color-bg);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.sidebar-cta h3 {
  color: var(--color-bg);
  font-size: var(--fs-xl);
  margin-bottom: var(--space-3);
}

.sidebar-cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-4);
}

.sidebar-cta .btn-cta {
  width: 100%;
  margin-bottom: var(--space-4);
}

.sidebar-phone {
  background: var(--color-bg-alt);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  text-align: center;
  border: 2px solid var(--color-border);
}

.sidebar-phone p {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.sidebar-phone a {
  display: inline-block;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-brand);
  text-decoration: none;
}

/* Sidebar Services List */
.sidebar-services {
  background: var(--color-bg-alt);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.sidebar-services h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.sidebar-services ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-services li {
  margin-bottom: var(--space-3);
}

.sidebar-services a {
  font-size: var(--fs-sm);
  color: var(--color-brand);
  text-decoration: none;
  padding: var(--space-2);
  border-left: 3px solid transparent;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.sidebar-services a:hover {
  border-left-color: var(--color-brand);
  padding-left: var(--space-3);
}

/* Service Catalog Grid */
.services-catalog {
  padding: var(--space-9) var(--space-5);
  background: var(--color-bg);
}

.services-catalog-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.catalog-card {
  background: var(--color-bg-alt);
  padding: var(--space-6);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--duration-normal) var(--ease-smooth);
  display: flex;
  flex-direction: column;
}

.catalog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  background: var(--color-bg);
}

.catalog-card h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-3);
  color: var(--color-brand);
}

.catalog-card p {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
  margin: 0;
  flex-grow: 1;
}

.catalog-card::after {
  content: "→";
  margin-top: var(--space-4);
  color: var(--color-brand);
  font-weight: 700;
}

/* CTA Section Dark */
.cta-section {
  background: var(--color-bg-dark);
  padding: var(--space-9) var(--space-5);
  color: var(--color-bg);
}

.cta-section-inner {
  max-width: var(--container-md);
  margin: 0 auto;
  text-align: center;
}

.cta-section h2 {
  color: var(--color-bg);
  margin-bottom: var(--space-4);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-lg);
  margin-bottom: var(--space-8);
}

/* Related/Recent Services */
.related-section {
  background: var(--color-bg-alt);
  padding: var(--space-9) var(--space-5);
}

.related-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
}

.related-card {
  background: var(--color-bg);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--duration-fast) var(--ease-smooth);
}

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

.related-card h4 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-2);
}

.related-card p {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* Responsive: Internal Pages */
@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .page-hero h1 {
    font-size: var(--fs-3xl);
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: var(--space-6) var(--space-4);
  }

  .page-layout {
    padding: var(--space-6) var(--space-4);
    gap: var(--space-5);
  }

  .article h2 {
    font-size: var(--fs-2xl);
    margin-top: var(--space-5);
  }

  .article h3 {
    font-size: var(--fs-xl);
    margin-top: var(--space-4);
  }

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

  .breadcrumbs {
    font-size: var(--fs-xs);
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   DARK MODE (future)
   ═════════════════════════════════════════════════════════════════════════ */

/* Lightbox (thank-you letters). No `display` on the dialog itself: that would keep a closed dialog visible. */
.lightbox {
  margin: auto; /* the global `* { margin: 0 }` reset removes the UA centring of <dialog> */
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(92vw, 860px);
  max-height: 94vh;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(18, 18, 18, 0.82);
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .lightbox__close {
    top: 6px;
    right: 6px;
  }
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand, #d80000);
  color: #fff;
  padding: 0.95rem 1.6rem;
  border-radius: 8px;
  font-family: "Inter", "Inter Fallback", Arial, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(216, 0, 0, 0.34);
  transition:
    transform 0.25s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    opacity 0.25s ease,
    visibility 0.25s ease;
}
.sticky-cta:hover {
  background: var(--color-brand-strong, #a80800);
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(216, 0, 0, 0.46);
}
.sticky-cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
.sticky-cta.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  pointer-events: none;
}
@media (max-width: 600px) {
  .sticky-cta {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    box-shadow: 0 -6px 22px rgba(18, 18, 18, 0.18);
  }
}

/* Cookie notice */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1002;
  background: var(--color-bg-dark, #1b1b1d);
  color: #fff;
  padding: 1rem 1.5rem;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.92rem;
}
.cookie-consent[hidden] {
  display: none;
}
.cookie-consent p {
  margin: 0;
  max-width: 36rem;
}
.cookie-consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Desktop: a compact card in the corner instead of a full-width bar over the hero CTAs. */
@media (min-width: 769px) {
  .cookie-consent {
    left: auto;
    right: 24px;
    bottom: 24px;
    max-width: 400px;
    border-radius: 12px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.1rem 1.25rem;
    font-size: 0.875rem;
  }
}
.cookie-consent__actions {
  display: flex;
  gap: 0.6rem;
}
.cookie-consent button {
  font-family: "Inter", "Inter Fallback", Arial, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
}
.cookie-consent .cc-accept {
  background: var(--color-brand, #d80000);
  color: #fff;
}
.cookie-consent .cc-decline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.cookie-consent button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
