/* ==========================================================================
   Pearlbrook Dental - Stylesheet
   ========================================================================== */

/* --- Font Faces (Variable Fonts) --- */

@font-face {
  font-family: 'Sora';
  src: url('/fonts/sora-variable.woff2') format('woff2');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Franklin';
  src: url('/fonts/libre-franklin-variable.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* --- Custom Properties --- */

:root {
  --color-primary: #1B2A4A;
  --color-accent: #2563EB;
  --color-accent-hover: #1D4ED8;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F1F5F9;
  --color-bg-dark: #1B2A4A;
  --color-text: #1E293B;
  --color-text-light: #64748B;
  --color-text-on-dark: #F8FAFC;
  --color-success: #10B981;
  --color-error: #EF4444;
  --color-border: #E2E8F0;
  --color-focus: #2563EB;

  --font-heading: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body: 'Libre Franklin', 'Segoe UI', system-ui, sans-serif;

  --max-width: 1200px;
  --header-height: 72px;
  --transition-base: 0.3s ease;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* --- Reset & Base --- */

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

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

address {
  font-style: normal;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.875rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
}

ul, ol {
  list-style: none;
}

/* --- Focus Indicators --- */

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

/* --- Skip Link --- */

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-100%);
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: transform var(--transition-base);
}

.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

/* --- Container --- */

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

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  min-height: 44px;
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-accent:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

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

.btn-white:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-bg-alt);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.8);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

/* --- Sections --- */

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

.section-dark h2,
.section-dark h3,
.section-dark p {
  color: var(--color-text-on-dark);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--color-text-light);
  font-size: 1.125rem;
  line-height: 1.7;
}

/* --- Header & Navigation --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: #fff;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 0;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

.nav-links {
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-primary);
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.nav-links.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.nav-links a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color var(--transition-base);
  width: 100%;
  text-align: center;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a[aria-current="page"] {
  color: #fff;
}

.nav-cta {
  margin-top: 0.5rem;
  padding: 0 1.5rem;
  width: 100%;
}

.nav-cta .btn {
  width: 100%;
}

.header-cta {
  display: none;
}

/* ── Theme Toggle ── */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: filter var(--transition-base);
}
.theme-toggle:hover { filter: brightness(1.2); }
.theme-toggle svg, .theme-toggle img { width: 22px; height: 22px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 767px) {
  .theme-toggle { order: 1; margin-left: auto; }
  .nav-toggle { order: 2; margin-left: 0.25rem; }
}

/* --- Hero (Split Layout) --- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
  scroll-margin-top: var(--header-height);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 0;
}

.hero-content h1 {
  color: var(--color-primary);
  margin-bottom: 1.25rem;
  font-size: 2.5rem;
  line-height: 1.1;
}

.hero-content p {
  color: var(--color-text-light);
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-image {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #1B2A4A, #3B82F6);
  box-shadow: 0 20px 40px rgba(27, 42, 74, 0.15);
}

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

/* --- Diagonal Clip-Path Dividers --- */

.diagonal-top {
  position: relative;
}

.diagonal-top::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 60px;
  background: inherit;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 1;
}

.diagonal-bottom {
  position: relative;
}

.diagonal-bottom::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  height: 60px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: 1;
}

/* --- Feature Grid ("Why Choose Us") --- */

.features-section {
  background: var(--color-bg-alt);
  position: relative;
  margin-top: 60px;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.features-section::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-bg-alt);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.feature-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(27, 42, 74, 0.1);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--color-text-light);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* --- Services Preview (Alternating Rows) --- */

.services-preview {
  padding: 4rem 0;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
}

.service-row + .service-row {
  border-top: 1px solid var(--color-border);
}

.service-row-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--color-bg-alt), #dbeafe);
}

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

.service-row-content h3 {
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
}

.service-row-content p {
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.service-row-content a {
  font-weight: 600;
  text-decoration: none;
  color: var(--color-accent);
  transition: color var(--transition-base);
}

.service-row-content a:hover {
  color: var(--color-accent-hover);
}

/* --- Patient Journey (Step Flow) --- */

.journey-section {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  position: relative;
  margin-top: 60px;
  margin-bottom: 60px;
  padding: 5rem 0;
  overflow: hidden;
}

.journey-section::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-bg-dark);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.journey-section::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-bg-dark);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* Geometric pattern overlay */
.journey-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 40px, #fff 40px, #fff 41px),
    repeating-linear-gradient(-45deg, transparent, transparent 40px, #fff 40px, #fff 41px);
  pointer-events: none;
}

.journey-section .section-header h2 {
  color: #fff;
}

.journey-section .section-header p {
  color: rgba(248, 250, 252, 0.7);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  position: relative;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 2;
}

.step h3 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.step p {
  color: rgba(248, 250, 252, 0.7);
  font-size: 0.9375rem;
  line-height: 1.65;
  max-width: 280px;
  margin: 0 auto;
}

/* Connecting line between steps (visible on desktop) */
.step-connector {
  display: none;
}

/* --- CTA Banner --- */

.cta-banner {
  background: var(--color-accent);
  padding: 3.5rem 0;
  text-align: center;
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.cta-banner .cta-phone {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: opacity var(--transition-base);
}

.cta-banner .cta-phone:hover {
  opacity: 0.85;
  color: #fff;
}

.cta-banner .cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
}

/* --- Footer --- */

.site-footer {
  background: var(--color-primary);
  color: var(--color-text-on-dark);
  padding: 3.5rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-col h3 {
  color: #fff;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-description {
  max-width: 280px;
}

.footer-description p {
  color: rgba(248, 250, 252, 0.8);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-top: 0.75rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: rgba(248, 250, 252, 0.8);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color var(--transition-base);
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  color: rgba(248, 250, 252, 0.8);
  font-size: 0.9375rem;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-contact-item a {
  color: rgba(248, 250, 252, 0.8);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-contact-item a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.footer-bottom p {
  color: rgba(248, 250, 252, 0.65);
  font-size: 0.8125rem;
}

.footer-bottom a {
  color: rgba(248, 250, 252, 0.65);
  text-decoration: underline;
  transition: color var(--transition-base);
}

.footer-bottom a:hover {
  color: rgba(248, 250, 252, 0.85);
}

/* --- Page Header (Inner Pages) --- */

.page-header {
  background: var(--color-primary);
  padding: 3rem 0;
  text-align: center;
  scroll-margin-top: var(--header-height);
}

.page-header h1 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.page-header p {
  color: rgba(248, 250, 252, 0.75);
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Services Page (Card Grid) --- */

.services-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(27, 42, 74, 0.1);
}

.service-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.service-card-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-text-light);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* --- About Page --- */

.about-profile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.about-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-credentials h2 {
  margin-bottom: 1rem;
}

.about-credentials > p {
  color: var(--color-text-light);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.credential-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
}

.badge svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mission/Values */
.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.value-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.value-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.value-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.value-text h3 {
  margin-bottom: 0.375rem;
  font-size: 1.125rem;
}

.value-text p {
  color: var(--color-text-light);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* --- Contact Page --- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.contact-info-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.contact-info-card h2 {
  font-size: 1.375rem;
  margin-bottom: 1.5rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.contact-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.contact-item-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-item-text {
  font-size: 0.9375rem;
}

.contact-item-label {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.125rem;
}

.contact-item-text a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-base);
}

.contact-item-text a:hover {
  color: var(--color-accent);
}

.contact-item-text p {
  color: var(--color-text-light);
  line-height: 1.6;
}

/* --- Contact Form --- */

.contact-form-wrapper h2 {
  font-size: 1.375rem;
  margin-bottom: 1.5rem;
}

.contact-form {
  display: grid;
  gap: 1.25rem;
}

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

.form-group label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.form-optional {
  font-weight: 400;
  color: var(--color-text-light);
}

.honeypot {
  display: none;
}

.form-submit-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#form-status {
  font-size: 0.9375rem;
  line-height: 1.5;
}

#form-status.success {
  color: var(--color-success);
}

#form-status.error {
  color: var(--color-error);
}

/* --- Privacy Page --- */

.privacy-content {
  max-width: 780px;
  margin: 0 auto;
}

.privacy-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.privacy-content h2:first-child {
  margin-top: 0;
}

.privacy-content p {
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.privacy-content ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.privacy-content ul li {
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 0.375rem;
}

.privacy-content a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* --- 404 Page --- */

.error-page {
  text-align: center;
  padding: 4rem 0;
}

.error-code {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 6rem;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--color-text-light);
  font-size: 1.125rem;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
}

/* --- Animations --- */

@media (prefers-reduced-motion: no-preference) {
  .hero-content {
    animation: heroFadeIn 0.8s ease both;
  }

  @keyframes heroFadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* --- Responsive: Tablet (768px) --- */

@media (min-width: 768px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .container {
    padding: 0 2rem;
  }

  .section {
    padding: 5rem 0;
  }

  /* Header */
  .nav-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    flex-direction: row;
    background: none;
    padding: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
    gap: 0.25rem;
    order: 1;
    margin-left: auto;
  }

  .nav-links a {
    padding: 0.5rem 0.75rem;
    width: auto;
    text-align: left;
    font-size: 0.9375rem;
  }

  .nav-cta {
    display: none;
  }

  .theme-toggle {
    order: 2;
  }

  .header-cta {
    display: block;
    flex-shrink: 0;
    margin-left: 1rem;
    order: 3;
  }

  .header-cta .btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
  }

  /* Hero */
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 4rem 0;
  }

  .hero-content h1 {
    font-size: 2.75rem;
  }

  /* Features */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Services Preview */
  .service-row {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 2.5rem 0;
  }

  .service-row:nth-child(even) .service-row-image {
    order: 2;
  }

  .service-row-content h3 {
    font-size: 1.5rem;
  }

  /* Steps */
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .step-connector {
    display: block;
    position: absolute;
    top: 28px;
    height: 2px;
    background: rgba(59, 130, 246, 0.4);
    z-index: 1;
  }

  .step-connector-1 {
    left: 16.66%;
    width: 33.33%;
    top: 28px;
  }

  .step-connector-2 {
    left: 50%;
    width: 33.33%;
    top: 28px;
  }

  /* CTA Banner */
  .cta-banner .cta-phone {
    font-size: 1.75rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }

  /* Page Header */
  .page-header {
    padding: 4rem 0;
  }

  /* Services Card Grid */
  .services-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* About */
  .about-profile {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

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

  /* Contact */
  .contact-grid {
    grid-template-columns: 5fr 7fr;
    gap: 3rem;
  }
}

/* --- Responsive: Desktop (1024px) --- */

@media (min-width: 1024px) {
  .section {
    padding: 6rem 0;
  }

  /* Hero */
  .hero-grid {
    padding: 5rem 0;
  }

  .hero-content h1 {
    font-size: 3.25rem;
  }

  .hero-content p {
    font-size: 1.1875rem;
  }

  /* Services Card Grid */
  .services-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }

  /* 404 */
  .error-code {
    font-size: 8rem;
  }
}

/* --- Responsive: Large Desktop (1280px) --- */

@media (min-width: 1280px) {
  .hero-content h1 {
    font-size: 3.5rem;
  }

  .hero-grid {
    padding: 6rem 0;
  }
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */

/* System preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-primary: #2A4470;
    --color-accent: #60A5FA;
    --color-accent-hover: #3B82F6;
    --color-bg: #0F1520;
    --color-bg-alt: #151D2E;
    --color-bg-dark: #0A0F18;
    --color-text: #E2E6EC;
    --color-text-light: #8A9AB0;
    --color-text-on-dark: #E2E6EC;
    --color-success: #34D399;
    --color-error: #F87171;
    --color-border: #2A3548;
    --color-focus: #60A5FA;
  }

  :root:not([data-theme="light"]) .hero-image {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  }

  :root:not([data-theme="light"]) .service-row-image {
    background: linear-gradient(135deg, var(--color-bg-alt), #1a2a4a);
  }

  :root:not([data-theme="light"]) .feature-icon {
    background: rgba(96, 165, 250, 0.12);
  }

  :root:not([data-theme="light"]) .feature-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  :root:not([data-theme="light"]) .feature-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }

  :root:not([data-theme="light"]) .service-card-icon,
  :root:not([data-theme="light"]) .value-icon {
    background: rgba(96, 165, 250, 0.12);
  }

  :root:not([data-theme="light"]) .contact-item-icon {
    background: var(--color-bg-alt);
  }

  :root:not([data-theme="light"]) .form-group input,
  :root:not([data-theme="light"]) .form-group textarea {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
    color: var(--color-text);
  }

  :root:not([data-theme="light"]) #form-status.success {
    color: #34D399;
  }

  :root:not([data-theme="light"]) .step::after {
    border-color: var(--color-border);
  }
}

/* Explicit toggle */
:root[data-theme="dark"] {
  --color-primary: #2A4470;
  --color-accent: #60A5FA;
  --color-accent-hover: #3B82F6;
  --color-bg: #0F1520;
  --color-bg-alt: #151D2E;
  --color-bg-dark: #0A0F18;
  --color-text: #E2E6EC;
  --color-text-light: #8A9AB0;
  --color-text-on-dark: #E2E6EC;
  --color-success: #34D399;
  --color-error: #F87171;
  --color-border: #2A3548;
  --color-focus: #60A5FA;
}

:root[data-theme="dark"] .hero-image {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

:root[data-theme="dark"] .service-row-image {
  background: linear-gradient(135deg, var(--color-bg-alt), #1a2a4a);
}

:root[data-theme="dark"] .feature-icon {
  background: rgba(96, 165, 250, 0.12);
}

:root[data-theme="dark"] .feature-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

:root[data-theme="dark"] .feature-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .service-card-icon,
:root[data-theme="dark"] .value-icon {
  background: rgba(96, 165, 250, 0.12);
}

:root[data-theme="dark"] .contact-item-icon {
  background: var(--color-bg-alt);
}

:root[data-theme="dark"] .form-group input,
:root[data-theme="dark"] .form-group textarea {
  background: var(--color-bg-alt);
  border-color: var(--color-border);
  color: var(--color-text);
}

:root[data-theme="dark"] #form-status.success {
  color: #34D399;
}

:root[data-theme="dark"] .step::after {
  border-color: var(--color-border);
}
