/* ==========================================
   BASE: Variables, Reset, Typography, Utilities
   ========================================== */

:root {
  /* Color Palette derived from Logo */
  --bg-dark: #121111;
  --bg-dark-secondary: #1a1a1a;
  --bg-dark-tertiary: #2a2a2a;

  --color-cream: #EBE7D3;
  --color-rust: #D24628;
  --color-mustard: #E0B33A;
  --color-teal: #4A9B93;

  /* Text Colors */
  --text-main: var(--color-cream);
  --text-muted: #a0a0a0;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --nav-height: 80px;
  --padding-horizontal: 4%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
}

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

ul {
  list-style: none;
}

/* Utilities */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: var(--font-body);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--color-rust);
  color: var(--color-cream);
}

.btn-primary:hover {
  background-color: #b0381e;
  transform: scale(1.05);
}

.btn-secondary {
  background-color: rgba(235, 231, 211, 0.2);
  color: var(--color-cream);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background-color: rgba(235, 231, 211, 0.3);
  transform: scale(1.05);
}

/* SPA Logic */
.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.padded-view {
  padding: calc(var(--nav-height) + 40px) var(--padding-horizontal) 60px;
  min-height: 80vh;
}

.page-title {
  font-size: 2.5rem;
  color: var(--color-cream);
  margin-bottom: 0.5rem;
}

.page-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 1.2em;
  background-color: var(--color-teal);
  margin-right: 15px;
  vertical-align: text-bottom;
}

.page-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  max-width: 800px;
}

/* Grids */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Tags */
.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  background-color: var(--bg-dark-tertiary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  color: var(--color-mustard);
}

/* Card Image Overlays (shared) */
.card-image-wrap {
  position: relative;
  overflow: hidden;
}

.card-featured-label {
  position: absolute;
  top: 10px;
  left: 0;
  padding: 3px 10px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fff;
  border-radius: 0 3px 3px 0;
  z-index: 2;
}

.lang-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0,0,0,0.7);
  color: var(--color-cream);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 2;
}

.card-image-wrap img {
  width: 100%;
  display: block;
}

/* ==========================================
   THEME OVERRIDES
   ========================================== */
body.theme-midnight {
  --bg-dark: #0a0a1a;
  --bg-dark-secondary: #12122a;
  --bg-dark-tertiary: #1e1e3a;
  --color-teal: #6C63FF;
  --color-cream: #E0E0F0;
  --color-rust: #FF6B8A;
  --color-mustard: #FFD93D;
  --text-muted: #9090b0;
}

body.theme-sunset {
  --bg-dark: #1a0f0a;
  --bg-dark-secondary: #2a1a10;
  --bg-dark-tertiary: #3a2818;
  --color-teal: #FF8C42;
  --color-cream: #FFF0E0;
  --color-rust: #E74C3C;
  --color-mustard: #F1C40F;
  --text-muted: #b08a70;
}

body.theme-forest {
  --bg-dark: #0a130a;
  --bg-dark-secondary: #111f11;
  --bg-dark-tertiary: #1a2f1a;
  --color-teal: #2ECC71;
  --color-cream: #E0F0E0;
  --color-rust: #E67E22;
  --color-mustard: #F1C40F;
  --text-muted: #7a9a7a;
}

body.theme-ocean {
  --bg-dark: #0a1520;
  --bg-dark-secondary: #0f1f30;
  --bg-dark-tertiary: #162a40;
  --color-teal: #00BCD4;
  --color-cream: #E0F0FF;
  --color-rust: #FF5252;
  --color-mustard: #FFE082;
  --text-muted: #7090b0;
}

body.theme-sakura {
  --bg-dark: #1a0f18;
  --bg-dark-secondary: #251525;
  --bg-dark-tertiary: #352035;
  --color-teal: #FF69B4;
  --color-cream: #FFE8F0;
  --color-rust: #FF1493;
  --color-mustard: #FFB6C1;
  --text-muted: #a080a0;
}

body.theme-crimson {
  --bg-dark: #150808;
  --bg-dark-secondary: #200e0e;
  --bg-dark-tertiary: #301515;
  --color-teal: #FF3B3B;
  --color-cream: #FFE0E0;
  --color-rust: #FF1744;
  --color-mustard: #FF8A80;
  --text-muted: #a07070;
}

body.theme-arctic {
  --bg-dark: #0f1518;
  --bg-dark-secondary: #161e22;
  --bg-dark-tertiary: #1e2a30;
  --color-teal: #80DEEA;
  --color-cream: #E8F5F8;
  --color-rust: #4FC3F7;
  --color-mustard: #B2EBF2;
  --text-muted: #80a0a8;
}
