/* ==========================================================================
   CARGO CARRY — OFFICIAL GAME WEBSITE STYLESHEET
   Lightweight, framework-free, countryside-inspired arcade aesthetic.
   Supports Light & Dark themes with seamless toggle & system preference.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Theme Variables (Light / Default)
   -------------------------------------------------------------------------- */
:root,
[data-theme="light"] {
  /* Brand Palette */
  --color-forest: #103424;
  --color-forest-dark: #091F15;
  --color-forest-surface: #184430;
  --color-grass: #2ECC71;
  --color-grass-dark: #27AE60;
  --color-grass-soft: #E8F7EE;
  --color-coral: #FF5A36;
  --color-coral-dark: #E64724;
  --color-coral-soft: #FFF0EB;
  --color-yellow: #FFC425;
  --color-yellow-soft: #FFF8E1;

  /* Surfaces & Backgrounds */
  --bg-page: #FAF8F2;
  --bg-card: #FFFFFF;
  --bg-card-muted: #F2EFE6;
  --bg-card-hover: #FFFFFF;
  --bg-header: rgba(250, 248, 242, 0.94);
  --hero-bg-gradient: radial-gradient(circle at 50% 0%, #FFFFFF 0%, var(--bg-page) 75%);

  /* Typography Colors */
  --text-primary: #182C22;
  --text-secondary: #4A6355;
  --text-muted: #6E887A;
  --text-inverse: #FFFFFF;

  /* Borders & Component Surfaces */
  --border-subtle: rgba(16, 52, 36, 0.12);
  --border-strong: rgba(16, 52, 36, 0.22);
  --shadow-sm: 0 4px 12px rgba(16, 52, 36, 0.05);
  --shadow-md: 0 10px 28px rgba(16, 52, 36, 0.08);
  --shadow-lg: 0 20px 48px rgba(16, 52, 36, 0.14);
  --shadow-hero: 0 24px 60px rgba(16, 52, 36, 0.18);

  --brand-icon-border: rgba(16, 52, 36, 0.16);
  --banner-border: #FFFFFF;
  --gallery-caption-bg: #FFFFFF;
  --gallery-item-bg: #E2DFD6;
  --legal-header-bg: #FFFFFF;
  --copy-bar-bg: #F2EFE6;
  --pre-bg: #F2EFE6;
  --box-warn-bg: #FFF0EB;
  --box-warn-text: #631705;
  --box-highlight-bg: #E8F7EE;
  --box-highlight-text: #091F15;
  --badge-coming-color: #8C6200;
  --theme-toggle-bg: #FFFFFF;
  --theme-toggle-color: #103424;

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   Theme Variables (Dark Mode / High Contrast Obsidian)
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  /* Brand Palette calibrated for dark environments */
  --color-forest: #E5F3EC;            /* Mint white for strong readable headings */
  --color-forest-dark: #070D0A;       /* Deepest obsidian black */
  --color-forest-surface: #121F18;    /* Dark forest card background */
  --color-grass: #39D97E;             /* Vibrant arcade green */
  --color-grass-dark: #2ECC71;
  --color-grass-soft: rgba(57, 217, 126, 0.15);
  --color-coral: #FF6947;             /* High visibility coral */
  --color-coral-dark: #FA5430;
  --color-coral-soft: rgba(255, 105, 71, 0.16);
  --color-yellow: #FFD043;            /* Golden arcade highlight */
  --color-yellow-soft: rgba(255, 208, 67, 0.16);

  /* Surfaces & Backgrounds */
  --bg-page: #0C120F;                 /* True deep dark background */
  --bg-card: #141F1A;                 /* Slate forest dark card */
  --bg-card-muted: #1B2923;          /* Lifted card background */
  --bg-card-hover: #20312A;
  --bg-header: rgba(12, 18, 15, 0.94);
  --hero-bg-gradient: radial-gradient(circle at 50% 0%, #17271F 0%, #0C120F 75%);

  /* Typography Colors */
  --text-primary: #F0F6F2;           /* Bright high-contrast text */
  --text-secondary: #AFC4B7;         /* Soft readable body text */
  --text-muted: #7A9385;             /* Subtle tertiary labels */
  --text-inverse: #0C120F;

  /* Borders & Component Surfaces */
  --border-subtle: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.22);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.60);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.75);
  --shadow-hero: 0 24px 60px rgba(0, 0, 0, 0.85);

  --brand-icon-border: rgba(255, 255, 255, 0.22);
  --banner-border: #22352B;
  --gallery-caption-bg: #141F1A;
  --gallery-item-bg: #070D0A;
  --legal-header-bg: #101914;
  --copy-bar-bg: #1B2923;
  --pre-bg: #17231E;
  --box-warn-bg: rgba(255, 105, 71, 0.14);
  --box-warn-text: #FFBAAA;
  --box-highlight-bg: rgba(57, 217, 126, 0.14);
  --box-highlight-text: #C3EED5;
  --badge-coming-color: #FFD043;
  --theme-toggle-bg: #1B2923;
  --theme-toggle-color: #FFD043;

  color-scheme: dark;
}

/* Base Dimensions */
:root {
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 9999px;
  --max-width: 1180px;
  --header-height: 74px;
}

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

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Nunito", "Fredoka", "Arial Rounded MT Bold", sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-page);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Screen reader only utility */
.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;
}

/* Accessible Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-forest);
  color: var(--text-inverse);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--color-yellow);
}

/* Focus Visibility */
:focus-visible {
  outline: 3px solid var(--color-coral);
  outline-offset: 3px;
}

/* Containers & Layout */
.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1.5rem, var(--max-width));
  }
}

.section {
  padding-block: 5rem;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding-block: 3.5rem;
  }
}

/* --------------------------------------------------------------------------
   Header & Navigation (Fully Responsive)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  min-height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  align-items: center;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: clamp(0.5rem, 1.5vw, 1.25rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 1.2vw, 0.75rem);
  font-size: clamp(1.08rem, 2.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-forest);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-icon {
  width: clamp(34px, 3.8vw, 44px);
  height: clamp(34px, 3.8vw, 44px);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(16, 52, 36, 0.15);
  border: 2px solid var(--brand-icon-border);
  flex-shrink: 0;
}

.brand-text {
  font-family: inherit;
  font-weight: 800;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: clamp(0.4rem, 1.1vw, 1.25rem);
  flex-shrink: 1;
}

.nav-link {
  font-size: clamp(0.85rem, 0.92vw, 0.95rem);
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.45rem clamp(0.4rem, 0.75vw, 0.75rem);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-forest);
  background-color: var(--color-grass-soft);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 1vw, 0.75rem);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Theme Toggle Button (Top Right)
   -------------------------------------------------------------------------- */
.theme-toggle {
  width: clamp(38px, 4vw, 44px);
  height: clamp(38px, 4vw, 44px);
  border-radius: var(--radius-sm);
  background-color: var(--theme-toggle-bg);
  border: 1.5px solid var(--border-strong);
  color: var(--theme-toggle-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  position: relative;
  flex-shrink: 0;
}

.theme-toggle:hover {
  transform: scale(1.05);
  border-color: var(--color-coral);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon-sun,
.theme-icon-moon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

/* In light mode: show moon icon (to switch to dark) */
:root .theme-icon-sun,
[data-theme="light"] .theme-icon-sun {
  display: none;
}
:root .theme-icon-moon,
[data-theme="light"] .theme-icon-moon {
  display: block;
}

/* In dark mode: show sun icon (to switch to light) */
[data-theme="dark"] .theme-icon-sun {
  display: block;
}
[data-theme="dark"] .theme-icon-moon {
  display: none;
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
  display: none;
  width: clamp(38px, 4vw, 44px);
  height: clamp(38px, 4vw, 44px);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  color: var(--color-forest);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  flex-shrink: 0;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.mobile-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

@media (max-width: 1080px) {
  .mobile-toggle {
    display: flex;
  }

  .nav-wrapper {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem 1.5rem 1.75rem;
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.3s ease;
    z-index: 89;
  }

  .nav-wrapper.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .nav-link {
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
    white-space: nowrap;
  }

  .header-cta-mobile {
    margin-top: 1.25rem;
    display: block;
  }

  .header-cta .btn {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 66px;
  }
  .brand {
    font-size: 1.15rem;
  }
}

@media (max-width: 360px) {
  .brand-text {
    font-size: 1.02rem;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
  }
  .theme-toggle,
  .mobile-toggle {
    width: 36px;
    height: 36px;
  }
}

/* --------------------------------------------------------------------------
   Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-coral);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(255, 90, 54, 0.28);
}
.btn-primary:hover {
  background: var(--color-coral-dark);
  box-shadow: 0 10px 24px rgba(255, 90, 54, 0.36);
  transform: translateY(-2px);
  color: #FFFFFF;
}

.btn-secondary {
  background: var(--color-grass-soft);
  color: var(--color-forest);
  border: 1.5px solid var(--border-strong);
}
.btn-secondary:hover {
  background: rgba(46, 204, 113, 0.25);
  color: var(--color-forest);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-forest);
  border: 2px solid var(--border-strong);
}
.btn-outline:hover {
  background: var(--bg-card);
  color: var(--color-coral);
  border-color: var(--color-coral);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--color-grass-soft);
  color: var(--color-forest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-coming-soon {
  background-color: var(--color-yellow-soft);
  color: var(--badge-coming-color);
  border-color: var(--border-subtle);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding-top: 3.5rem;
  padding-bottom: 5.5rem;
  background: var(--hero-bg-gradient);
  transition: background 0.3s ease;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 3.5rem;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.hero-title {
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--color-forest);
}

.hero-title .highlight {
  color: var(--color-coral);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 540px;
}

@media (max-width: 992px) {
  .hero-subtitle {
    margin-inline: auto;
  }
  .hero-content .hero-badge-row {
    justify-content: center;
  }
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

@media (max-width: 992px) {
  .hero-actions {
    justify-content: center;
  }
}

.hero-visual {
  position: relative;
}

.hero-banner-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hero);
  border: 4px solid var(--banner-border);
  background: var(--bg-card-muted);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.25s ease;
}

.hero-banner-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.hero-banner-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   Introduction Section ("More Than Just a Drive")
   -------------------------------------------------------------------------- */
.intro-section {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.section-tag {
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-forest);
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 860px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }
}

.intro-card {
  background: var(--bg-card-muted);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  position: relative;
}

.intro-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-grass);
}

.intro-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  background-color: var(--color-grass-soft);
  color: var(--color-grass);
  border: 1px solid var(--border-subtle);
}

.intro-card:nth-child(2) .intro-card-icon {
  background-color: var(--color-coral-soft);
  color: var(--color-coral);
}

.intro-card:nth-child(3) .intro-card-icon {
  background-color: var(--color-yellow-soft);
  color: var(--color-yellow);
}

.intro-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-forest);
  margin-bottom: 0.6rem;
}

.intro-card-text {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Features Grid
   -------------------------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

@media (max-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.85rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.feature-pill {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-grass-soft);
  color: var(--color-grass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.feature-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-forest);
}

.feature-card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Screenshots Gallery
   -------------------------------------------------------------------------- */
.gallery-section {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}

/* Layout for 5 screenshots: 1st row has 3 (2 cols each), 2nd row has 2 (3 cols each) */
.gallery-item:nth-child(1),
.gallery-item:nth-child(2),
.gallery-item:nth-child(3) {
  grid-column: span 2;
}

.gallery-item:nth-child(4),
.gallery-item:nth-child(5) {
  grid-column: span 3;
}

@media (max-width: 860px) {
  .gallery-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
  }
  .gallery-item {
    flex: 0 0 85%;
    scroll-snap-align: start;
    min-width: 280px;
  }
}

.gallery-item {
  position: relative;
  background: var(--gallery-item-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-grass);
}

.gallery-item-image {
  width: 100%;
  aspect-ratio: 2400 / 1080;
  object-fit: cover;
  display: block;
  background-color: var(--gallery-item-bg);
}

.gallery-item-caption {
  padding: 0.85rem 1.1rem;
  background: var(--gallery-caption-bg);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.gallery-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-forest);
}

.gallery-badge {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--color-grass-soft);
  color: var(--color-forest);
}

.gallery-item:last-child .gallery-badge {
  background: var(--color-yellow-soft);
  color: var(--color-yellow);
}

/* --------------------------------------------------------------------------
   Accessible Lightbox Modal
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(7, 13, 10, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox-img-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  border: 3px solid rgba(255, 255, 255, 0.2);
  background: #000000;
}

.lightbox-img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-full);
}

.lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: #FFFFFF;
  color: #070D0A;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.lightbox-close:hover {
  transform: scale(1.1);
  background-color: var(--color-coral);
  color: #FFFFFF;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #070D0A;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox-nav:hover {
  background: #FFFFFF;
  transform: translateY(-50%) scale(1.08);
}
.lightbox-prev { left: -54px; }
.lightbox-next { right: -54px; }

@media (max-width: 900px) {
  .lightbox-nav {
    top: auto;
    bottom: -54px;
    transform: none;
  }
  .lightbox-prev { left: calc(50% - 54px); }
  .lightbox-next { right: calc(50% - 54px); }
}

/* --------------------------------------------------------------------------
   CTA Section (Pre-Footer)
   -------------------------------------------------------------------------- */
.cta-section {
  background: linear-gradient(135deg, var(--color-forest-surface) 0%, var(--color-forest-dark) 100%);
  color: #FFFFFF;
  text-align: center;
  overflow: hidden;
  position: relative;
  border-top: 1px solid var(--border-subtle);
}

.cta-box {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.cta-title {
  font-size: clamp(2.1rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: #FFFFFF;
}

.cta-text {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-forest-dark);
  color: rgba(255, 255, 255, 0.8);
  padding-block: 3.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 800px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-brand .brand {
  color: #FFFFFF;
}

.footer-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 340px;
  line-height: 1.55;
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-link:hover {
  color: var(--color-yellow);
  transform: translateX(3px);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}

/* --------------------------------------------------------------------------
   Legal & Data Policy Pages Layout (privacy-policy.html, delete-account.html)
   -------------------------------------------------------------------------- */
.legal-header {
  background: var(--legal-header-bg);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: 3rem 2.5rem;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.legal-header-inner {
  max-width: 820px;
  margin-inline: auto;
}

.legal-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: var(--color-forest);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.legal-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legal-content {
  max-width: 820px;
  margin-inline: auto;
  padding-block: 3rem 5rem;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.legal-card h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-forest);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.legal-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-forest);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.legal-card p {
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-card ul, .legal-card ol {
  color: var(--text-secondary);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.65;
}

.legal-card li {
  margin-bottom: 0.4rem;
}

.legal-card code {
  background: var(--bg-card-muted);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--color-forest);
  border: 1px solid var(--border-subtle);
}

.highlight-box {
  background-color: var(--box-highlight-bg);
  border-left: 4px solid var(--color-grass);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-block: 1.25rem;
  transition: background-color 0.25s ease;
}

.highlight-box p {
  color: var(--box-highlight-text);
  font-weight: 500;
}

.warning-box {
  background-color: var(--box-warn-bg);
  border-left: 4px solid var(--color-coral);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-block: 1.25rem;
  transition: background-color 0.25s ease;
}

.warning-box p {
  color: var(--box-warn-text);
}

/* Deletion Action Box */
.deletion-action-box {
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-block: 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.email-copy-bar {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--copy-bar-bg);
  border: 1px solid var(--border-strong);
  padding: 0.6rem 1rem 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 100%;
  margin-block: 1rem;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.email-template-pre {
  background: var(--pre-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  margin-block: 1rem;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* --------------------------------------------------------------------------
   Accessibility & 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;
  }
}
