/* ============================================================
   All Care Family Medicine — Coming Soon
   Editorial / letterhead aesthetic. Single column, generous
   vertical rhythm. Theme: light (cream canvas, navy ink) or
   dark (deep navy canvas, cream ink). Pre-paint script in
   index.html sets :root[data-theme].
   ============================================================ */

:root {
  /* Brand tokens (canonical hex). Don't reference directly in rules. */
  --navy:        #1F4E79;
  --navy-deep:   #0E1A28;
  --navy-deeper: #16273E;
  --orange:      #E08A2E;
  --orange-deep: #C9761E;
  --orange-warm: #F0A052;
  --cream:       #FAF4E8;
  --cream-deep:  #F2E9D4;
  --cream-soft:  #F4ECDE;

  --serif: "Playfair Display", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Semantic theme tokens — LIGHT defaults. Rules below reference ONLY these. */
  --bg:           var(--cream);
  --bg-deep:      var(--cream-deep);
  --ink:          var(--navy);
  --ink-soft:     rgba(31, 78, 121, 0.78);
  --ink-mute:     rgba(31, 78, 121, 0.55);
  --ink-faint:    rgba(31, 78, 121, 0.16);
  --accent:       var(--orange);
  --accent-deep:  var(--orange-deep);
  --btn-bg:       var(--navy);
  --btn-fg:       var(--cream);
  --logo-shadow:  rgba(31, 78, 121, 0.04);
  --logo-filter:  none;
}

[data-theme='dark'] {
  --bg:           var(--navy-deep);
  --bg-deep:      var(--navy-deeper);
  --ink:          var(--cream-soft);
  --ink-soft:     rgba(244, 236, 222, 0.84);
  --ink-mute:     rgba(244, 236, 222, 0.58);
  --ink-faint:    rgba(244, 236, 222, 0.18);
  --accent:       var(--orange-warm);
  --accent-deep:  var(--orange);
  --btn-bg:       var(--cream-soft);
  --btn-fg:       var(--navy-deep);
  --logo-shadow:  rgba(0, 0, 0, 0.35);
  --logo-filter:  brightness(0.97) saturate(0.92);
}

:root                     { color-scheme: light dark; }
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark']  { color-scheme: dark; }

* { box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Vertical wash — slightly warmer at the bottom for light, deeper for dark */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  z-index: -1;
  transition: background 0.25s ease;
}

.page {
  width: 100%;
  max-width: 540px;
  text-align: center;
}

/* ===== THEME TOGGLE ===== */

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink-faint);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
  padding: 0;
  z-index: 10;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
  transform: rotate(12deg);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme='dark'] .theme-toggle .icon-sun  { display: block; }
[data-theme='dark'] .theme-toggle .icon-moon { display: none; }

/* ===== BRAND HEADER ===== */

.brand { margin-bottom: 40px; }

.logo {
  display: block;
  margin: 0 auto 28px;
  width: 120px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 1px 0 var(--logo-shadow);
  filter: var(--logo-filter);
  transition: filter 0.25s ease, box-shadow 0.25s ease;
}

.practice-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 5.4vw, 42px);
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.practice-name .accent-italic {
  font-style: italic;
  color: var(--accent-deep);
  font-weight: 400;
}

.physician {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}

/* ===== HAIRLINE DIVIDERS ===== */

.rule {
  appearance: none;
  border: 0;
  height: 1px;
  width: 96px;
  margin: 44px auto;
  background: var(--ink-faint);
}

/* ===== INTRO ===== */

.intro { margin-bottom: 44px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 18px;
}

.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 420px;
}

/* ===== CONTACT BLOCK ===== */

.contact { margin-bottom: 8px; }

.phone {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6.8vw, 52px);
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  transition: color 0.18s ease;
}

.phone:hover,
.phone:focus-visible {
  color: var(--accent-deep);
  outline: none;
}

.fax {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  margin: 0 0 28px;
}

.addr {
  font-style: normal;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 36px;
}

/* ===== PORTAL CTA ===== */

.cta-wrap { margin: 0 0 10px; }

.cta-portal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bg);
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.cta-portal .arrow {
  color: var(--accent);
  font-weight: 400;
  font-size: 18px;
  transition: transform 0.18s ease, color 0.18s ease;
}

.cta-portal:hover,
.cta-portal:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  outline: none;
}

.cta-portal:hover .arrow,
.cta-portal:focus-visible .arrow {
  color: #fff;
  transform: translateX(3px);
}

.cta-note {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  margin: 14px 0 0;
}

/* ===== OFFICE HOURS (currently hidden in markup; styles retained) ===== */

.hours-title {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 22px;
}

.hours-list {
  display: grid;
  gap: 9px;
  margin: 0 auto;
  max-width: 360px;
  text-align: left;
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

.hours-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 4px 0;
  border-bottom: 1px dotted var(--ink-faint);
}

.hours-row:last-child { border-bottom: 0; }

.hours-row dt {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}

.hours-row dd {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-soft);
  margin: 0;
}

/* ===== FOOTER ===== */

.footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--ink-faint);
}

.footer p {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}

/* ===== MOBILE TIGHTENING ===== */

@media (max-width: 520px) {
  body { padding: 32px 20px; }
  .rule { margin: 32px auto; }
  .brand { margin-bottom: 30px; }
  .intro { margin-bottom: 32px; }
  .addr { margin-bottom: 28px; }
  .footer { margin-top: 40px; padding-top: 22px; }
  .hours-list { max-width: 320px; }
  .theme-toggle { top: 14px; right: 14px; width: 36px; height: 36px; }
  .theme-toggle svg { width: 16px; height: 16px; }
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== PRINT ===== */

@media print {
  .theme-toggle { display: none; }
  body, body::before { background: #fff !important; color: #000 !important; }
}
