/* =============================================
   Kryotek Softwares — design system
   Mobile-first · CSS custom properties · Grid/Flex
   ============================================= */

:root {
  /* Core brand */
  --color-primary: #dc2626;
  --color-primary-hover: #b91c1c;
  --color-accent: #ef4444;
  --color-on-primary: #ffffff;
  /* Red used as text/iconography, split from the fill colour: #dc2626 only
     reaches 4.39:1 on --bg-secondary, so text steps to the deeper red here and
     to a lighter one in dark mode. Button fills keep --color-primary. */
  --color-link: var(--color-primary-hover);
  --color-link-hover: var(--color-primary);

  /* Light theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f4f4f5;
  --bg-surface: #fafafa;
  --bg-elevated: #ffffff;
  --text-main: #09090b;
  --text-muted: #52525b;
  --border-color: #e4e4e7;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --header-bg: rgba(255, 255, 255, 0.86);
  --overlay: rgba(9, 9, 11, 0.5);
  --grid-line: rgba(9, 9, 11, 0.06);
  --hero-glow: rgba(220, 38, 38, 0.12);

  /* Typography */
  --font-sans: "Plus Jakarta Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.5rem;
  --fs-xl: 2rem;
  --fs-2xl: 2.5rem;
  --fs-3xl: 3.5rem;
  /* Fluid heading tiers: display (hero h1), section (page h1 + section h2),
     block (repeated h2 inside a list of sections). */
  --fs-display: clamp(2.15rem, 8vw, var(--fs-3xl));
  --fs-section: clamp(1.75rem, 4vw, var(--fs-2xl));
  --fs-block: clamp(var(--fs-lg), 3vw, var(--fs-xl));
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-body: 1.65;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
  --tracking-tight: -0.03em;
  --tracking-wide: 0.08em;

  /* Spacing & layout */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --container: 72rem;
  --header-h: 4.25rem;
  --gutter: 1.25rem;
  --measure: 40rem;
  --measure-narrow: 24rem;
  --control-h: 2.75rem;
  --control-h-sm: 2.25rem;
  --size-chip: 2.5rem;
  --icon-size: 1.25rem;
  --icon-size-sm: 1rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-full: 999px;

  /* Motion */
  --duration-fast: 150ms;
  --duration: 220ms;
  --duration-slow: 360ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --focus-ring: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--color-primary);
  --color-scheme: light;
  color-scheme: var(--color-scheme);
}

[data-theme="dark"] {
  --bg-primary: #09090b;
  --bg-secondary: #18181b;
  --bg-surface: #27272a;
  --bg-elevated: #18181b;
  --text-main: #ffffff;
  --text-muted: #a1a1aa;
  --border-color: #3f3f46;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.55);
  --header-bg: rgba(9, 9, 11, 0.86);
  --color-link: #f87171;
  --color-link-hover: #fca5a5;
  --overlay: rgba(0, 0, 0, 0.65);
  --grid-line: rgba(255, 255, 255, 0.06);
  --hero-glow: rgba(220, 38, 38, 0.22);
  --color-scheme: dark;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--text-main);
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2 {
  font-size: var(--fs-section);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--fw-extrabold);
}

h3 {
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
  font-weight: var(--fw-bold);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: 2000;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
}

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

body.is-nav-open {
  overflow: hidden;
}

@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;
  }
}

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

.site-main {
  flex: 1;
}

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

.section-muted {
  background: var(--bg-secondary);
}

.section-head {
  max-width: var(--measure);
  margin-bottom: var(--space-10);
}

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

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-link);
}

.lead {
  margin-top: var(--space-4);
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: var(--fs-md);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

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

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--tracking-tight);
  font-size: var(--fs-md);
  flex-shrink: 0;
}

.logo img {
  width: auto;
  height: 2rem;
  display: block;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-1);
}

.nav-desktop a {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--text-main);
  background: var(--bg-secondary);
}

.nav-desktop a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--color-link);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

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

.btn.header-cta {
  display: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-h);
  height: var(--control-h);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  transition: background var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

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

.icon-btn svg {
  width: var(--icon-size);
  height: var(--icon-size);
}

[data-theme="light"] .icon-sun,
[data-theme="dark"] .icon-moon {
  display: none;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Drawer */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease);
}

.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 160;
  width: min(20.5rem, 88vw);
  height: 100%;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease);
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer:not(.is-open) {
  visibility: hidden;
  pointer-events: none;
}

.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.nav-drawer a.nav-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  color: var(--text-main);
}

.nav-drawer a.nav-link[aria-current="page"],
.nav-drawer a.nav-link:hover {
  background: var(--bg-secondary);
}

.nav-drawer .btn {
  margin-top: var(--space-4);
  width: 100%;
}

@media (min-width: 768px) {
  :root {
    --gutter: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }

  .btn.header-cta {
    display: inline-flex;
  }

  .nav-toggle {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-h);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  border: 1px solid transparent;
  transition: background var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-sm);
}

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

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

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

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-16) var(--space-20);
  background:
    radial-gradient(ellipse 80% 50% at 80% -10%, var(--hero-glow), transparent 55%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--bg-primary);
  background-size: auto, 2.5rem 2.5rem, 2.5rem 2.5rem, auto;
}

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

.hero-copy h1 {
  font-size: var(--fs-display);
  max-width: 16ch;
}

/* Animated node mesh. The canvas paints itself from the theme tokens below,
   so colours are read in JS rather than duplicated there. */
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero-visual canvas {
  width: 100%;
  height: 100%;
}

.hero-visual-meta {
  position: absolute;
  left: var(--space-5);
  bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-dot {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background: var(--color-link);
  animation: hero-pulse 2.6s var(--ease) infinite;
}

@keyframes hero-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-link) 55%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 0.6rem color-mix(in srgb, var(--color-link) 0%, transparent);
  }
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
  }
}

/* Page hero (inner pages) */
.page-hero {
  padding-block: var(--space-12) var(--space-10);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

/* Intro copy in a page hero uses .lead, matching the home hero. A bare
   `.page-hero p` rule would out-specify .eyebrow and grey out the label. */

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

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: transform var(--duration) var(--ease), border-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.card:hover {
  transform: translateY(calc(var(--space-1) * -1));
  border-color: var(--color-link);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: var(--size-chip);
  height: var(--size-chip);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-sm);
  /* Tint over the card itself, not --bg-primary, so the chip never reads
     darker than the surface it sits on in dark mode. */
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-link);
}

.card-icon svg {
  width: var(--icon-size);
  height: var(--icon-size);
}

.card h3 {
  margin-bottom: var(--space-2);
}

.card p,
.card li {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.card ul {
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-2);
}

.card li {
  padding-left: var(--space-5);
  position: relative;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-primary);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-link);
}

.card-link:hover {
  color: var(--color-link-hover);
}

@media (min-width: 640px) {
  .card-grid.cols-2,
  .card-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Split / values ---------- */
.split {
  display: grid;
  gap: var(--space-10);
}

@media (min-width: 768px) {
  .split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: var(--space-16);
  }
}

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

.value-list > div {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.value-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: var(--size-chip);
  height: var(--size-chip);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-link);
}

.value-icon svg {
  width: var(--icon-size);
  height: var(--icon-size);
}

.value-list h3 {
  margin-bottom: var(--space-1);
}

.value-list p {
  color: var(--text-muted);
}

.steps {
  display: grid;
  gap: var(--space-5);
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: var(--space-5);
  padding-left: var(--space-16);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: var(--space-4);
  top: var(--space-5);
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
}

.steps p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-top: var(--space-1);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--text-main);
  color: var(--bg-primary);
  padding-block: var(--space-16);
}

[data-theme="dark"] .cta-band {
  background: var(--bg-secondary);
  color: var(--text-main);
}

.cta-band .lead {
  color: color-mix(in srgb, var(--bg-primary) 75%, transparent);
}

[data-theme="dark"] .cta-band .lead {
  color: var(--text-muted);
}

.cta-band .btn-primary:hover {
  background: var(--color-accent);
}

.cta-band .btn-secondary {
  color: inherit;
  border-color: currentColor;
}

.cta-band .btn-secondary:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
  border-color: currentColor;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: var(--space-10);
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

/* A heading that titles a card sits below the section tier. */
.contact-card > h2,
.form-card > h2,
.form-success h2 {
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  letter-spacing: normal;
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-4);
}

.form-card {
  position: relative;
}

.contact-card,
.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.contact-meta {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.contact-meta a {
  color: var(--color-link);
  font-weight: var(--fw-semibold);
}

.contact-meta a:hover {
  color: var(--color-link-hover);
}

.contact-meta > div {
  display: grid;
  grid-template-columns: var(--size-chip) 1fr;
  column-gap: var(--space-3);
  row-gap: var(--space-1);
}

.contact-meta dt {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  grid-column: 1 / -1;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
  font-weight: var(--fw-bold);
}

.contact-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: var(--size-chip);
  height: var(--size-chip);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-link);
}

.contact-icon svg {
  width: var(--icon-size);
  height: var(--icon-size);
}

.contact-meta dd {
  grid-column: 2;
  margin: 0;
}

.meta-note {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

/* Map: a placeholder holds the layout until the visitor opts into the embed,
   so the page never pays for Google's script on first load. */
.map {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--bg-surface);
  /* Faint grid so the unloaded state reads as a map area, not a broken image. */
  background-image: linear-gradient(
      to right,
      color-mix(in srgb, var(--border-color) 55%, transparent) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, color-mix(in srgb, var(--border-color) 55%, transparent) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 48rem) {
  .map {
    aspect-ratio: 21 / 9;
  }
}

.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  width: 100%;
  height: 100%;
  padding: var(--space-6);
  background: none;
  border: 0;
  font: inherit;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}

.map-prompt:hover {
  background: color-mix(in srgb, var(--color-primary) 6%, transparent);
}

.map-prompt:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.map-prompt-pin {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: var(--size-chip);
  height: var(--size-chip);
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-link);
}

.map-prompt-pin svg {
  width: var(--icon-size);
  height: var(--icon-size);
}

.map-prompt-copy {
  display: grid;
  gap: var(--space-1);
}

.map-prompt-copy strong {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}

.map-prompt-copy span {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* Scoped by two classes so it outranks `.map-prompt-copy span` above. */
.map-prompt-copy .map-prompt-note {
  font-size: var(--fs-xs);
}

.map-actions {
  margin-top: var(--space-6);
}

/* Form */
.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-2);
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: var(--control-h);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-main);
  transition: border-color var(--duration-fast) var(--ease);
}

.form-group textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--text-muted);
}

.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: var(--color-link);
}

.field-error {
  display: none;
  margin-top: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--color-link);
  font-weight: var(--fw-medium);
}

.field-error.is-visible {
  display: block;
}

.form-hint {
  margin-top: var(--space-3);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.form-group-captcha input {
  max-width: 8rem;
}

.form-group-captcha .form-hint {
  margin-top: var(--space-2);
}

/* Honeypot: clipped, not display:none, so naive bots still fill it. */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-success {
  display: none;
  padding: var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--color-link) 35%, var(--border-color));
  background: color-mix(in srgb, var(--color-primary) 8%, var(--bg-surface));
}

.form-success.is-visible {
  display: block;
}

.form-success p {
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding-block: var(--space-12) var(--space-8);
  margin-top: auto;
}

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

.footer-brand p {
  margin-top: var(--space-3);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  max-width: var(--measure-narrow);
}

/* Column labels, not section headings — opt out of the display treatment. */
.footer-col h2 {
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  letter-spacing: normal;
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-4);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  padding-block: var(--space-1);
}

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

.footer-col .footer-contact {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.footer-col .footer-contact svg {
  flex-shrink: 0;
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  margin-top: 0.2em;
  color: var(--color-link);
}

.footer-col p.footer-contact {
  margin-top: var(--space-2);
}

/* Non-link footer copy (the postal address) matches the links beside it. */
.footer-col p {
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.socials {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.socials a {
  display: grid;
  place-items: center;
  width: var(--control-h-sm);
  height: var(--control-h-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-main);
}

.socials a:hover {
  border-color: var(--color-link);
  color: var(--color-link);
}

.socials svg {
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
}

.footer-bottom {
  margin-top: var(--space-10);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.footer-bottom a {
  color: inherit;
}

.footer-bottom a:hover {
  color: var(--color-link);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

/* Service detail blocks */
.service-block {
  padding-block: var(--space-12);
  border-bottom: 1px solid var(--border-color);
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

.service-block:last-child {
  border-bottom: 0;
}

/* Repeated headings in a list of practices sit one tier below a section head. */
.service-block h2 {
  font-size: var(--fs-block);
  margin-bottom: var(--space-3);
}

.service-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.service-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.service-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: var(--size-chip);
  height: var(--size-chip);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-link);
}

.service-icon svg {
  width: var(--icon-size);
  height: var(--icon-size);
}

.service-list strong {
  display: block;
  color: var(--text-main);
  margin-bottom: var(--space-1);
  font-size: var(--fs-base);
}

@media (min-width: 640px) {
  .service-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.crumb {
  margin-bottom: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.crumb a {
  color: var(--color-link);
  font-weight: var(--fw-semibold);
}

.crumb a:hover {
  color: var(--color-link-hover);
}

.prose {
  max-width: var(--measure);
}

.prose p + p,
.prose ul + p,
.prose p + ul {
  margin-top: var(--space-4);
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose a {
  color: var(--color-link);
  font-weight: var(--fw-semibold);
}

.prose a:hover {
  color: var(--color-link-hover);
}

.prose h2 {
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  letter-spacing: normal;
  font-weight: var(--fw-bold);
  margin: var(--space-8) 0 var(--space-3);
}

.prose ul {
  display: grid;
  gap: var(--space-2);
  padding-left: var(--space-5);
  list-style: disc;
}

a.card {
  color: inherit;
}

.related {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

@media (min-width: 640px) {
  .related {
    grid-template-columns: repeat(2, 1fr);
  }
}
