/* ══════════════════════════════════════════════
   BASE — Reset, Custom Properties, Typography
   Doggy Tales Whistler — Warm & Playful
   ══════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,800;1,9..144,400;1,9..144,500&family=Lato:wght@300;400;700;900&display=swap');

/* ── Custom Properties ── */
:root {
  /* Colors — DTW Brand Guide: Teal #6EC6CA + Lavender #CCABD8
     Accessibility: all text pairings meet WCAG AA (4.5:1 normal, 3:1 large) */
  --color-bg: #F4FAFB;
  --color-bg-warm: #EAF5F6;
  --color-surface: #FFFFFF;
  --color-surface-alt: #EDF7F8;
  --color-surface-warm: #F8FDFD;
  --color-primary: #6EC6CA;           /* brand teal — decorative, fills, large elements */
  --color-primary-light: #8DD4D7;
  --color-primary-dark: #237477;      /* darkened for AA contrast — 5.0:1 on white */
  --color-primary-ghost: rgba(110, 198, 202, 0.1);
  --color-primary-text: #1D6E72;      /* teal for body text — 6.2:1 on #F4FAFB */
  --color-secondary: #CCABD8;         /* brand lavender — decorative */
  --color-secondary-light: #DBBFE5;
  --color-secondary-dark: #7B5C8A;    /* darkened for AA text contrast (5.1:1 on white) */
  --color-secondary-ghost: rgba(204, 171, 216, 0.12);
  --color-accent: #F2A65A;            /* decorative only */
  --color-accent-light: #F5BB7E;
  --color-accent-dark: #B5711E;       /* darkened for AA text contrast (4.6:1 on white) */
  --color-text: #2C3E50;
  --color-text-muted: #4A5968;        /* darkened from #5A6B7D for better contrast */
  --color-text-light: #6B7A89;        /* darkened from #8A97A6 — now 4.1:1 on #F4FAFB */
  --color-border: #D4E8EA;
  --color-border-light: #E8F3F4;
  --color-success: #1D7A4D;           /* darkened green for text contrast */
  --color-error: #C0392B;             /* stronger red for error visibility */
  --color-overlay: rgba(44, 62, 80, 0.6);

  /* Typography — DTW Brand: Fraunces display + Lato body */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Lato', system-ui, sans-serif;

  /* Fluid Type Scale */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.3vw, 0.9rem);
  --text-base: clamp(0.95rem, 0.88rem + 0.4vw, 1.1rem);
  --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  --text-xl: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
  --text-2xl: clamp(1.6rem, 1.3rem + 1.5vw, 2.2rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --text-4xl: clamp(2.5rem, 1.8rem + 3.5vw, 4rem);
  --text-5xl: clamp(3rem, 2rem + 5vw, 5.5rem);

  /* Spacing */
  --space-2xs: 0.125rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --max-width: 1280px;
  --max-width-narrow: 800px;
  --max-width-blog: 720px;
  --gutter: clamp(1rem, 3vw, 2rem);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(44, 74, 76, 0.06);
  --shadow-sm: 0 2px 8px rgba(44, 74, 76, 0.08);
  --shadow-md: 0 4px 16px rgba(44, 74, 76, 0.1);
  --shadow-lg: 0 8px 32px rgba(44, 74, 76, 0.12);
  --shadow-xl: 0 16px 48px rgba(44, 74, 76, 0.16);
  --shadow-glow: 0 0 24px rgba(110, 198, 202, 0.25);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 300ms var(--ease-out);
  --transition-slow: 500ms var(--ease-out);
  --transition-bounce: 400ms var(--ease-bounce);
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--color-primary-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

ul, ol {
  list-style: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-3xl);
  font-weight: 600;
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 600;
}

h4 {
  font-size: var(--text-xl);
  font-weight: 500;
}

h5 {
  font-size: var(--text-lg);
  font-weight: 500;
}

h6 {
  font-size: var(--text-base);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-md);
  max-width: 65ch;
}

strong {
  font-weight: 600;
}

small {
  font-size: var(--text-sm);
}

/* ── Selection ── */
::selection {
  background-color: var(--color-accent-light);
  color: var(--color-text);
}

/* ── Focus Visible ── */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Scrollbar Styling ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}

/* ── Reduced Motion ── */
@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;
    scroll-behavior: auto !important;
  }
}
