/**
 * GoFind.Help - Main Styles
 *
 * Base styles, CSS reset, typography, and layout.
 * Mobile-first responsive design with Spaceship-inspired hero.
 */

/* ============================================
   CSS Custom Properties (Variables)
   ============================================ */
:root {
  /* Colors */
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-primary-light: #818cf8;
  --color-secondary: #10b981;
  --color-secondary-dark: #059669;

  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-text-muted: #9ca3af;
  --color-text-white: #ffffff;

  --color-background: #ffffff;
  --color-background-alt: #f9fafb;
  --color-background-hover: #f3f4f6;
  --color-background-dark: #0f172a;

  --color-border: #e5e7eb;
  --color-border-dark: #d1d5db;

  --color-error: #dc2626;
  --color-error-bg: #fef2f2;
  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;
  --color-warning: #d97706;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #f59e0b;
  --color-warning-text: #92400e;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

  /* Transitions — kept short for snappy, instant-feeling interactions */
  --transition-fast: 100ms ease;
  --transition-normal: 100ms ease;
  --transition-slow: 100ms ease;
  --transition-slower: 100ms ease;

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

  /* Layout */
  --max-width: 48rem;
  --max-width-lg: 64rem;
  --header-height: 4rem;
}

/* ============================================
   CSS Reset
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background-dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root[data-theme="light"] body {
  background-color: #e2e8f0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul,
ol {
  list-style: none;
}

/* ============================================
   Accessibility
   ============================================ */

/* Focus styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

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

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--spacing-sm) var(--spacing-md);
  z-index: var(--z-toast);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   Enhanced Focus Indicators
   ============================================ */

/* High-visibility focus ring for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Layout
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-wrapper.search-focused .hero-overlay {
  background: rgba(15, 23, 42, 0.7);
}

.hero-wrapper.search-focused .hero-cityscape {
  opacity: 0.6;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(16, 185, 129, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.2) 0%, transparent 70%),
    linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  background-size: cover;
  z-index: 0;
}

/* Static gradient orbs — no animation for performance on older devices */
.hero-background::before,
.hero-background::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
}

.hero-background::before {
  width: 400px;
  height: 400px;
  background: var(--color-primary);
  top: 10%;
  left: 10%;
}

.hero-background::after {
  width: 300px;
  height: 300px;
  background: var(--color-secondary);
  top: 30%;
  right: 15%;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.3);
  z-index: 1;
}

/* Cityscape silhouette */
.hero-cityscape {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30vh;
  min-height: 180px;
  max-height: 300px;
  /* Show only the top portion of the SVG (the actual skyline, not the reflection) */
  background: url('/assets/cityscape.svg') top center no-repeat;
  background-size: 100% 200%; /* Double height to hide the reflection */
  z-index: 2;
  opacity: 0.85;
  pointer-events: none;
}

/* City Welcome Message */
.city-welcome {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: var(--spacing-sm) var(--spacing-md);
  color: #e2e8f0; /* Bright slate for strong contrast against dark skyline */
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7), 0 0 12px rgba(99, 102, 241, 0.4);
  z-index: 3;
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.city-welcome.visible {
  opacity: 1;
}

.hero-wrapper.search-focused .city-welcome {
  opacity: 0.5;
}

/* ============================================
   Header
   ============================================ */
.header {
  position: relative;
  z-index: 2;
  color: white;
  padding: var(--spacing-3xl) var(--spacing-md) var(--spacing-xl);
  text-align: center;
  width: 100%;
}

.header .container {
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: var(--spacing-sm);
  /* Safari <14.1 fallback for flex gap */
}

/* Fallback spacing when gap is not supported */
@supports not (gap: 1rem) {
  .header__top > * + * {
    margin-top: var(--spacing-sm);
  }
  .header__actions > * + * {
    margin-left: var(--spacing-sm);
  }
}

.header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  position: relative;
}

.header__beta-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.5px;
  color: var(--color-primary);
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  top: -2px;
}

html[data-theme="dark"] .header__beta-badge {
  color: var(--color-primary);
  background-color: rgba(255, 255, 255, 0.95);
}

/* ============================================
   Header Actions (theme toggle + location btn)
   ============================================ */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.header__actions .location-btn,
.header__actions .theme-toggle {
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
}

/* ============================================
   Theme Toggle Button
   ============================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  font-size: 1.25rem;
}

.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.theme-toggle:active {
  background-color: rgba(255, 255, 255, 0.35);
}

.theme-toggle__icon {
  position: absolute;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

/* Default/Light mode: show moon (click to go dark), hide sun */
.theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.theme-toggle__icon--moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Dark mode: show sun (click to go light), hide moon */
html[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

html[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* Explicit light mode: show moon, hide sun */
html[data-theme="light"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

html[data-theme="light"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.header__logo-img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

.header__title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-sm);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

.header__subtitle {
  font-size: var(--font-size-lg);
  opacity: 0.9;
  font-weight: var(--font-weight-normal);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Main Content
   ============================================ */
.main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--spacing-lg) var(--spacing-md);
  /* Offset for header to truly center the search bar */
  margin-top: -4rem;
}

/* ============================================
   Results Section
   ============================================ */
.results-section {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  padding: var(--spacing-2xl) 0;
  min-height: 100vh;
  position: relative;
}

/* Static top border accent */
.results-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-primary));
}

.results-section .container {
  max-width: var(--max-width-lg);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  position: relative;
  z-index: 2;
  background-color: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-lg) var(--spacing-md);
  text-align: center;
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
}

.footer__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.footer__logo-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.footer__logo-link:hover {
  opacity: 0.75;
  text-decoration: none;
}

.footer__logo-icon {
  height: 24px;
  width: 24px;
}

.footer__logo-text {
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.7);
}

.footer__logo-text--go {
  color: #818cf8;
}

.footer__logo-text--dot {
  color: #818cf8;
}

.footer__logo-text--help {
  color: #10b981;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.footer__link {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: white;
  text-decoration: none;
}

.footer__cfhpe {
  margin-top: var(--spacing-md);
}

.footer__cfhpe-text {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.5);
}

.footer__cfhpe-text strong {
  color: rgba(255, 255, 255, 0.7);
}

.footer__cfhpe-sites {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-xs);
}

.footer__cfhpe-link {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-fast);
}

.footer__cfhpe-link:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

.footer__attribution {
  margin-top: var(--spacing-md);
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.4);
}

.footer__attribution a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.footer__attribution a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

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

/* ============================================
   Responsive Breakpoints
   ============================================ */

/* Tablet and up */
@media (min-width: 640px) {
  :root {
    --spacing-md: 1.25rem;
    --spacing-lg: 2rem;
  }

  .header {
    padding: var(--spacing-3xl) var(--spacing-md) var(--spacing-2xl);
  }

  .header__logo-img {
    height: 60px;
  }

  .header__title {
    font-size: var(--font-size-5xl);
  }

  .header__subtitle {
    font-size: var(--font-size-xl);
  }

  /* Switch to horizontal layout on tablet+ */
  .header__top {
    flex-direction: row;
    justify-content: center;
    position: relative;
    gap: 0;
  }

  .header__actions {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    gap: var(--spacing-sm);
  }

  /* Restore full-size action buttons on tablet+ */
  .header__actions .location-btn,
  .header__actions .theme-toggle {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }
}

/* Desktop and up */
@media (min-width: 1024px) {
  .container {
    padding: 0 var(--spacing-lg);
  }

  .hero-background::before {
    width: 500px;
    height: 500px;
  }

  .hero-background::after {
    width: 400px;
    height: 400px;
  }
}

/* ============================================
   Dark Mode Support
   ============================================ */
@media (prefers-color-scheme: dark) {
  :root {
    /* Dark mode color overrides */
    --color-text: #f1f5f9;
    --color-text-light: #94a3b8;
    --color-text-muted: #64748b;

    --color-background: #1e293b;
    --color-background-alt: #0f172a;
    --color-background-hover: #334155;

    --color-border: #334155;
    --color-border-dark: #475569;

    --color-error-bg: #450a0a;
    --color-success-bg: #052e16;
    --color-warning-bg: #451a03;
    --color-warning-border: #b45309;
    --color-warning-text: #fbbf24;

    /* Adjusted shadows for dark mode */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.4);
  }

  /* Results section dark mode */
  .results-section {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 50%, #020617 100%);
  }

  .results-section::before {
    opacity: 0.8;
  }

  /* Result cards dark mode */
  .result-card {
    background-color: var(--color-background);
    border-color: var(--color-border);
  }

  .result-card:hover {
    border-color: var(--color-border-dark);
  }

  .result-card__header:hover {
    background-color: var(--color-background-hover);
  }

  /* Note: Search bar stays light/white since it's on the dark hero section */
  /* No changes needed for search bar in dark mode */

  /* Map button dark mode */
  .map-btn {
    background-color: var(--color-secondary);
  }

  .map-btn:hover {
    background-color: var(--color-secondary-dark);
  }

  /* Loading states */
  .results-loading__spinner,
  .load-more__spinner {
    border-color: var(--color-border);
    border-top-color: var(--color-primary);
  }

  /* Skeleton loading */
  .skeleton {
    background: linear-gradient(
      90deg,
      var(--color-background-alt) 25%,
      var(--color-background-hover) 50%,
      var(--color-background-alt) 75%
    );
  }

  /* Error state */
  .results-error {
    background-color: var(--color-error-bg);
  }
}

/* ============================================
   Dark Mode - Manual Toggle Override
   ============================================ */
:root[data-theme="dark"] {
  /* Dark mode color overrides */
  --color-text: #f1f5f9;
  --color-text-light: #94a3b8;
  --color-text-muted: #64748b;

  --color-background: #1e293b;
  --color-background-alt: #0f172a;
  --color-background-hover: #334155;

  --color-border: #334155;
  --color-border-dark: #475569;

  --color-error-bg: #450a0a;
  --color-success-bg: #052e16;
  --color-warning-bg: #451a03;
  --color-warning-border: #b45309;
  --color-warning-text: #fbbf24;

  /* Adjusted shadows for dark mode */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.4);
}

:root[data-theme="dark"] .results-section {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 50%, #020617 100%);
}

:root[data-theme="dark"] .results-section::before {
  opacity: 0.8;
}

:root[data-theme="dark"] .result-card {
  background-color: var(--color-background);
  border-color: var(--color-border);
}

:root[data-theme="dark"] .result-card:hover {
  border-color: var(--color-border-dark);
}

:root[data-theme="dark"] .result-card__header:hover {
  background-color: var(--color-background-hover);
}

:root[data-theme="dark"] .results-loading__spinner,
:root[data-theme="dark"] .load-more__spinner {
  border-color: var(--color-border);
  border-top-color: var(--color-primary);
}

:root[data-theme="dark"] .skeleton {
  background: linear-gradient(
    90deg,
    var(--color-background-alt) 25%,
    var(--color-background-hover) 50%,
    var(--color-background-alt) 75%
  );
}

:root[data-theme="dark"] .results-error {
  background-color: var(--color-error-bg);
}

/* Light mode override (when user explicitly chooses light) */
:root[data-theme="light"] {
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-text-muted: #9ca3af;

  --color-background: #ffffff;
  --color-background-alt: #f9fafb;
  --color-background-hover: #f3f4f6;

  --color-border: #e5e7eb;
  --color-border-dark: #d1d5db;

  --color-error-bg: #fef2f2;
  --color-success-bg: #f0fdf4;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #f59e0b;
  --color-warning-text: #92400e;
}

:root[data-theme="light"] .results-section {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
}

/* Light mode hero section */
:root[data-theme="light"] .hero-background {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 70%),
    linear-gradient(180deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
}

:root[data-theme="light"] .hero-background::before {
  opacity: 0.3;
}

:root[data-theme="light"] .hero-background::after {
  opacity: 0.25;
}

:root[data-theme="light"] .hero-overlay {
  background: rgba(248, 250, 252, 0.1);
}

:root[data-theme="light"] .hero-cityscape {
  opacity: 0.4;
  filter: brightness(0.3);
}

:root[data-theme="light"] .header {
  color: var(--color-text);
}

:root[data-theme="light"] .header__subtitle {
  color: var(--color-text-light);
}

:root[data-theme="light"] .hero-heading {
  color: var(--color-text);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .hero-subheading {
  color: var(--color-text-light);
  text-shadow: none;
}

:root[data-theme="light"] .location-status {
  color: var(--color-text-light);
}

:root[data-theme="light"] .location-status--success {
  color: var(--color-secondary-dark);
}

:root[data-theme="light"] .location-status--error {
  color: var(--color-error);
}

:root[data-theme="light"] .theme-toggle,
:root[data-theme="light"] .location-btn {
  background-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .theme-toggle:hover,
:root[data-theme="light"] .location-btn:hover {
  background-color: rgba(0, 0, 0, 0.15);
}

:root[data-theme="light"] .location-btn--active {
  background-color: rgba(16, 185, 129, 0.2);
}

:root[data-theme="light"] .location-btn--active:hover {
  background-color: rgba(16, 185, 129, 0.3);
}

:root[data-theme="light"] .footer {
  background-color: var(--color-background-alt);
  border-top-color: var(--color-border);
  color: var(--color-text-light);
}

/* Light theme: adjust footer logo text color */
:root[data-theme="light"] .footer__logo-text {
  color: var(--color-text-light);
}

:root[data-theme="light"] .footer__link {
  color: var(--color-text-light);
}

:root[data-theme="light"] .footer__link:hover {
  color: var(--color-text);
}

:root[data-theme="light"] .footer__cfhpe-text {
  color: var(--color-text-muted);
}

:root[data-theme="light"] .footer__cfhpe-text strong {
  color: var(--color-text-light);
}

:root[data-theme="light"] .footer__cfhpe-link {
  color: var(--color-text-light);
}

:root[data-theme="light"] .footer__cfhpe-link:hover {
  color: var(--color-text);
}

:root[data-theme="light"] .footer__attribution {
  color: var(--color-text-muted);
}

:root[data-theme="light"] .footer__attribution a {
  color: var(--color-text-light);
}

:root[data-theme="light"] .city-welcome {
  color: var(--color-text);
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.6), 0 0 8px rgba(99, 102, 241, 0.3);
}

/* ============================================
   Noscript Fallback Styles
   ============================================ */
.no-js-fallback {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 9999;
  overflow-y: auto;
  padding: 2rem 1rem;
}

.no-js-fallback__content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.no-js-fallback h1 {
  color: #f59e0b;
  margin-bottom: 1rem;
  font-size: var(--font-size-3xl);
}

.no-js-fallback p {
  color: #374151;
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
}

.no-js-fallback__alternatives {
  margin: 2rem 0;
  text-align: left;
}

.no-js-fallback__alternatives h2 {
  color: #1f2937;
  font-size: var(--font-size-2xl);
  margin-bottom: 1rem;
}

.no-js-fallback__option {
  background: #f3f4f6;
  padding: 1.5rem;
  margin: 1rem 0;
  border-radius: 8px;
  border-left: 4px solid #4f46e5;
}

.no-js-fallback__option h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #1f2937;
  font-size: var(--font-size-xl);
}

.no-js-fallback__option p {
  font-size: var(--font-size-base);
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.no-js-fallback__button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #4f46e5;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  margin-top: 0.5rem;
}

.no-js-fallback__button:hover {
  background: #4338ca;
  text-decoration: none;
  color: white;
}

.no-js-fallback__help {
  margin-top: 2rem;
  padding: 1rem;
  background: #fef3c7;
  border-radius: 6px;
  text-align: left;
}

.no-js-fallback__help summary {
  cursor: pointer;
  font-weight: 600;
  color: #92400e;
}

.no-js-fallback__help p {
  font-size: var(--font-size-base);
  color: #78350f;
}

.no-js-fallback__help ul {
  margin: 0.5rem 0 0 1.5rem;
  list-style: disc;
}

.no-js-fallback__help li {
  color: #78350f;
  margin-bottom: 0.25rem;
}
