/* variables.css — Crosté Pizzaria Design System
   Tema dark elegante como padrão. Light mode via html.light */

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

/* ── DARK MODE (padrão) ───────────────────────────────────────────── */
:root {
  /* Acento — dourado imperial */
  --color-accent: #c8960c;
  --color-accent-hover: #a67c00;
  --color-accent-soft: rgba(200, 150, 12, 0.14);
  --color-accent-glow: rgba(200, 150, 12, 0.3);

  /* Dourado — detalhes premium */
  --color-gold: #e2a81a;
  --color-gold-soft: rgba(226, 168, 26, 0.18);

  /* Superfícies dark */
  --color-bg: #0d0d0d;
  --color-surface: #161616;
  --color-surface-2: #1e1e1e;
  --color-surface-3: #262626;
  --color-overlay: rgba(255, 255, 255, 0.04);
  --color-glass: rgba(255, 255, 255, 0.06);
  --color-glass-border: rgba(255, 255, 255, 0.1);

  /* Texto */
  --color-text: #f0ede8;
  --color-text-muted: #8a8580;
  --color-text-subtle: #5a5552;
  --color-text-inverse: #0d0d0d;
  --color-on-accent: #ffffff;

  /* Bordas */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.14);

  /* Feedback */
  --color-success: #22c55e;
  --color-success-bg: rgba(34, 197, 94, 0.12);
  --color-error: #ef4444;
  --color-error-bg: rgba(239, 68, 68, 0.12);
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.12);

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-accent: 0 8px 24px rgba(200, 150, 12, 0.35);
  --shadow-glow: 0 0 50px rgba(200, 150, 12, 0.25);

  /* Tipografia */
  --font-display: "Playfair Display SC", Georgia, serif;
  --font-body: "Karla", system-ui, sans-serif;

  /* Escala de texto */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Espaçamento (base 4px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transições */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-base: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* Z-index */
  --z-sticky: 100;
  --z-dropdown: 200;
  --z-sidebar: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Layout */
  --container-max: 1200px;
  --navbar-h: 68px;

  /* Aliases usados nos componentes */
  --color-primary: var(--color-accent);
  --color-background: var(--color-bg);
  --font-heading: var(--font-display);
}

/* ── LIGHT MODE ───────────────────────────────────────────────────── */
html.light {
  --color-bg: #faf8f5;
  --color-surface: #ffffff;
  --color-surface-2: #f5f1eb;
  --color-surface-3: #ede8df;
  --color-overlay: rgba(0, 0, 0, 0.03);
  --color-glass: rgba(255, 255, 255, 0.7);
  --color-glass-border: rgba(0, 0, 0, 0.08);

  --color-text: #1a1614;
  --color-text-muted: #6b6560;
  --color-text-subtle: #9c9590;
  --color-text-inverse: #faf8f5;

  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-strong: rgba(0, 0, 0, 0.14);

  --color-success-bg: #dcfce7;
  --color-error-bg: #fee2e2;
  --color-warning-bg: #fef3c7;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(201, 168, 76, 0.15);
}

/* Light mode body — mesmas linhas, opacidade menor para não poluir */
html.light body {
  background-image:
    repeating-linear-gradient(
      118deg,
      transparent,
      transparent 120px,
      rgba(160, 110, 0, 0.06) 120px,
      rgba(160, 110, 0, 0.06) 121px
    ),
    repeating-linear-gradient(
      52deg,
      transparent,
      transparent 200px,
      rgba(160, 110, 0, 0.04) 200px,
      rgba(160, 110, 0, 0.04) 201px
    ),
    repeating-linear-gradient(
      83deg,
      transparent,
      transparent 340px,
      rgba(160, 110, 0, 0.025) 340px,
      rgba(160, 110, 0, 0.025) 341px
    );
}

/* ── SCROLLBAR CUSTOMIZADA ────────────────────────────────────────── */
/* Webkit (Chrome, Edge, Safari) — * garante cobertura de todos os elementos com overflow */
*::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(200, 150, 12, 0.35);
  border-radius: 999px;
  transition: background 0.2s;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 150, 12, 0.65);
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 150, 12, 0.35) transparent;
}

/* Light mode — thumb ligeiramente mais visível no fundo claro */
html.light *::-webkit-scrollbar-thumb {
  background: rgba(160, 110, 0, 0.3);
}
html.light *::-webkit-scrollbar-thumb:hover {
  background: rgba(160, 110, 0, 0.55);
}
html.light * {
  scrollbar-color: rgba(160, 110, 0, 0.3) transparent;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-h);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth momentum scroll on all scrollable elements */
* {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
        /* diagonal fine lines — dark mode gold */
    repeating-linear-gradient(
      118deg,
      transparent,
      transparent 120px,
      rgba(200, 150, 12, 0.045) 120px,
      rgba(200, 150, 12, 0.045) 121px
    ),
    repeating-linear-gradient(
      52deg,
      transparent,
      transparent 200px,
      rgba(200, 150, 12, 0.028) 200px,
      rgba(200, 150, 12, 0.028) 201px
    ),
    repeating-linear-gradient(
      83deg,
      transparent,
      transparent 340px,
      rgba(200, 150, 12, 0.018) 340px,
      rgba(200, 150, 12, 0.018) 341px
    );
  transition:
    background-color var(--duration-base) var(--ease-base),
    color var(--duration-base) var(--ease-base);
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--color-text);
}

img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: var(--font-body);
  cursor: pointer;
}
input,
textarea,
select {
  font-family: var(--font-body);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1s;
    transition-duration: 1s;
  }
}
