/* ==========================================================================
   Laboratorio Clínico San Martín — design system
   ========================================================================== */

:root {
  /* Brand navy, taken from the institutional logo */
  --navy-900: #060f2a;
  --navy-800: #0b1b4d;
  --navy-700: #16265e;
  --navy-600: #24376f;

  /* Clinical accent */
  --teal-700: #0b6b74;
  --teal-600: #0e7c86;
  --teal-100: #e4f2f3;

  /* Classical accent used only for hairlines and small marks */
  --brass: #b0894c;
  --brass-200: #e8dcc6;

  --paper: #faf8f4;
  --paper-dim: #f2efe8;
  --white: #ffffff;

  --ink: #17202f;
  --muted: #5c657a;
  --line: #e3dfd6;
  --line-soft: #efece4;

  --serif: "Lora", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1200px;
  --radius: 4px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(6, 15, 42, 0.04), 0 8px 24px rgba(6, 15, 42, 0.05);
  --shadow-md: 0 2px 4px rgba(6, 15, 42, 0.06), 0 18px 40px rgba(6, 15, 42, 0.09);

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* --------------------------------------------------------------- reset --- */

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--navy-800); text-decoration: none; }
button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--navy-900);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 1.25rem + 2vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--navy-800); color: #fff; }

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

/* ------------------------------------------------------------- layout --- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: clamp(64px, 8vw, 118px); }
.section--paper { background: var(--paper); }
.section--tight { padding-block: clamp(48px, 5vw, 76px); }

.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--navy-800);
  color: #fff;
  padding: 10px 20px;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ----------------------------------------------------- shared elements --- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-700);
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--brass);
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::after {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--brass);
}
.eyebrow--light { color: var(--brass-200); }

.lede {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
  color: var(--muted);
  max-width: 62ch;
}
.lede--light { color: rgba(255, 255, 255, 0.72); }

/* Trailing action after a block of prose or a grid */
.block-cta { margin-top: clamp(28px, 3vw, 42px); }
.block-cta--center { text-align: center; }

.section-head { margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--narrow { max-width: 62ch; }
.section-head--center { text-align: center; }
.section-head--center .lede { margin-inline: auto; }
.section-head > :last-child { margin-bottom: 0; }

.rule {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 0;
}

/* -------------------------------------------------------------- button --- */

.btn {
  --btn-bg: var(--navy-800);
  --btn-fg: #fff;
  --btn-bd: var(--navy-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--accent { --btn-bg: var(--teal-600); --btn-bd: var(--teal-600); }
.btn--accent:hover { --btn-bg: var(--teal-700); --btn-bd: var(--teal-700); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy-800); --btn-bd: var(--line); }
.btn--ghost:hover { --btn-bd: var(--navy-800); }

.btn--light { --btn-bg: #fff; --btn-fg: var(--navy-800); --btn-bd: #fff; }

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-bd: rgba(255, 255, 255, 0.34);
}
.btn--outline-light:hover { --btn-bd: #fff; }

.btn--block { width: 100%; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--teal-700);
}
.text-link svg { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.text-link:hover svg { transform: translateX(4px); }

/* ======================================================= site header ==== */

.topbar {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
}
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 28px;
  min-height: 42px;
  padding-block: 6px;
}
.topbar__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.topbar a { color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.topbar a:hover { color: #fff; }
.topbar svg { width: 15px; height: 15px; color: var(--brass); flex: none; }
.topbar__socials { display: flex; gap: 14px; }
.topbar__socials svg { color: rgba(255, 255, 255, 0.6); transition: color 0.2s var(--ease); }
.topbar__socials a:hover svg { color: #fff; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.3s var(--ease);
}
.masthead.is-stuck { box-shadow: 0 1px 20px rgba(6, 15, 42, 0.08); }

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}

.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 68px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--radius);
  transition: color 0.2s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover { color: var(--navy-800); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--navy-800); }

.masthead__actions { display: flex; align-items: center; gap: 12px; }
.masthead__actions .btn { padding: 12px 22px; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy-800);
  cursor: pointer;
  place-items: center;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }

/* ============================================================== hero ==== */

/* ---- Full-bleed split hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

/* Right-half background image */
.hero__bg {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  left: 42%;
  z-index: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 15% center;
  display: block;
}
/* Gradient fade: paper colour → transparent (left edge of image → right) */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--paper) 0%,
    color-mix(in srgb, var(--paper) 55%, transparent) 35%,
    transparent 70%
  );
}

/* Subtle dot/grid pattern on the left side only */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(11, 27, 77, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 27, 77, 0.04) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to right, #000 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(72px, 9vw, 120px);
}
.hero__content {
  max-width: 560px;
}

.hero__title { margin-bottom: 22px; }
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--teal-700);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero__meta-item { display: flex; align-items: flex-start; gap: 12px; max-width: 30ch; }
.hero__meta-item svg { width: 19px; height: 19px; color: var(--brass); margin-top: 3px; flex: none; }
.hero__meta-item span { font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
.hero__meta-item strong { display: block; color: var(--ink); font-weight: 500; }

/* ------------------------------------------------------- page banner --- */

.page-banner {
  position: relative;
  overflow: hidden;
  background: var(--navy-800);
  color: #fff;
  padding-block: clamp(56px, 7vw, 96px);
}
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 120% at 88% 0%, rgba(14, 124, 134, 0.42), transparent 60%),
    radial-gradient(60% 100% at 0% 100%, rgba(176, 137, 76, 0.2), transparent 62%);
}
.page-banner::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -110px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}
.page-banner__inner { position: relative; max-width: 68ch; }
.page-banner h1 { color: #fff; }
.page-banner .lede { color: rgba(255, 255, 255, 0.76); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.62);
}
.breadcrumb a { color: inherit; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb span[aria-hidden] { color: var(--brass); }

/* ============================================================= grids ==== */

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* -------------------------------------------------------- area cards --- */

.area-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.area-card:hover {
  border-color: var(--navy-700);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.area-card__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
}
.area-card__icon svg { width: 28px; height: 28px; }
.area-card h3 { margin: 0; }
.area-card p { font-size: 0.92rem; color: var(--muted); margin: 0; }
.area-card__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.area-card__list li {
  font-size: 0.76rem;
  color: var(--navy-700);
  background: var(--paper-dim);
  border-radius: 100px;
  padding: 5px 12px;
}
.area-card__foot { margin-top: auto; padding-top: 4px; }

/* Inverted card used as the closing "ask us" tile of the areas grid */
.area-card--invert {
  background: var(--navy-800);
  border-color: var(--navy-800);
}
.area-card--invert:hover { border-color: var(--brass); }
.area-card--invert h3 { color: #fff; }
.area-card--invert p { color: rgba(255, 255, 255, 0.72); }
.area-card--invert .area-card__icon { background: rgba(255, 255, 255, 0.1); color: #fff; }
.area-card--invert .text-link { color: var(--brass-200); }

/* -------------------------------------------------------------- steps --- */

.results {
  background: var(--navy-800);
  color: rgba(255, 255, 255, 0.78);
  position: relative;
  overflow: hidden;
}
.results::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 120% at 15% 0%, rgba(14, 124, 134, 0.34), transparent 62%);
}
.results .container { position: relative; }
.results h2 { color: #fff; }
.results__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.step {
  padding: 36px 32px 34px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}
.step:last-child { border-right: 0; }
.step:not(:first-child) { padding-left: 32px; }
.step__num {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--brass);
  display: block;
  margin-bottom: 14px;
}
.step h3 { color: #fff; margin-bottom: 10px; }
.step p { font-size: 0.92rem; margin: 0; }

/* --------------------------------------------------------- split rows --- */

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(36px, 6vw, 76px);
}
.split--reverse .split__media { order: 2; }

.plain-media {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--paper-dim);
}
.plain-media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }

/* Equipment shots are studio cut-outs, so they need padding instead of a crop */
.plain-media--product { background: var(--paper); padding: clamp(20px, 3vw, 40px); }
.plain-media--product img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.feature-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list svg { width: 20px; height: 20px; color: var(--teal-600); margin-top: 3px; flex: none; }
.feature-list strong { display: block; font-weight: 500; }
.feature-list span { font-size: 0.9rem; color: var(--muted); }

/* Centered variant — items stack as inline-flex blocks around a central axis */
.feature-list--center { justify-items: center; }
.feature-list--center li { justify-content: center; gap: 10px; text-align: left; max-width: 380px; }
.feature-list--center svg { margin-top: 2px; }

/* ------------------------------------------------------------- stats --- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: #fff; padding: 32px 26px; text-align: center; }
.stat__value {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.5rem);
  line-height: 1;
  color: var(--navy-800);
  display: block;
  margin-bottom: 10px;
}
.stat__label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------- equipment --- */

.equipment {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding-block: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.equipment:first-of-type { border-top: 0; padding-top: 0; }
.equipment--reverse .equipment__media { order: 2; }
.equipment__media {
  display: grid;
  place-items: center;
  padding: 34px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.equipment__media img { max-height: 340px; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.equipment__model {
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 10px;
}
.spec-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.spec-list li {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.spec-list dt,
.spec-list li > span:first-child {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

/* ---------------------------------------------------- exam directory --- */

.exam-area {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(36px, 4vw, 56px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 130px;
}
.exam-area:first-of-type { border-top: 0; padding-top: 0; }
.exam-area__head { display: flex; flex-direction: column; gap: 14px; }
.exam-area__head h2 { font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.85rem); margin: 0; }
.exam-area__head p { font-size: 0.94rem; color: var(--muted); margin: 0; }
.exam-area__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
}
.exam-area__icon svg { width: 26px; height: 26px; }

.exam-list {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 36px;
}
.exam-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.92rem;
  break-inside: avoid;
}
.exam-list svg { width: 15px; height: 15px; color: var(--brass); flex: none; margin-top: 5px; }

.area-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.area-index a {
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--navy-700);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.area-index a:hover {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}

/* ------------------------------------------------------------ process --- */

.process { counter-reset: process; display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.process__item {
  position: relative;
  padding: 34px 28px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.process__item::before {
  counter-increment: process;
  content: "0" counter(process);
  position: absolute;
  top: 26px;
  right: 26px;
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--line);
}
.process__item h3 { font-size: 1.12rem; margin-bottom: 10px; padding-right: 56px; }
.process__item p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ------------------------------------------------------- social cards --- */

.social-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.social-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.social-card:hover { border-color: var(--navy-700); transform: translateY(-2px); }
.social-card svg { width: 22px; height: 22px; color: var(--navy-800); flex: none; }
.social-card span { font-size: 0.86rem; color: var(--muted); }
.social-card strong { display: block; font-weight: 500; color: var(--ink); }

/* --------------------------------------------------------------- team --- */

.team-stair {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-inline: clamp(24px, 8%, 96px);
}

.person {
  width: 50%;
  padding: 14px 0 14px 24px;
  border-left: 2px solid var(--brass);
  text-align: left;
}
/* right-aligned entries sit on the right side with border on the right */
.person--right {
  margin-left: auto;
  padding: 14px 24px 14px 0;
  border-left: none;
  border-right: 2px solid var(--teal-600);
  text-align: right;
}

.person h3 { margin: 0 0 6px; font-size: 1.18rem; font-family: var(--serif); }
.person__role {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin: 0 0 8px;
}
.person__note { font-size: 0.87rem; color: var(--muted); margin: 0; }

/* -------------------------------------------------------------- value --- */

.value {
  padding: 30px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 2px solid var(--brass);
  border-radius: var(--radius);
}
.value svg { width: 26px; height: 26px; color: var(--navy-800); margin-bottom: 18px; }
.value h3 { font-size: 1.15rem; margin-bottom: 8px; }
.value p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* --------------------------------------------------------------- form --- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}

.form-card {
  padding: clamp(28px, 3.5vw, 44px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 22px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--navy-900);
}
.field label .req { color: var(--teal-700); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.field textarea { min-height: 148px; resize: vertical; }
.field select {
  appearance: none;
  cursor: pointer;
  padding-right: 42px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c657a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #cfcabe; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px var(--teal-100);
}
.field__hint { display: block; margin-top: 7px; font-size: 0.78rem; color: var(--muted); }
.field__error {
  display: none;
  margin-top: 7px;
  font-size: 0.78rem;
  color: #a8342b;
}
.field.has-error input,
.field.has-error textarea { border-color: #c4463b; background: #fdf6f5; }
.field.has-error .field__error { display: block; }

.form-note { font-size: 0.78rem; color: var(--muted); margin-top: 18px; }
.form-note--spaced { margin-top: 36px; }
.form-note a { color: var(--teal-700); text-decoration: underline; text-underline-offset: 3px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: #1a7a5e;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
  opacity: 0;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  white-space: normal;
}
.toast svg { width: 20px; height: 20px; flex: none; }
.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ------------------------------------------------------- info panels --- */

.info-panel {
  padding: 30px 28px;
  background: var(--navy-800);
  color: rgba(255, 255, 255, 0.76);
  border-radius: var(--radius-lg);
}
.info-panel h3 { color: #fff; font-size: 1.25rem; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.info-list li { display: flex; gap: 14px; }
.info-list svg { width: 20px; height: 20px; color: var(--brass); flex: none; margin-top: 3px; }
.info-list dt,
.info-list .info-list__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 3px;
}
.info-list a, .info-list strong { color: #fff; font-weight: 400; }
.info-list a:hover { text-decoration: underline; text-underline-offset: 3px; }

.side-block { margin-top: 28px; }

.hours { list-style: none; margin: 0; padding: 0; }
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.hours li:last-child { border-bottom: 0; }
.hours span:first-child { color: var(--muted); }
.hours span:last-child { font-weight: 500; }

.map-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-dim);
  aspect-ratio: 16 / 7;
}
.map-frame img  { width: 100%; height: 100%; object-fit: cover; }
.map-frame iframe { width: 100%; height: 100%; display: block; border: 0; }

/* ----------------------------------------------------------- cta band --- */

.cta {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.78);
  padding-block: clamp(52px, 6vw, 84px);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 130% at 80% 50%, rgba(14, 124, 134, 0.34), transparent 62%);
}
.cta__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.cta h2 { color: #fff; margin-bottom: 10px; }
.cta p { max-width: 52ch; margin: 0; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ------------------------------------------------------------- footer --- */

.footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
  padding-top: clamp(52px, 6vw, 76px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 48px;
}
.footer__logo {
  height: 42px;
  width: auto;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
  opacity: 0.94;
}
.footer h4 {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 18px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer a { color: inherit; }
.footer a:hover { color: #fff; }
.footer__socials { display: flex; gap: 12px; margin-top: 24px; }
.footer__socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.footer__socials a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}
.footer__socials svg { width: 17px; height: 17px; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ------------------------------------------------------- reveal anim --- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ========================================================= responsive === */

@media (max-width: 1080px) {
  .hero__bg { left: 50%; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-list li { grid-template-columns: 140px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: grid; }

  .masthead.is-open .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 16px 24px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .masthead.is-open .nav__link { padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
  .masthead.is-open .nav__link::after { display: none; }

  .grid--3,
  .grid--2,
  .split,
  .contact-layout,
  .equipment { grid-template-columns: 1fr; }
  .person, .person--right {
    width: 100%;
    margin-left: 0;
    padding: 20px 0 20px 24px;
    border-left: 2px solid var(--brass);
    border-right: none;
    text-align: left;
  }
  .split--reverse .split__media,
  .equipment--reverse .equipment__media { order: 0; }

  .results__grid { grid-template-columns: 1fr; border-top: 0; }
  .step {
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding: 28px 0;
  }
  .step:not(:first-child) { padding-left: 0; }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
  .exam-area { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .social-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding-inline: 20px; }
  .topbar__group--secondary { display: none; }
  .grid--4,
  .grid--3,
  .stats,
  .footer__grid { grid-template-columns: 1fr; }
  .hero__bg { display: none; }
  .exam-list { columns: 1; }
  .hero__actions .btn { width: 100%; }
  .spec-list li { grid-template-columns: 1fr; gap: 4px; }
  .cta__actions .btn { flex: 1 1 100%; }
}
