/* =========================================================
   style.css — Global styles (CLEANED & REFACTORED)
   ========================================================= */


/* ================= ROOT VARIABLES ================= */

:root {
  /* --------- COLOR SYSTEM --------- */
  --primary: #4E342E;
  --primary-soft: #d19479;
  --bg-soft: #F5F1E8;
  --bg-light: #FFFFFF;
  --text-dark: #2a2a2a;
  --text-soft: #666666;
  --text-light: #ffffff;
  --border: #e6e6e6;
  --whatsapp: #25D366;
  --whatsapp-dark: #1ebe5d;

  /* --------- OVERLAY & EFFECTS --------- */
  --overlay-light: rgba(255, 255, 255, 0.08);
  --overlay-light-h: rgba(255, 255, 255, 0.16);
  --overlay-dark: rgba(0, 0, 0, 0.5);

  /* --------- SPACING SCALE --------- */
  --spacing-xs: 0.375rem;  /* 6px */
  --spacing-sm: 0.75rem;   /* 12px */
  --spacing-md: 1.25rem;   /* 20px */
  --spacing-lg: 2rem;      /* 32px */
  --spacing-xl: 3rem;      /* 48px */
  --spacing-2xl: 4rem;     /* 64px */
  --spacing-3xl: 5.5rem;   /* 88px */

  /* --------- BORDER RADIUS --------- */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  /* --------- SHADOW SYSTEM --------- */
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.05);
  --shadow-sm-2: 0 4px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 20px rgba(0,0,0,0.08);
  --shadow-md-2: 0 10px 26px rgba(0,0,0,0.06);
  --shadow-md-3: 0 12px 28px rgba(0,0,0,0.06);
  --shadow-lg: 0 14px 36px rgba(0,0,0,0.10);
  --shadow-lg-2: 0 18px 44px rgba(0,0,0,0.10);
  --shadow-xl: 0 22px 60px rgba(0,0,0,0.14);

  /* --------- ANIMATION & TRANSITIONS --------- */
  --transition: 0.25s ease;
  --transition-fast: 0.15s ease;
  --transition-slow: 0.35s ease;
  --menu-transition: 0.25s ease;

  /* --------- RESPONSIVE BREAKPOINTS --------- */
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;

  /* --------- CONTAINER & LAYOUT --------- */
  --container-padding-mobile: 1rem;
  --container-padding-tablet: 2rem;
  --container-padding-desktop: 3rem;
  --section-padding-mobile: 3rem;
  --section-padding-tablet: 3.5rem;
  --section-padding-desktop: 4rem;

  /* --------- TYPOGRAPHY SCALE --------- */
  --h2-size-mobile: 1.3rem;
  --h2-size-tablet: 2rem;
  --h2-size-desktop: 2.2rem;

  /* --------- GRID PREFERENCES --------- */
  --grid-min-mobile: 220px;
  --grid-min-tablet: 180px;
  --grid-min-desktop: 140px;
}


/* ================= DARK MODE THEME ================= */

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #d19479;
    --primary-soft: #4E342E;
    --bg-soft: #1E1E1E;
    --bg-light: #2B2A28;
    --text-dark: #f2f2f2;
    --text-soft: #c2c2c2;
    --border: rgba(255,255,255,0.08);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: #d19479;
  --primary-soft: #4E342E;
  --bg-soft: #1E1E1E;
  --bg-light: #2B2A28;
  --text-dark: #f2f2f2;
  --text-soft: #c2c2c2;
  --border: rgba(255,255,255,0.08);
}

/* ================= RESET ================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-soft);
  overflow-x: hidden;
}


/* ================= TYPOGRAPHY ================= */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: clamp(1.25rem, 3.2vw, var(--h2-size-tablet));
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.05rem;
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: 0.95rem;
  margin-bottom: var(--spacing-sm);
}

p {
  color: var(--text-soft);
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}

small,
.caption {
  font-size: 0.85rem;
  color: var(--text-soft);
}


/* ================= ELEMENT RESET ================= */

ul,
ol {
  list-style: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
textarea,
select,
button {
  font: inherit;
  border: none;
  background: none;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus {
  color: var(--primary-soft);
}


/* ================= RESPONSIVE ================= */

@media (min-width: var(--bp-md)) {
  html { font-size: 17px; }
  h1 { font-size: 2rem; }
  h2 { font-size: var(--h2-size-tablet); }
  h3 { font-size: 1.1rem; }
}

@media (min-width: var(--bp-lg)) {
  html { font-size: 18px; }
  h1 { font-size: 2.25rem; }
  h2 { font-size: var(--h2-size-desktop); }
  h3 { font-size: 1.15rem; }
}


/* ================= ACCESSIBILITY ================= */

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid rgba(78, 52, 46, 0.12);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(78, 52, 46, 0.06);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* ================= TOUCH TARGET ================= */

button,
a[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"],
.btn,
.btn-primary,
.btn-wa {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* ================= UTILITIES ================= */

.center { text-align: center; }

.transition {
  transition: all var(--transition);
}

.kbd {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-sm);
  font-family: monospace;
}


/* ================= REDUCED MOTION ================= */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


/* ================= PRINT ================= */

@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
  }

  a { text-decoration: underline; }

  pre {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  img {
    page-break-inside: avoid;
  }
}
