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

/* --- CSS Variables & Design System --- */
:root {
  --bg-primary: #1a1e2b; /* darkened, low‑saturation */
  --bg-secondary: #262d3e; /* slightly lighter for contrast */
  --bg-glass: rgba(20, 25, 40, 0.7); /* muted glass effect */
  --border-glass: rgba(255, 255, 255, 0.08);
  
  /* Color Palette */
  --color-korea-red: #ff3e55;
  --color-korea-blue: #0076ff;
  --color-ulsan-green: #00b4d8;
  --color-gold: #ffb703;
  
  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Font Families */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Transition Speeds */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* --- Layout Utilities --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
  position: relative;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-korea {
  background: linear-gradient(135deg, var(--color-korea-red) 30%, var(--color-korea-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-ulsan {
  background: linear-gradient(135deg, #00b4d8 30%, #52b788 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Header / Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(8, 11, 17, 0.4);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  font-weight: 300;
}

.logo::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--color-korea-red), var(--color-korea-blue));
  border-radius: 50%;
}

.nav-menu {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.cta-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.cta-button:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
}

/* --- Hero Section --- */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #151e33 0%, var(--bg-primary) 70%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 70%, var(--bg-primary) 100%);
  z-index: 1;
}

.hero-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
  filter: grayscale(20%) brightness(80%);
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 1.5rem;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--color-korea-red);
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.hero-tagline::before, .hero-tagline::after {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--color-korea-red);
}

.hero-title {
  font-size: 5rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 2rem;
  letter-spacing: -0.04em;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 3rem;
  font-weight: 300;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-indicator-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator-wheel {
  width: 4px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 1.5s infinite;
}

/* --- Features / Grid Section --- */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.05), transparent 40%);
  z-index: 1;
  pointer-events: none;
}

.card-glass:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.card-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.card-description {
  color: var(--text-secondary);
  font-weight: 300;
}

/* --- Ulsan Spotlight Banner --- */
.ulsan-spotlight {
  background: linear-gradient(180deg, var(--bg-primary) 0%, #0d1e2e 50%, var(--bg-primary) 100%);
  position: relative;
}

.pulsing-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.15) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  animation: pulse-glow 6s infinite alternate;
}

.spotlight-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 5rem;
  position: relative;
  z-index: 1;
}

.spotlight-image-wrapper {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  aspect-ratio: 4/3;
}

.spotlight-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.spotlight-image-wrapper:hover .spotlight-img {
  transform: scale(1.05);
}

.section-tag {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-ulsan-green);
  margin-bottom: 1rem;
  display: inline-block;
}

.spotlight-text h2 {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 2rem;
}

.spotlight-text p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  font-weight: 300;
  margin-bottom: 2.5rem;
}

.ulsan-badges {
  display: flex;
  gap: 1.5rem;
}

.badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.badge:hover {
  background: rgba(0, 180, 216, 0.1);
  border-color: rgba(0, 180, 216, 0.3);
  transform: translateY(-2px);
}

/* --- Attractions Showcase --- */
.showcase-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 5rem;
}

.showcase-header h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.showcase-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 300;
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.6rem 1.8rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
}

.attraction-card {
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.attraction-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

.card-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.attraction-card:hover .card-img {
  transform: scale(1.05);
}

.card-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(8, 11, 17, 0.75);
  backdrop-filter: blur(8px);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-ulsan-green);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-body h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.card-body p {
  color: var(--text-secondary);
  font-weight: 300;
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.card-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-ulsan-green);
  font-size: 0.9rem;
}

.card-link:hover {
  text-shadow: 0 0 10px rgba(0, 180, 216, 0.4);
}

/* --- Interactive Trip Planner Widget --- */
.planner-widget {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 32px;
  padding: 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.planner-widget h3 {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 1rem;
}

.planner-widget p {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-weight: 300;
}

.options-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.option-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 1.5rem 2.5rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  text-align: center;
  transition: var(--transition-smooth);
  flex-grow: 1;
  max-width: 200px;
}

.option-box:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.option-box.selected {
  background: linear-gradient(135deg, var(--color-ulsan-green), #0077b6);
  border-color: transparent;
  color: var(--bg-primary);
  box-shadow: 0 10px 25px rgba(0, 180, 216, 0.3);
}

.planner-results {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: none;
  animation: fade-in 0.5s ease forwards;
}

.results-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-ulsan-green);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.route-timeline {
  position: relative;
  padding-left: 2rem;
}

.route-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6px;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 6px;
  left: -28px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-ulsan-green);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
}

.timeline-item h4 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.timeline-item p {
  text-align: left;
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* --- Call To Action / Footer --- */
footer {
  background: #04060b;
  border-top: 1px solid var(--border-glass);
  padding: 5rem 0 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 4rem;
}

.footer-text {
  max-width: 400px;
}

.footer-text p {
  color: var(--text-secondary);
  font-weight: 300;
  margin-top: 1rem;
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.social-icon:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 3rem;
}

/* --- Animations --- */
@keyframes scroll-wheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  50% { opacity: 0.3; transform: translate(-50%, 15px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes pulse-glow {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.1; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.2; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- Dark Mode Overrides ------------------------------------------------ */
[data-theme="dark"] {
  --bg-primary: #0a0c12;
  --bg-secondary: #11131a;
  --bg-glass: rgba(15,21,36,0.85);
  --border-glass: rgba(255,255,255,0.12);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

/* --- Glassmorphism for Food Cards --------------------------------------- */
.attraction-card.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  transition: var(--transition-smooth);
}
.attraction-card.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* --- Food Carousel ------------------------------------------------------ */
.food-carousel {
  position: relative;
  overflow: hidden;
}
.food-carousel .card-img-wrapper {
  width: 100%;
  height: auto;
  transition: opacity 0.6s ease;
}
.food-carousel .card-img-wrapper.hide { opacity: 0; }

/* --- Market Gallery Image --- */
.gallery-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  transition: var(--transition-fast);
}
.gallery-img:hover {
  transform: scale(1.03);
}

/* --- Carousel Styles for Market Gallery --- */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin: 1rem 0;
}
.carousel-track {
  display: flex;
  transition: transform var(--transition-smooth);
}
.carousel img {
  flex: 0 0 100%;
  max-height: 400px;
  object-fit: cover;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.3);
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 2;
}
.carousel-btn:hover {
  background: rgba(0,0,0,0.5);
}
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

@media (max-width: 992px) {
  .hero-title {
    font-size: 3.5rem;
  }
  .spotlight-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .spotlight-image-wrapper {
    order: -1;
  }
  .spotlight-text h2 {
    font-size: 2.75rem;
  }
  .section {
    padding: 6rem 0;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none; /* simple mobile hide for MVP */
  }
  .hero-title {
    font-size: 2.75rem;
  }
  .hero-description {
    font-size: 1.1rem;
  }
  .planner-widget {
    padding: 2.5rem 1.5rem;
  }
  .showcase-header h2 {
    font-size: 2.75rem;
  }
}
