/* ============================================================
   AACSH — Design system
   Premium-medical / hospital. Aubergine + gold + porcelain.
   ============================================================ */

:root {
  /* Brand — derived from the logo's purple→magenta flame, deepened for
     hospital-grade authority (refined, not hype-y) */
  --ink:        #16121C;   /* deep near-black w/ violet bias */
  --ink-soft:   #3A3142;
  --muted:      #6F6677;
  --line:       #E6E1EA;
  --line-soft:  #F0EBF2;

  --porcelain:  #FBFAFC;   /* page bg */
  --mist:       #F4EFF6;   /* surface tint */
  --cream:      #F8F4EE;   /* warm secondary surface */

  --plum:       #3D1B4D;   /* primary — hospital authority */
  --plum-deep:  #2A1136;
  --plum-soft:  #6E4382;
  --orchid:     #A5468F;   /* secondary — sparingly, for the flame accent */
  --gold:       #B08D57;   /* metallic, used minimally */
  --gold-soft:  #D9C39A;

  --clinical:   #1E5A8A;   /* trusted clinical blue — for medical/info chips */
  --good:       #2F7D5C;
  --warn:       #B07A1F;

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  18px;
  --radius-xl:  28px;

  --shadow-sm: 0 1px 2px rgba(22, 18, 28, 0.04), 0 1px 1px rgba(22, 18, 28, 0.03);
  --shadow:    0 8px 24px rgba(22, 18, 28, 0.06), 0 2px 6px rgba(22, 18, 28, 0.04);
  --shadow-lg: 0 24px 60px rgba(22, 18, 28, 0.12), 0 8px 20px rgba(22, 18, 28, 0.06);

  --font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- Type scale ---------- */
.serif       { font-family: var(--font-serif); font-feature-settings: "ss01","ss02"; letter-spacing: -0.01em; }
.mono        { font-family: var(--font-mono); }
.eyebrow     { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; color: var(--plum); }
.h-display   { font-family: var(--font-serif); font-weight: 400; font-size: clamp(40px, 5.6vw, 84px); line-height: 0.98; letter-spacing: -0.025em; text-wrap: balance; }
.h-1         { font-family: var(--font-serif); font-weight: 400; font-size: clamp(34px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.h-2         { font-family: var(--font-serif); font-weight: 400; font-size: clamp(28px, 2.6vw, 40px); line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
.h-3         { font-family: var(--font-serif); font-weight: 400; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; }
.h-4         { font-family: var(--font-sans); font-weight: 500; font-size: 18px; line-height: 1.35; letter-spacing: -0.005em; }
.lede        { font-size: 19px; line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; }
.body        { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }
.small       { font-size: 13px; line-height: 1.5; color: var(--muted); }
.tiny        { font-size: 11.5px; line-height: 1.4; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- Layout ---------- */
.wrap        { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.wrap-tight  { max-width: 1100px; margin: 0 auto; padding: 0 32px; }
.section     { padding: 96px 0; }
.section-lg  { padding: 128px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.01em;
  border-radius: 999px;
  transition: all 200ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--plum);
  color: white;
}
.btn-primary:hover { background: var(--plum-deep); transform: translateY(-1px); box-shadow: 0 12px 30px rgba(61, 27, 77, 0.25); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--plum); color: var(--plum); }
.btn-link {
  background: transparent;
  color: var(--plum);
  padding: 0;
  height: auto;
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  letter-spacing: 0.01em;
}
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 15px; }

/* ---------- Surfaces / cards ---------- */
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.card-mist { background: var(--mist); }

/* ---------- Pills / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--mist); color: var(--plum);
  border-radius: 999px;
}
.chip-line { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); }
.chip-gold { background: rgba(176, 141, 87, 0.12); color: #7A5E33; }
.chip-good { background: rgba(47, 125, 92, 0.1); color: var(--good); }
.chip-warn { background: rgba(176, 122, 31, 0.12); color: var(--warn); }
.chip-clinical { background: rgba(30, 90, 138, 0.1); color: var(--clinical); }
.chip-dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 999px; background: currentColor;
  margin-right: 2px;
}

/* ---------- Decorative divider ---------- */
.rule {
  display: flex; align-items: center; gap: 14px;
  color: var(--muted); font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase;
}
.rule::before, .rule::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ---------- Tiny logo flame mark — original SVG (not the raster) ---------- */
.flame-mark {
  display: inline-block;
  vertical-align: middle;
}

/* ---------- Focus ring ---------- */
:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Scrollbar dressing ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(61, 27, 77, 0.18); border-radius: 99px; border: 3px solid var(--porcelain); }
::-webkit-scrollbar-thumb:hover { background: rgba(61, 27, 77, 0.3); }

/* ---------- Number tab strip used in hero ---------- */
.metric {
  display: flex; flex-direction: column; gap: 4px;
}
.metric .n {
  font-family: var(--font-serif);
  font-size: 44px; line-height: 1;
  font-weight: 400; letter-spacing: -0.02em;
}
.metric .l {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Compliance / risks note styling (very important per brief) ---------- */
.note-risks {
  background: #FBF6EF;
  border: 1px solid #EFE0C7;
  border-left: 3px solid var(--warn);
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 13.5px; line-height: 1.55; color: #5A4422;
}
.note-consent {
  background: rgba(30, 90, 138, 0.05);
  border: 1px solid rgba(30, 90, 138, 0.18);
  border-left: 3px solid var(--clinical);
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 13.5px; line-height: 1.55; color: #1d3a55;
}

/* ---------- Sticky bottom appointment bar (mobile-feeling) ---------- */
.mobile-cta {
  position: fixed; left: 50%; bottom: 22px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex; gap: 8px;
  background: var(--ink);
  color: white;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  align-items: center;
}
.mobile-cta .pill {
  background: var(--plum);
  color: white;
  border-radius: 999px;
  height: 38px; padding: 0 18px;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
}

/* ---------- Image with image overlay for medical context ---------- */
.img-tinted {
  position: relative; overflow: hidden;
}
.img-tinted::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42, 17, 54, 0) 50%, rgba(42, 17, 54, 0.55) 100%);
  pointer-events: none;
}

/* ---------- Hairline grid lines, very subtle ---------- */
.grid-lines {
  background-image:
    linear-gradient(to right, rgba(61, 27, 77, 0.04) 1px, transparent 1px);
  background-size: 80px 100%;
}

/* ---------- Tabs styling (used in procedure detail) ---------- */
.tab {
  padding: 12px 4px;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 200ms;
}
.tab.active {
  color: var(--plum);
  border-bottom-color: var(--plum);
}

/* ---------- Page transition (just a fade) ---------- */
.page {
  animation: fade-in 320ms ease both;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Doctor portrait frame ---------- */
.portrait {
  background: linear-gradient(180deg, var(--mist) 0%, var(--cream) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
}

/* ---------- Hospital flame mark text gradient (used very sparingly) ---------- */
.flame-text {
  background: linear-gradient(135deg, #6E2C8E 0%, #B53E8A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Selection ---------- */
::selection { background: var(--plum); color: white; }

/* ---------- Helper: subtle dotted stripe pattern, used as placeholders ---------- */
.placeholder {
  background-color: var(--mist);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 12px,
    rgba(61, 27, 77, 0.06) 12px 13px
  );
  display: flex; align-items: center; justify-content: center;
  color: var(--plum-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 24px;
}
