/* =============================================
   BOOKNANDO -- Design System & Styles
   base.css -- Reset, typography, CSS variables,
   focus, skip-nav, reduced-motion, scrollbar
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Inter:wght@300;400;500;600;700&display=swap');

/* ========================
   CSS Variables / Tokens
   ======================== */
:root {
  --background: 0 0% 99%;
  --foreground: 220 20% 14%;
  --card: 0 0% 100%;
  --card-foreground: 220 20% 14%;
  --popover: 0 0% 100%;
  --popover-foreground: 220 20% 14%;
  --primary: 0 65% 32%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 14% 96%;
  --secondary-foreground: 220 20% 14%;
  --muted: 220 14% 96%;
  --muted-foreground: 220 10% 46%;
  --accent: 0 65% 32%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 220 13% 91%;
  --input: 220 13% 91%;
  --ring: 0 65% 32%;
  --radius: 0.75rem;

  /* Custom tokens */
  --brand: 0 65% 32%;
  --brand-dark: 0 65% 24%;
  --brand-light: 0 40% 95%;
  --navy: 220 40% 18%;
  --navy-light: 220 30% 30%;
  --warm-gray: 30 10% 96%;
  --warm-gray-dark: 30 6% 90%;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --gradient-hero: linear-gradient(135deg, hsl(0 65% 32%) 0%, hsl(220 40% 18%) 100%);
  --gradient-warm: linear-gradient(180deg, hsl(30 10% 96%) 0%, hsl(0 0% 100%) 100%);
  --gradient-card: linear-gradient(145deg, hsl(0 0% 100%) 0%, hsl(220 14% 98%) 100%);

  --shadow-sm: 0 1px 3px hsl(220 20% 14% / 0.06);
  --shadow-md: 0 4px 16px hsl(220 20% 14% / 0.08);
  --shadow-lg: 0 8px 32px hsl(220 20% 14% / 0.1);
  --shadow-xl: 0 16px 48px hsl(220 20% 14% / 0.12);
  --shadow-brand: 0 8px 24px hsl(0 65% 32% / 0.2);
}

/* ========================
   Reset & Base
   ======================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: hsl(var(--border));
}

html {
  scroll-behavior: smooth;
}

body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: hsl(var(--foreground));
}

/* Escala tipográfica de base */
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5, h6 { font-size: 1rem; }

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* Focus */
:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* Skip nav */
.skip-nav,
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0 0 0.5rem 0;
}
.skip-nav:focus,
.skip-link:focus { left: 0; }

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

/* Visually hidden (acessível a leitores de tela) */
.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;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: hsl(var(--secondary)); }
::-webkit-scrollbar-thumb { background: hsl(var(--muted-foreground) / 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground) / 0.5); }
