/* ══════════════════════════════════════════════════════════════
   THRIFTSEA CORE STYLESHEET
   Typography, CSS Variables, Resets & Base Utilities
   ══════════════════════════════════════════════════════════════ */

:root {
  /* Color Palette */
  --bg-cream: #F7F6F2;
  --bg-white: #FFFFFF;
  --bg-ink: #111110;
  --bg-dark-card: #1A1A18;
  --bg-surface: #EFEFEA;
  
  --text-ink: #111110;
  --text-charcoal: #3D3D3A;
  --text-stone: #5C5C57;
  --text-muted: #6E6E68;
  --text-light: #F7F6F2;
  
  --border-subtle: #E6E5DF;
  --border-medium: #D4D3CC;
  --border-dark: #2A2A28;
  
  --accent-red: #B23B2B;
  --accent-green: #2E7D32;
  --accent-gold: #C28B1E;

  /* Typography */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(17, 17, 16, 0.04);
  --shadow-md: 0 8px 24px rgba(17, 17, 16, 0.08);
  --shadow-lg: 0 16px 40px rgba(17, 17, 16, 0.14);
  --shadow-drawer: -4px 0 30px rgba(0, 0, 0, 0.18);
  --shadow-bottom-nav: 0 -4px 20px rgba(0, 0, 0, 0.06);

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Layout */
  --header-height-desktop: 68px;
  --header-height-mobile: 56px;
  --bottom-nav-height: 62px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-cream);
  color: var(--text-ink);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100svh;
}

/* Prevent background scroll when modal/drawer is open */
body.modal-open {
  overflow: hidden;
  touch-action: none;
}

/* Typography Helpers */
.font-display {
  font-family: var(--font-serif);
}

.font-body {
  font-family: var(--font-sans);
}

/* Base Layout Containers */
.container {
  width: 100%;
  max-width: 1480px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Utilities */
.hidden {
  display: none !important;
}

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

.text-ink { color: var(--text-ink); }
.text-stone { color: var(--text-stone); }
.text-charcoal { color: var(--text-charcoal); }
.text-light { color: var(--text-light); }
.text-accent { color: var(--accent-green); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-stone);
}

/* ── Accessibility: Skip to Content Bypass Link (WCAG 2.4.1) ── */
.skip-to-content {
  position: absolute;
  top: -120px;
  left: 1.5rem;
  z-index: 100000;
  background: var(--bg-ink, #111110);
  color: #F7F6F2;
  padding: 0.75rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.skip-to-content:focus {
  top: 0;
  outline: 2px solid var(--accent-gold, #C28B1E);
  outline-offset: 2px;
}
