/* ============================================================
   Tahoe Home & Pet Services — Site Styles
   Brand themes are controlled by [data-theme] on <html>.
   Default: "alpine" (drawn from the current logo).
   ============================================================ */

:root,
[data-theme="alpine"] {
  --primary: #1e3a6b;
  --primary-dark: #142647;
  --primary-soft: #e3edf8;
  --accent: #d98e32;
  --accent-dark: #b06f1e;
  --bg: #f7fafd;
  --surface: #ffffff;
  --text: #1a2438;
  --text-muted: #5a6a85;
  --border: #d9e2ef;
  --success: #2e7d52;
  --danger: #b3402f;
  --hero-grad: linear-gradient(160deg, #142647 0%, #1e3a6b 55%, #2c518f 100%);
}

[data-theme="sierra"] {
  --primary: #2e4b3f;
  --primary-dark: #1f352c;
  --primary-soft: #e8efe9;
  --accent: #c67b4f;
  --accent-dark: #a55f36;
  --bg: #faf7f1;
  --surface: #ffffff;
  --text: #24302a;
  --text-muted: #64726a;
  --border: #dfe3da;
  --success: #2e7d52;
  --danger: #b3402f;
  --hero-grad: linear-gradient(160deg, #1f352c 0%, #2e4b3f 55%, #44685a 100%);
}

[data-theme="lakeshore"] {
  --primary: #0f5e68;
  --primary-dark: #093f47;
  --primary-soft: #e0f0f2;
  --accent: #e2725b;
  --accent-dark: #c25640;
  --bg: #f4fafa;
  --surface: #ffffff;
  --text: #16333a;
  --text-muted: #55707a;
  --border: #d3e4e6;
  --success: #2e7d52;
  --danger: #b3402f;
  --hero-grad: linear-gradient(160deg, #093f47 0%, #0f5e68 55%, #1b8494 100%);
}

[data-theme="granite"] {
  --primary: #2b2f36;
  --primary-dark: #1b1e23;
  --primary-soft: #ebeced;
  --accent: #d96c2c;
  --accent-dark: #b5551d;
  --bg: #f6f5f3;
  --surface: #ffffff;
  --text: #232629;
  --text-muted: #64686e;
  --border: #dddcd8;
  --success: #2e7d52;
  --danger: #b3402f;
  --hero-grad: linear-gradient(160deg, #1b1e23 0%, #2b2f36 55%, #454b55 100%);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--primary); }

h1, h2, h3, h4 {
  font-family: "Outfit", "Inter", sans-serif;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { margin: 0 0 1em; }
.muted { color: var(--text-muted); }

.container { width: min(1120px, 92%); margin: 0 auto; }
section { padding: 4.5rem 0; }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.1s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-navy { background: var(--primary); color: #fff; }
.btn-navy:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-light-outline { border-color: rgba(255,255,255,0.7); color: #fff; background: transparent; }
.btn-light-outline:hover { background: rgba(255,255,255,0.14); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.9); }
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.88rem; border-radius: 6px; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}
.brand img { width: 48px; height: 48px; }
.brand-name {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--primary);
}
.brand-name span { display: block; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent-dark); }
.nav-links a.active { color: var(--accent-dark); font-weight: 600; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.7rem;
  color: var(--primary);
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.5rem;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-grad);
  color: #fff;
  padding: 5.5rem 0 6rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -5% -2px -5%;
  height: 90px;
  background: var(--bg);
  clip-path: polygon(0 65%, 8% 45%, 16% 62%, 25% 30%, 33% 55%, 42% 20%, 52% 58%, 61% 35%, 70% 60%, 79% 28%, 88% 55%, 100% 40%, 100% 100%, 0 100%);
  opacity: 1;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 15em; }
.hero .lede {
  font-size: 1.18rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 34em;
  margin-bottom: 2rem;
}
.hero-ctas { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-badges {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
  margin-top: 2.6rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}
.hero-badges span { display: flex; align-items: center; gap: 0.45rem; }

/* Page hero (interior pages) */
.page-hero {
  background: var(--hero-grad);
  color: #fff;
  padding: 3.5rem 0;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,0.87); max-width: 40em; margin-bottom: 0; }

/* ---------- Cards & grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.8rem;
}
.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}
.card ul { padding-left: 1.1rem; margin: 0.4rem 0 0; color: var(--text-muted); font-size: 0.94rem; }
.card ul li { margin-bottom: 0.3rem; }

/* Steps */
.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-family: "Outfit", sans-serif;
}

/* Testimonials */
.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
}
.testimonial .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 0.7rem; }
.testimonial blockquote { margin: 0 0 1.1rem; font-size: 0.98rem; flex: 1; }
.testimonial cite { font-style: normal; font-weight: 600; font-size: 0.9rem; }
.testimonial cite span { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.82rem; }

/* CTA band */
.cta-band {
  background: var(--hero-grad);
  border-radius: 18px;
  color: #fff;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 0.3em; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.2rem;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 600; font-size: 0.9rem; }
.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-note { font-size: 0.85rem; color: var(--text-muted); }
.form-msg { margin-top: 1rem; font-weight: 600; display: none; padding: 0.8rem 1rem; border-radius: 8px; }
.form-msg.success { display: block; background: #e6f4ec; color: var(--success); }
.form-msg.error { display: block; background: #faeae7; color: var(--danger); }

/* Role picker (signup) */
.role-picker { display: grid; grid-template-columns: 1fr; gap: 0.7rem; }
.role-option {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.role-option:hover { border-color: var(--primary); }
.role-option input { margin-top: 0.3rem; accent-color: var(--primary); }
.role-option .role-title { font-weight: 600; }
.role-option .role-desc { font-size: 0.85rem; color: var(--text-muted); }
.role-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

/* Auth layout */
.auth-wrap { max-width: 460px; margin: 3.5rem auto; width: 92%; }
.auth-tabs { display: flex; gap: 0; margin-bottom: -1px; }
.auth-tabs button {
  flex: 1;
  font: inherit;
  font-weight: 600;
  padding: 0.85rem;
  background: var(--primary-soft);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-muted);
}
.auth-tabs button.active { background: var(--surface); color: var(--primary); border-bottom-color: var(--surface); }
.auth-tabs button:first-child { border-radius: 12px 0 0 0; }
.auth-tabs button:last-child { border-radius: 0 12px 0 0; }
.auth-card { border-radius: 0 0 16px 16px; }
.divider {
  display: flex; align-items: center; gap: 0.8rem;
  color: var(--text-muted); font-size: 0.85rem;
  margin: 1.2rem 0;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-weight: 600;
}
.btn-google:hover { background: var(--primary-soft); }

/* ---------- Dashboard ---------- */
.dash-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}
.dash-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  position: sticky;
  top: 90px;
}
.dash-nav .dash-user { padding: 0.5rem 0.8rem 0.9rem; border-bottom: 1px solid var(--border); margin-bottom: 0.6rem; }
.dash-nav .dash-user strong { display: block; font-size: 0.95rem; }
.dash-nav .dash-user span { font-size: 0.78rem; color: var(--text-muted); }
.dash-nav button.dash-link {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 500;
  font-size: 0.93rem;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  color: var(--text);
}
.dash-link:hover { background: var(--primary-soft); }
.dash-link.active { background: var(--primary); color: #fff; font-weight: 600; }
.dash-panel { min-width: 0; }
.dash-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-bottom: 1.6rem; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
}
.stat-card .stat-num { font-size: 1.9rem; font-weight: 700; font-family: "Outfit", sans-serif; color: var(--primary); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 560px; }
.data-table th, .data-table td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { background: var(--primary-soft); font-family: "Outfit", sans-serif; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--primary-dark); }
.data-table tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge.pending { background: #fdf1dc; color: #9a6a12; }
.badge.approved, .badge.scheduled, .badge.active { background: #e3edf8; color: #1e3a6b; }
.badge.completed { background: #e6f4ec; color: var(--success); }
.badge.emergency, .badge.cancelled { background: #faeae7; color: var(--danger); }

.panic-band {
  background: #faeae7;
  border: 1.5px solid #f0c8c0;
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.panic-band p { margin: 0; font-size: 0.92rem; }

.empty-note { color: var(--text-muted); padding: 1.5rem; text-align: center; }

/* ---------- Brand kit page ---------- */
.kit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.kit-preview { height: 130px; display: flex; }
.kit-preview div { flex: 1; }
.kit-body { padding: 1.4rem 1.6rem 1.8rem; }
.kit-swatches { display: flex; gap: 0.5rem; margin: 0.8rem 0 1rem; }
.kit-swatches span {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.08);
}
.kit-note { font-size: 0.88rem; color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 3.5rem 0 2rem;
  margin-top: 2rem;
  font-size: 0.92rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: rgba(255,255,255,0.8); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.4rem; font-size: 0.82rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.alt-bg { background: var(--primary-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-nav { position: static; display: flex; flex-wrap: wrap; gap: 0.3rem; }
  .dash-nav .dash-user { width: 100%; border-bottom: none; margin-bottom: 0.2rem; }
  .dash-nav button.dash-link { width: auto; }
  .dash-cards { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  section { padding: 3rem 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 2rem; }
  .dash-cards { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 4%;
    gap: 1rem;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
}
