/* ==========================================================================
   BASE — Reset, CSS Variables, Typography
   BEM methodology | DeDragones Theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Brand Colors */
  --color-ink:         #1a1612;
  --color-ink-2:       #2e2820;
  --color-ink-3:       #3d3530;
  --color-gold:        #c9952a;
  --color-gold-light:  #e8b84b;
  --color-gold-pale:   #f5e6c0;
  --color-cream:       #f5f0e8;
  --color-cream-2:     #ede6d8;
  --color-cream-3:     #e4dcd0;
  --color-red-acc:     #8b2020;
  --color-amazon:      #ff9900;
  --color-amazon-dark: #e68a00;

  /* Text */
  --color-text-primary:   #1a1612;
  --color-text-secondary: #5c5248;
  --color-text-muted:     #8a7e72;
  --color-text-inverse:   #f5f0e8;
  --color-text-inverse-muted: rgba(245, 240, 232, 0.55);

  /* Borders */
  --color-border:       rgba(201, 149, 42, 0.2);
  --color-border-light: rgba(26, 22, 18, 0.1);
  --color-border-cream: #ddd6c8;

  /* Backgrounds */
  --color-bg-page:    #f5f0e8;
  --color-bg-card:    #faf6ef;
  --color-bg-white:   #ffffff;
  --color-bg-dark:    #1a1612;
  --color-bg-dark-2:  #2e2820;

  /* Typography */
  --font-serif:   'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-sans:    'Crimson Pro', 'Georgia', serif;
  --font-ui:      -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'Courier New', Courier, monospace;

  /* Font Sizes */
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 16px;
  --text-md:   18px;
  --text-lg:   22px;
  --text-xl:   28px;
  --text-2xl:  36px;
  --text-3xl:  48px;

  /* Spacing */
  --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;

  /* Layout */
  --container-max:  1160px;
  --content-max:    720px;
  --sidebar-width:  300px;
  --gap-grid:       28px;

  /* Radius */
  --radius-sm:  4px;
  --radius-md:  6px;
  --radius-lg:  10px;
  --radius-xl:  16px;

  /* Shadows */
  --shadow-sm:  0 1px 4px rgba(26, 22, 18, 0.06);
  --shadow-md:  0 4px 16px rgba(26, 22, 18, 0.1);
  --shadow-lg:  0 8px 32px rgba(26, 22, 18, 0.14);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;

  /* Z-index */
  --z-header:  100;
  --z-overlay: 200;
  --z-modal:   300;
}

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

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

body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

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

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

table {
  border-collapse: collapse;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Google Fonts import (loaded via functions.php enqueue, fallback here)
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,400&display=swap');

/* --------------------------------------------------------------------------
   Typography base
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}

h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

p {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

p:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: var(--color-text-primary); }
em     { font-style: italic; }

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

.u-container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.u-text-gold  { color: var(--color-gold); }
.u-text-muted { color: var(--color-text-muted); }
.u-serif      { font-family: var(--font-serif); }

/* --------------------------------------------------------------------------
   Tag / badge base
   -------------------------------------------------------------------------- */
.tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: rgba(201, 149, 42, 0.12);
  color: var(--color-gold);
  border: 1px solid rgba(201, 149, 42, 0.2);
  white-space: nowrap;
}

.tag--dark {
  background: rgba(201, 149, 42, 0.18);
  color: var(--color-gold-light);
  border-color: rgba(201, 149, 42, 0.3);
}

.tag--new {
  background: var(--color-red-acc);
  color: #fff;
  border-color: transparent;
}

/* --------------------------------------------------------------------------
   Section header
   -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-cream);
}

.section-header__title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  position: relative;
  padding-left: var(--space-4);
}

.section-header__title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 3px;
  background: var(--color-gold);
  border-radius: 2px;
}

.section-header__link {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold);
  transition: color var(--transition-fast);
}

.section-header__link:hover {
  color: var(--color-gold-light);
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding: var(--space-4) 0;
}

.breadcrumbs__separator {
  color: var(--color-text-muted);
  opacity: 0.5;
}

.breadcrumbs a {
  color: var(--color-gold);
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--color-gold-light);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-10) 0;
}

.pagination__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--color-border-cream);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  background: var(--color-bg-white);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.pagination__item:hover {
  border-color: var(--color-gold);
  color: var(--color-text-primary);
}

.pagination__item--active {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-ink);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Scroll reveal animation
   -------------------------------------------------------------------------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
}

.reveal.is-visible {
  animation: fadeUp 0.5s ease forwards;
}

/* Staggered delays for grid children */
.reveal:nth-child(1) { animation-delay: 0s; }
.reveal:nth-child(2) { animation-delay: 0.07s; }
.reveal:nth-child(3) { animation-delay: 0.14s; }
.reveal:nth-child(4) { animation-delay: 0.21s; }
.reveal:nth-child(5) { animation-delay: 0.28s; }
.reveal:nth-child(6) { animation-delay: 0.35s; }

.u-container a:hover {
  color: var(--color-text-secondary) !important;
  background: var(--color-bg-white) !important;
  border: 1px solid var(--color-border-cream) !important;
  transition: all var(--transition-fast);
  
}
