/* ═══════════════════════════════════════════════
   BIRAWA VET — DESIGN TOKENS & COMPONENT STYLES
   ═══════════════════════════════════════════════ */

/* ── 1. DESIGN TOKENS (CSS Custom Properties) ──────────────── */
:root {
  /* Brand Palette */
  --bv-brand:         #047857;   /* emerald-700 - Improved for contrast */
  --bv-brand-hover:   #065f46;   /* emerald-800 */
  --bv-brand-dark:    #064e3b;   /* emerald-900 */
  --bv-brand-light:   #ecfdf5;   /* emerald-50  */
  --bv-brand-muted:   #d1fae5;   /* emerald-100 */
  --bv-brand-border:  #6ee7b7;   /* emerald-300 */

  /* Text Scale */
  --bv-text-primary:   #111827;  /* gray-900 */
  --bv-text-body:      #374151;  /* gray-700 */
  --bv-text-secondary: #4b5563;  /* gray-600 - Improved for contrast (min 4.5:1) */
  --bv-text-muted:     #52525b;  /* gray-600/700 - Improved for contrast */

  /* Surfaces */
  --bv-surface:        #ffffff;
  --bv-surface-raised: #f9fafb;  /* gray-50  */
  --bv-surface-muted:  #f3f4f6;  /* gray-100 */

  /* Borders */
  --bv-border:         #e5e7eb;  /* gray-200 */
  --bv-border-subtle:  #f3f4f6;  /* gray-100 */

  /* Border Radius */
  --bv-r-sm:   6px;
  --bv-r-md:   10px;
  --bv-r-lg:   16px;
  --bv-r-xl:   24px;
  --bv-r-pill: 9999px;

  /* Shadows */
  --bv-shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --bv-shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --bv-shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --bv-shadow-lg:  0 12px 32px rgba(0,0,0,0.09), 0 4px 10px rgba(0,0,0,0.04);
  --bv-shadow-nav: 0 1px 0 rgba(0,0,0,0.07);
  --bv-shadow-drop:0 20px 40px rgba(0,0,0,0.09), 0 4px 16px rgba(0,0,0,0.05);
  --bv-shadow-btn: 0 2px 8px rgba(5,150,105,0.30);

  /* Motion */
  --bv-ease:    cubic-bezier(0.16, 1, 0.3, 1);
  --bv-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --bv-t-fast:  120ms;
  --bv-t-base:  200ms;
  --bv-t-slow:  300ms;

  /* Spacing Scale */
  --bv-section-y:    4rem;      /* 64px  */
  --bv-section-y-sm: 2.5rem;   /* 40px  */
}

/* ── 2. COMPONENT TOKENS ──────────────────────────────────── */

/* --- Buttons --- */
.bv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--bv-t-base) var(--bv-ease);
  border: none;
  outline: none;
  text-decoration: none;
  font-family: inherit;
  font-size: .9375rem;  /* 15px */
  padding: .75rem 1.75rem;
  border-radius: var(--bv-r-pill);
}
.bv-btn-primary {
  background: var(--bv-brand);
  color: #fff;
  box-shadow: var(--bv-shadow-btn);
}
.bv-btn-primary:hover {
  background: var(--bv-brand-hover);
  box-shadow: var(--bv-shadow-md);
  transform: translateY(-1px);
}
.bv-btn-outline {
  background: transparent;
  color: var(--bv-brand);
  border: 1.5px solid var(--bv-brand);
}
.bv-btn-outline:hover {
  background: var(--bv-brand-light);
}
.bv-btn-ghost {
  background: transparent;
  color: var(--bv-text-body);
  border-radius: var(--bv-r-md);
  padding: .5rem .875rem;
  font-weight: 600;
  font-size: .875rem;
}
.bv-btn-ghost:hover {
  background: var(--bv-surface-raised);
  color: var(--bv-text-primary);
}
.bv-btn-sm  { padding: .5rem 1.25rem; font-size: .875rem; }
.bv-btn-lg  { padding: 1rem 2.25rem;  font-size: 1.0625rem; }

/* --- Navigation Link --- */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .5rem .875rem;
  border-radius: var(--bv-r-md);
  font-size: .875rem;
  font-weight: 600;
  color: var(--bv-text-body);
  text-decoration: none;
  transition:
    background var(--bv-t-fast),
    color var(--bv-t-fast);
  white-space: nowrap;
}
.nav-link:hover,
.nav-link:focus-visible {
  background: var(--bv-surface-raised);
  color: var(--bv-text-primary);
}
.nav-link.active {
  color: var(--bv-brand);
  background: var(--bv-brand-light);
}

/* --- Cards --- */
.bv-card {
  background: var(--bv-surface);
  border: 1px solid var(--bv-border);
  border-radius: var(--bv-r-lg);
  transition:
    box-shadow var(--bv-t-base) var(--bv-ease),
    border-color var(--bv-t-base);
}
.bv-card:hover {
  box-shadow: var(--bv-shadow-md);
  border-color: var(--bv-brand-border);
}

/* --- Section Spacing --- */
.bv-section {
  padding-top: var(--bv-section-y-sm);
  padding-bottom: var(--bv-section-y-sm);
}
@media (min-width: 768px) {
  .bv-section {
    padding-top: var(--bv-section-y);
    padding-bottom: var(--bv-section-y);
  }
}

/* --- Typography Tokens --- */
.bv-heading-xl {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--bv-text-primary);
}
.bv-heading-lg {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--bv-text-primary);
}
.bv-heading-md {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--bv-text-primary);
}
.bv-lead {
  font-size: clamp(.9375rem, 2vw, 1.125rem);
  line-height: 1.75;
  color: var(--bv-text-body);
}
.bv-caption {
  font-size: .8125rem;
  color: var(--bv-text-secondary);
  line-height: 1.5;
}

/* ── 3. LEGACY / UTILITY ──────────────────────────────────── */

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* Hero text shadow */
.text-shadow-hero {
  text-shadow: 0 2px 4px rgba(0,0,0,0.7), 0 4px 12px rgba(0,0,0,0.5);
}

/* Alpine cloak */
[x-cloak] { display: none !important; }

/* PWA Safe Area */
body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* SVG fill utility */
.fill-white { fill: #fff; }
.fill-gray-50 { fill: #f9fafb; }

/* Object position utilities (not in Tailwind compile) */
.object-right  { object-position: right center; }
.object-left   { object-position: left center; }
.object-top    { object-position: center top; }
