/* =========================================================
   SterlingGroup — design tokens & base styles
   Shared across all four pages (landing, lakeview, hospital, admin)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ---- Shared neutrals ---- */
  --ink: #14110f;
  --ink-soft: #3a352f;
  --paper: #f8f5ef;
  --paper-raised: #ffffff;
  --stone: #8a8377;
  --stone-light: #d8d2c4;
  --line: rgba(20, 17, 15, 0.12);

  /* ---- Lakeview accent (hospitality) ---- */
  --lv-primary: #8a4a28;
  --lv-primary-deep: #5e3119;
  --lv-gold: #c69a4c;
  --lv-tint: #f4ece1;

  /* ---- Sterling Hospital accent (healthcare) ---- */
  --sh-primary: #163f52;
  --sh-primary-deep: #0d2733;
  --sh-teal: #3e8e7e;
  --sh-tint: #e9f1ef;

  /* ---- Type ---- */
  --font-display: 'Fraunces', 'Iowan Old Style', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* ---- Scale ---- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 22px;
  --shadow-soft: 0 1px 2px rgba(20,17,15,0.04), 0 12px 32px -16px rgba(20,17,15,0.18);
  --shadow-lift: 0 4px 8px rgba(20,17,15,0.06), 0 24px 48px -20px rgba(20,17,15,0.28);

  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 22px;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: 15px;
}

::selection { background: var(--lv-gold); color: var(--ink); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

/* ---------------------------------------------------------
   Mobile nav toggle — shared across index/lakeview/hospital.
   Each page's header keeps its own nav link colors/spacing;
   this just handles the hamburger button and the collapse
   behavior on narrow screens.
   --------------------------------------------------------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 76px);
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 32px;
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 90;
    box-shadow: var(--shadow-soft);
    border-bottom: 1px solid var(--line);
  }
  .primary-nav.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
  .primary-nav a {
    padding: 16px 4px !important;
    border-bottom: 1px solid var(--line);
    font-size: 16px !important;
  }
  body.nav-open { overflow: hidden; }
}


/* ---------------------------------------------------------
   Focus states — always visible, never suppressed
   --------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------
   Signature element: the "ledger line"
   A rule that draws itself left-to-right under a heading —
   used once per page, under the primary section heading only.
   --------------------------------------------------------- */
.ledger {
  position: relative;
  display: inline-block;
}
.ledger::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  height: 2px;
  width: 0%;
  background: currentColor;
  transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.ledger.in-view::after {
  width: 64px;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: currentColor; }

/* ---------------------------------------------------------
   Generic card surface
   --------------------------------------------------------- */
.surface {
  background: var(--paper-raised);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

/* ---------------------------------------------------------
   Toast / inline alert
   --------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  background: var(--ink);
  color: var(--paper);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.35s ease;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #7a2424; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------------------------------------------------------
   Skeleton loading
   --------------------------------------------------------- */
.skeleton {
  background: linear-gradient(100deg, var(--stone-light) 30%, #eee6d4 50%, var(--stone-light) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------------------------------------------------------
   Brand mark — supports either the default inline SVG glyph
   or an admin-uploaded logo image dropped into the same slot
   --------------------------------------------------------- */
.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark__glyph {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.brand-mark__glyph svg { width: 100%; height: 100%; }
.brand-mark__text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-mark__glyph img {
  height: 28px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

/* ---------------------------------------------------------
   Shared footer — used identically by landing, Lakeview, and
   Hospital pages. --footer-accent controls the link hover
   color per page (set in each page's own stylesheet).
   --------------------------------------------------------- */
.site-footer {
  --footer-accent: #ffffff;
  background: var(--ink);
  color: #d8d2c4;
  padding: 64px 0 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; row-gap: 36px; }
}
@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr; row-gap: 32px; }
}

.site-footer__brand-col { grid-column: span 1; }
@media (max-width: 900px) {
  .site-footer__brand-col { grid-column: 1 / -1; }
}
.site-footer__brand .brand-mark__glyph { color: #fff; }
.site-footer .brand-mark__text { color: #fff; }
.site-footer__tagline { color: #9a9484; font-size: 14.5px; margin-top: 10px; max-width: 320px; line-height: 1.55; }

.site-footer__heading {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9a9484;
  margin-bottom: 16px;
}
.site-footer__col p { font-size: 14.5px; line-height: 1.6; margin-bottom: 6px; }
.site-footer__col a { transition: color 0.2s ease; }
.site-footer__col a:hover { color: var(--footer-accent); }
.site-footer__links { display: flex; flex-direction: column; gap: 11px; }
.site-footer__links a { font-size: 14.5px; color: #d8d2c4; }
.site-footer__links a:hover { color: var(--footer-accent); }

/* Icon + text rows (address, phone, email) — matches the "Contact Us" style */
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px !important;
}
.footer-contact-item .icon {
  width: 17px;
  height: 17px;
  color: var(--footer-accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.footer-contact-item > span:last-child,
.footer-contact-item > a { line-height: 1.5; }

.site-footer__socials { display: flex; gap: 10px; margin-top: 18px; }
.site-footer__socials a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.site-footer__socials a:hover { background: var(--footer-accent); color: var(--ink); }
.site-footer__socials .icon { width: 15px; height: 15px; }

.site-footer__bottom {
  padding: 22px 0;
  font-size: 13px;
  color: #847e6f;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

/* ---------------------------------------------------------
   Visually hidden (a11y labels)
   --------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------
   Modal
   --------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,17,15,0.5);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--paper-raised);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lift);
  animation: modal-in 0.3s cubic-bezier(0.16,1,0.3,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------------------------------------------------
   Partner / client logo slider
   Auto-scrolls via CSS animation; pauses on hover/touch/focus.
   Also draggable via JS (see partner-slider.js) for manual swipe.
   Track is duplicated in markup so the loop is seamless.
   --------------------------------------------------------- */
.partner-slider {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  cursor: grab;
  user-select: none;
}
.partner-slider.dragging { cursor: grabbing; }
.partner-slider__track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: partner-scroll var(--partner-duration, 38s) linear infinite;
}
.partner-slider:hover .partner-slider__track,
.partner-slider:focus-within .partner-slider__track,
.partner-slider.dragging .partner-slider__track,
.partner-slider.paused .partner-slider__track {
  animation-play-state: paused;
}
@keyframes partner-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.partner-slider__item {
  flex-shrink: 0;
  height: 44px;
  display: flex;
  align-items: center;
  opacity: 0.72;
  filter: grayscale(1);
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.partner-slider__item:hover { opacity: 1; filter: grayscale(0); }
.partner-slider__item img {
  height: 100%;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  pointer-events: none;
}
.partner-slider__empty {
  padding: 18px 0;
  color: var(--stone);
  font-size: 13.5px;
}

@media (prefers-reduced-motion: reduce) {
  .partner-slider__track { animation: none; }
}

