/* =========================================================
   VetConnect — Global Design Tokens & Base Styles
   ========================================================= */

:root {
  /* Color — derived from the St. Clare Veterinary Clinic logo */
  --color-blue: #1295D3;
  --color-blue-deep: #0A6CA3;
  --color-blue-pale: #DCF0FC;
  --color-lime: #8DC63F;
  --color-lime-deep: #679E27;
  --color-lime-pale: #EFF8DF;
  --color-coral: #F28C7A;
  --color-white: #FFFFFF;
  --color-ink: #183B4E;
  --color-slate: #5C7180;
  --color-border: #D7E6EE;

  /* Status colors */
  --status-pending-bg: #FFF6E5;
  --status-pending-fg: #B9750C;
  --status-confirmed-bg: #EAF6FD;
  --status-confirmed-fg: #0E5F92;
  --status-completed-bg: #F1F8E9;
  --status-completed-fg: #557C2C;
  --status-cancelled-bg: #FBEAEA;
  --status-cancelled-fg: #B33A34;
  --status-rescheduled-bg: #F1EEF8;
  --status-rescheduled-fg: #6C5B9E;

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Public Sans', 'Segoe UI', sans-serif;

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 2px 8px rgba(20, 60, 90, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 60, 90, 0.10);

  /* Layout */
  --content-max: 1160px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 3.6vw, 3.15rem); font-weight: 500; }
h1 .accent, .accent { color: var(--color-lime); }
h2 { font-size: clamp(1.6rem, 2.4vw, 2.15rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; color: var(--color-ink); max-width: 62ch; }
p.lede { color: var(--color-slate); font-size: 1.1rem; }

a { color: var(--color-blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

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

ul { padding: 0; margin: 0; list-style: none; }

/* Focus visibility — never suppressed */
:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.2;
}
.brand:hover { text-decoration: none; }
.brand img {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  flex-shrink: 0;
}
.brand-name-full { display: block; }
.brand-name-full small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--color-slate);
  letter-spacing: 0.02em;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-blue);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-blue-deep); }

/* Book Appointment CTA — consistent green across the site */
.btn-primary[href="appointment.html"],
.unified-book {
  background: var(--color-lime);
  color: var(--color-white);
  border: none;
  outline: none;
  box-shadow: none;
}
.btn-primary[href="appointment.html"]:hover,
.unified-book:hover {
  background: var(--color-lime-deep);
  border: none;
  border-color: transparent;
  outline: none;
  box-shadow: none;
}
/* Keep the Book Appointment CTA green without the blue focus outline. */
.btn-primary[href="appointment.html"]:focus,
.btn-primary[href="appointment.html"]:focus-visible,
.unified-book:focus,
.unified-book:focus-visible {
  background: var(--color-lime);
  color: var(--color-white);
  border-color: transparent;
  outline: none;
  box-shadow: none;
}


.btn-accent {
  background: var(--color-lime);
  color: var(--color-white);
}
.btn-accent:hover { background: var(--color-lime-deep); }

.btn-outline {
  background: transparent;
  border-color: var(--color-blue);
  color: var(--color-blue-deep);
}
.btn-outline:hover { background: var(--color-blue-pale); }

.btn-text {
  background: none;
  padding: 4px 0;
  color: var(--color-blue-deep);
  font-weight: 600;
}
.btn-text:hover { color: var(--color-blue); }

.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

/* ---------- Status badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  line-height: 1;
}
.badge-pending     { background: var(--status-pending-bg);     color: var(--status-pending-fg); }
.badge-confirmed   { background: var(--status-confirmed-bg);   color: var(--status-confirmed-fg); }
.badge-completed   { background: var(--status-completed-bg);   color: var(--status-completed-fg); }
.badge-cancelled   { background: var(--status-cancelled-bg);   color: var(--status-cancelled-fg); }
.badge-rescheduled { background: var(--status-rescheduled-bg); color: var(--status-rescheduled-fg); }

/* ---------- Section spacing ---------- */
.section {
  padding: clamp(48px, 8vw, 88px) 0;
}
.section-tight { padding: clamp(36px, 6vw, 64px) 0; }
.section-tint {
  background: var(--color-blue-pale);
}
.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}
.section-head p { margin-bottom: 0; }
.section-head-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-lime-deep);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.section-head-eyebrow img { width: 18px; height: 18px; }


/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .btn { white-space: normal; text-align: center; }
}

/* Prevent protected-page authorization UI from flashing before session.js runs. */
#auth-gate[hidden] { display: none !important; }
