/* ==========================================================================
   American Surgical Company — Base styles
   Clean clinical design system: tokens, reset, typography, layout,
   buttons and forms. Page-specific rules live in css/pages/*.css
   ========================================================================== */

:root {
  /* Brand */
  --primary: #3d73a1;        /* buttons, links, accents */
  --primary-dark: #1f5a87;   /* hover / active */
  --primary-50: #eef4f9;
  --brand-navy: #10477a;     /* logo navy */
  --brand-sky: #26abe2;      /* logo sky */

  /* Neutrals */
  --heading: #444545;
  --text: #333333;
  --muted: #5e5e5e;
  --soft: #727880;
  --border: #dddddd;
  --border-strong: #cccccc;
  --surface: #ffffff;
  --surface-muted: #f3f3f3;
  --surface-soft: #f8f8f8;
  --footer: #444545;

  /* Status */
  --red: #d70a16;
  --green: #047857;
  --green-dot: #059669;

  /* Type */
  --font-head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body: "Open Sans", "Segoe UI", Arial, sans-serif;

  /* Layout */
  --container: 1440px;
  --gutter: 16px;
  --header-h: 150px;
}

/* --header-h = sticky header height (utility bar scrolls away), used for anchor offsets */
@media (min-width: 768px)  { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; --header-h: 112px; } }
@media (min-width: 1180px) { :root { --header-h: 158px; } }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) - 20px); }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  margin: 0 0 .5em;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--heading);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); }
h2 { font-size: clamp(1.4rem, 1.25rem + .6vw, 1.75rem); }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
.h3 { font-size: 1.25rem; }

.eyebrow {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
}
.lead { font-size: 1.0625rem; line-height: 1.65; color: var(--muted); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.small { font-size: .8125rem; }
sup { font-size: .6em; line-height: 0; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 960px; }
.section { padding-block: clamp(40px, 4vw, 56px); border-bottom: 1px solid var(--border); }
.section--alt { background: var(--surface-muted); }
.section--tight { padding-block: 36px; }
.section--flush { border-bottom: 0; }

.section-head { margin-bottom: 24px; max-width: 820px; }
.section-head.text-center { margin-inline: auto; }
.section-head h2 { margin-bottom: 4px; }
.section-head p { color: var(--muted); margin: 0; }
.section-head--split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}

.grid-2, .grid-3, .grid-4 { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split--reverse > :first-child { order: 2; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 1000; padding: 10px 16px; background: var(--primary); color: #fff; font-weight: 600; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Icons (Material Symbols) ---------- */
.icon {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 1.25em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  user-select: none;
  flex-shrink: 0;
  text-decoration: none;
}
.icon--fill { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid var(--primary);
  border-radius: 0;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; text-decoration: none; }
.btn .icon { font-size: 1.2rem; transition: transform .2s var(--ease-out); }
.btn:hover .icon--arrow, .btn:hover .icon[data-nudge] { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn.is-added { background: var(--green); border-color: var(--green); color: #fff; }
.btn--outline, .btn--ghost-light, .btn--white { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn--outline:hover, .btn--ghost-light:hover, .btn--white:hover { background: var(--primary-50); color: var(--primary-dark); border-color: var(--primary-dark); }
.btn--sky { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--sm { min-height: 36px; padding: 0 16px; font-size: .8125rem; }
.btn--lg { min-height: 48px; padding: 0 28px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .875rem;
  color: var(--primary);
}
.link-arrow .icon { font-size: 1.1rem; transition: transform .2s var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: var(--primary-50);
  color: var(--primary-dark);
  font-family: var(--font-head);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.2;
}
.badge--new { background: var(--red); color: #fff; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } .form-row--3 { grid-template-columns: repeat(3, 1fr); } }

.field { display: flex; flex-direction: column; gap: 4px; }
.field > label, .field .label { font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: var(--text); }
.field .req { color: var(--red); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  font-size: .9375rem;
}
.textarea { min-height: 130px; resize: vertical; }
.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23444545' stroke-width='1.6' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.input::placeholder, .textarea::placeholder { color: #8a8f94; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--red); }
.field-error { display: none; font-size: .75rem; color: var(--red); }
.field.has-error .field-error { display: block; }
.field-hint { font-size: .75rem; color: var(--muted); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: .875rem; line-height: 1.45; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary); flex-shrink: 0; }

.form-status { display: none; align-items: flex-start; gap: 10px; padding: 12px 14px; font-size: .875rem; }
.form-status.is-visible { display: flex; }
.form-status--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.form-status--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.form-status .icon { font-size: 1.3rem; }

/* ---------- Motion ----------
   Elements get .reveal-up from js/main.js and fade up as they scroll into
   view. --d sets a small stagger delay. Disabled for reduced-motion users. */
:root { --ease-out: cubic-bezier(.2, .7, .2, 1); }
.js .reveal-up {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js .reveal-up.is-in { opacity: 1; transform: none; }
.js .reveal-fade { opacity: 0; transition: opacity .9s var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal-fade.is-in { opacity: 1; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js .reveal-up, .js .reveal-fade { opacity: 1; transform: none; }
}
