/* =========================================================
   Arcline — Premium AI Reception for Health Clinics
   Type system + 3 themes (Systems, Dark, Light)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* TYPE PAIRS (switchable) */
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-display: 'Geist', ui-sans-serif, system-ui, sans-serif;

  /* DENSITY */
  --section-y: clamp(80px, 10vw, 160px);
  --container-pad: clamp(20px, 3vw, 48px);
  --gap: 24px;

  /* RADII */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-xl: 28px;

  /* SHADOWS — neutral, will be themed */
  --shadow-sm: 0 1px 2px rgba(10, 12, 14, 0.04), 0 0 0 1px rgba(10, 12, 14, 0.06);
  --shadow-md: 0 8px 24px -8px rgba(10, 12, 14, 0.10), 0 0 0 1px rgba(10, 12, 14, 0.06);
  --shadow-lg: 0 24px 60px -16px rgba(10, 12, 14, 0.18), 0 0 0 1px rgba(10, 12, 14, 0.06);
}

/* ========== THEME: SYSTEMS (warm off-white, ink, electric blue) ========== */
:root[data-theme="systems"] {
  --bg: #f4f2ec;
  --bg-2: #ebe8e0;
  --bg-card: #fbfaf6;
  --bg-inverted: #0c0d0e;
  --fg: #0c0d0e;
  --fg-2: #2c2d30;
  --fg-3: #5a5d62;
  --fg-4: #8a8d93;
  --fg-on-inverted: #f4f2ec;
  --line: rgba(12, 13, 14, 0.10);
  --line-2: rgba(12, 13, 14, 0.06);
  --accent: #1d4ed8;
  --accent-2: #3b6ff0;
  --accent-soft: rgba(29, 78, 216, 0.08);
  --success: #0f6e3d;
  --warn: #b35900;
  --halo: radial-gradient(60% 50% at 50% 0%, rgba(29,78,216,0.10), transparent 70%);
}

/* ========== THEME: DARK ========== */
:root[data-theme="dark"] {
  --bg: #07080a;
  --bg-2: #0e1014;
  --bg-card: #11141a;
  --bg-inverted: #f4f4f5;
  --fg: #ececee;
  --fg-2: #c9cbcf;
  --fg-3: #8b8e95;
  --fg-4: #5a5e66;
  --fg-on-inverted: #0a0b0d;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.05);
  --accent: #6aa6ff;
  --accent-2: #92bfff;
  --accent-soft: rgba(106, 166, 255, 0.10);
  --success: #46d18b;
  --warn: #f0a35c;
  --halo: radial-gradient(60% 50% at 50% 0%, rgba(106,166,255,0.18), transparent 70%);
}

/* ========== THEME: LIGHT (pure clinical) ========== */
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f5f7fa;
  --bg-card: #ffffff;
  --bg-inverted: #0a1424;
  --fg: #0a1424;
  --fg-2: #243044;
  --fg-3: #56627a;
  --fg-4: #8b94a8;
  --fg-on-inverted: #ffffff;
  --line: rgba(10, 20, 36, 0.10);
  --line-2: rgba(10, 20, 36, 0.05);
  --accent: #0b5cd9;
  --accent-2: #2876ee;
  --accent-soft: rgba(11, 92, 217, 0.08);
  --success: #0f6e3d;
  --warn: #b35900;
  --halo: radial-gradient(60% 50% at 50% 0%, rgba(11,92,217,0.10), transparent 70%);
}

/* ========== TYPE PAIRS ========== */
:root[data-typepair="geist"] {
  --font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-display: 'Geist', ui-sans-serif, system-ui, sans-serif;
}
:root[data-typepair="manrope"] {
  --font-sans: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-display: 'Manrope', ui-sans-serif, system-ui, sans-serif;
}
:root[data-typepair="editorial"] {
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-display: 'Instrument Serif', Georgia, serif;
}

/* ========== DENSITY ========== */
:root[data-density="compact"] {
  --section-y: clamp(56px, 7vw, 110px);
  --container-pad: clamp(16px, 2.5vw, 32px);
  --gap: 18px;
}
:root[data-density="spacious"] {
  --section-y: clamp(110px, 13vw, 200px);
  --container-pad: clamp(24px, 4vw, 64px);
  --gap: 32px;
}

/* ========== RESET ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: white; }

/* ========== LAYOUT ========== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}
.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}
section { position: relative; }

/* ========== TYPE ========== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.eyebrow.no-dot::before { display: none; }

.h-display {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.4vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0;
}
:root[data-typepair="editorial"] .h-display { font-weight: 400; letter-spacing: -0.02em; }

.h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 0;
}
.h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0;
}
.h3 {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 500;
  margin: 0;
}
.lede {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 60ch;
  text-wrap: pretty;
}
.muted { color: var(--fg-3); }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }

.divider-h {
  height: 1px; background: var(--line); width: 100%;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--fg); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-2); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 15px; }

.btn-arrow {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.btn-arrow svg { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.btn:hover .btn-arrow svg { transform: translateX(3px); }

/* ========== CARDS ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card-flat {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}

/* ========== CHIPS ========== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.chip-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-3);
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* live pulse dot */
.dot-live {
  position: relative;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}
.dot-live::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--success);
  animation: ping 1.6s cubic-bezier(0,0,.2,1) infinite;
  opacity: 0.6;
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ========== UTILS ========== */
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; }
.hide-mobile { }
@media (max-width: 720px) {
  .hide-mobile { display: none !important; }
}
.show-mobile { display: none; }
@media (max-width: 720px) {
  .show-mobile { display: initial; }
}

/* ========== GRID HELPERS ========== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* tagged inline accent text */
.accent-text { color: var(--accent); }
.serif-italic { font-family: var(--font-display); font-style: italic; padding-right: 0.1em; }
:root[data-typepair="editorial"] .serif-italic { font-family: 'Instrument Serif', Georgia, serif; }

/* striped placeholder */
.placeholder {
  background:
    repeating-linear-gradient(135deg,
      var(--line-2) 0 1px,
      transparent 1px 14px),
    var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Faux clinic-photo placeholders */
.photo-ph {
  position: relative;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 80% at 20% 0%, var(--accent-soft), transparent 60%),
    repeating-linear-gradient(135deg, var(--line-2) 0 1px, transparent 1px 12px),
    var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.photo-ph .photo-label {
  position: absolute; left: 12px; bottom: 10px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-4);
}

/* Backdrop halos for sections */
.halo-top::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 70%;
  background: var(--halo);
  pointer-events: none;
  z-index: 0;
}

/* Fine top-line section divider with mono label */
.section-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-bottom: 36px;
}
.section-mark .mono { color: var(--fg-3); }
.section-mark .num { color: var(--fg-4); font-family: var(--font-mono); font-size: 11px; }

/* anchor offset for nav */
section[id] { scroll-margin-top: 80px; }
