/* ============================================================
   HYRINX EXPLORE — MAIN CSS
   Design Tokens, Typography, Layout, Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES — LIGHT THEME (DEFAULT)
   ============================================================ */
:root {
  /* Brand Colors */
  --ocean-blue: #0077B6;
  --deep-navy: #03045E;
  --sunset-orange: #F77F00;
  --golden-sand: #F4C542;
  --teal: #00B4D8;
  --rich-black: #0A0A0F;

  /* Theme Tokens — Light */
  --color-primary: #0077B6;
  --color-primary-dark: #005A8E;
  --color-primary-light: #00B4D8;
  --color-secondary: #F77F00;
  --color-accent: #00B4D8;
  --color-gold: #F4C542;

  --bg-base: #F8F9FA;
  --bg-surface: #FFFFFF;
  --bg-surface-2: #F0F4F8;
  --bg-glass: rgba(255, 255, 255, 0.75);
  --bg-glass-dark: rgba(255, 255, 255, 0.12);
  --bg-overlay: rgba(3, 4, 94, 0.55);

  --text-primary: #0A0A0F;
  --text-secondary: #4A5568;
  --text-muted: #718096;
  --text-inverse: #FFFFFF;
  --text-accent: #0077B6;

  --border-light: rgba(0, 119, 182, 0.12);
  --border-medium: rgba(0, 119, 182, 0.25);
  --border-glass: rgba(255, 255, 255, 0.3);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.08);
  --shadow-xl: 0 25px 60px rgba(0,0,0,0.15), 0 8px 24px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 30px rgba(0, 180, 216, 0.3);
  --shadow-glow-orange: 0 0 30px rgba(247, 127, 0, 0.3);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --navbar-height: 72px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --blur-glass: blur(20px);
  --blur-heavy: blur(40px);

  color-scheme: light;
}

/* ============================================================
   DARK THEME
   ============================================================ */
[data-theme="dark"] {
  --color-primary: #00B4D8;
  --color-primary-dark: #0077B6;
  --color-primary-light: #48CAE4;
  --color-secondary: #F4A261;
  --color-accent: #48CAE4;
  --color-gold: #F4C542;

  --bg-base: #0A0A0F;
  --bg-surface: #12121A;
  --bg-surface-2: #1A1A2E;
  --bg-glass: rgba(18, 18, 26, 0.8);
  --bg-glass-dark: rgba(0, 0, 0, 0.4);
  --bg-overlay: rgba(0, 0, 0, 0.65);

  --text-primary: #F0F4F8;
  --text-secondary: #A0AEC0;
  --text-muted: #718096;
  --text-inverse: #0A0A0F;
  --text-accent: #00B4D8;

  --border-light: rgba(0, 180, 216, 0.12);
  --border-medium: rgba(0, 180, 216, 0.25);
  --border-glass: rgba(255, 255, 255, 0.08);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-xl: 0 25px 60px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px rgba(0, 180, 216, 0.4);

  color-scheme: dark;
}

/* ============================================================
   MONSOON THEME
   ============================================================ */
[data-theme="monsoon"] {
  --color-primary: #006D77;
  --color-primary-dark: #004D57;
  --color-primary-light: #83C5BE;
  --color-secondary: #83C5BE;
  --color-accent: #EDF6F9;
  --color-gold: #FFDDD2;

  --bg-base: #0D1B2A;
  --bg-surface: #1B2A3B;
  --bg-surface-2: #243447;
  --bg-glass: rgba(13, 27, 42, 0.85);
  --bg-glass-dark: rgba(0, 0, 0, 0.5);
  --bg-overlay: rgba(0, 30, 45, 0.7);

  --text-primary: #EDF6F9;
  --text-secondary: #83C5BE;
  --text-muted: #52796F;
  --text-inverse: #0D1B2A;
  --text-accent: #83C5BE;

  --border-light: rgba(131, 197, 190, 0.15);
  --border-medium: rgba(131, 197, 190, 0.3);
  --border-glass: rgba(237, 246, 249, 0.1);

  --shadow-glow: 0 0 40px rgba(131, 197, 190, 0.3);

  color-scheme: dark;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::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: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.font-display { font-family: 'Playfair Display', Georgia, serif; }
.font-body    { font-family: 'Inter', sans-serif; }
.font-accent  { font-family: 'Outfit', sans-serif; }

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; }
h4, h5, h6 { font-family: 'Outfit', sans-serif; line-height: 1.3; }

.text-hero    { font-size: clamp(2.8rem, 6vw, 5.5rem); font-weight: 700; line-height: 1.1; }
.text-display { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 700; }
.text-headline{ font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 600; }
.text-title   { font-size: clamp(1.2rem, 2vw, 1.75rem); font-weight: 600; }
.text-large   { font-size: 1.125rem; }
.text-base    { font-size: 1rem; }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.75rem; }
.text-label   { font-family: 'Outfit', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

.section-lg {
  padding: 120px 0;
}

/* Grid */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.grid-auto-sm { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

/* Flex */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 12px;
}

.section-label::before,
.section-label::after {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--color-secondary);
  border-radius: 2px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-title span {
  color: var(--color-primary);
  font-style: italic;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   GLASS EFFECTS
   ============================================================ */
.glass {
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
}

.glass-dark {
  background: var(--bg-glass-dark);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-primary-color { color: var(--color-primary); }
.text-secondary-color { color: var(--color-secondary); }
.text-muted { color: var(--text-muted); }
.text-white { color: #ffffff; }
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-primary { background-color: var(--color-primary); }
.bg-surface { background-color: var(--bg-surface); }
.bg-base { background-color: var(--bg-base); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-glow { box-shadow: var(--shadow-glow); }

.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }

/* Spacing utilities */
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mb-8  { margin-bottom: 2rem; }
.mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }
.pt-20 { padding-top: 5rem; }

/* ============================================================
   HORIZONTAL SCROLL CONTAINER
   ============================================================ */
.scroll-x {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 8px 0 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { scroll-snap-align: start; flex-shrink: 0; }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-full);
  padding: 4px;
  width: fit-content;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(0,119,182,0.35);
}

/* ============================================================
   STAR RATING
   ============================================================ */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--golden-sand);
  font-size: 0.9rem;
}

/* ============================================================
   BADGE / CHIP
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge-primary   { background: rgba(0,119,182,0.12); color: var(--color-primary); }
.badge-secondary { background: rgba(247,127,0,0.12); color: var(--color-secondary); }
.badge-success   { background: rgba(56,161,105,0.12); color: #38A169; }
.badge-gold      { background: rgba(244,197,66,0.15); color: #C9A227; }
.badge-verified  { background: linear-gradient(135deg, rgba(0,119,182,0.15), rgba(0,180,216,0.15)); color: var(--color-primary); border: 1px solid var(--border-light); }

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
#scroll-top-btn {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 900;
  cursor: pointer;
}

#scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   LOADING SHIMMER
   ============================================================ */
.shimmer {
  background: linear-gradient(90deg, var(--bg-surface-2) 25%, var(--bg-glass) 50%, var(--bg-surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   MONSOON RAIN CANVAS
   ============================================================ */
#rain-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 1s ease;
}

[data-theme="monsoon"] #rain-canvas {
  opacity: 0.6;
}

/* ============================================================
   MODAL OVERLAY
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.92) translateY(20px);
  transition: all var(--transition-base);
  border: 1px solid var(--border-light);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 28px 32px;
}

.modal-footer {
  padding: 20px 32px 28px;
  border-top: 1px solid var(--border-light);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--color-primary);
  color: white;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .container-wide { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .section-header { margin-bottom: 36px; }
  .modal { border-radius: var(--radius-lg); }
  .modal-header { padding: 20px 20px 16px; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 16px 20px 20px; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .grid-auto { grid-template-columns: 1fr; }
}

/* Accessibility & Focus Outlines */
:focus-visible {
  outline: 3px solid var(--color-secondary) !important;
  outline-offset: 2px !important;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Interactive Review Stars Hover Styling */
.star-rating-select {
  transition: transform 0.2s ease, color 0.2s ease;
}
.star-rating-select:hover {
  transform: scale(1.25);
  color: var(--color-secondary) !important;
}
