/* ABOUTME: Shared structural styles for the ProtoVille site (root Dumo page and Busan page). */
/* ABOUTME: Color tokens here can be overridden per-page (see busan-theme.css). */
/* ==========================================
   ProtoVille - Prototyping Rural Futures
   Organic Editorial Aesthetic
   ========================================== */

/* CSS Variables */
:root {
  /* Colors - Earthy Natural Palette */
  --color-cream: #f7f4ed;
  --color-cream-dark: #ebe6d9;
  --color-forest: #1a2f1a;
  --color-forest-light: #2d4a2d;
  --color-terracotta: #c45d3a;
  --color-terracotta-light: #d97a5a;
  --color-gold: #d4a84b;
  --color-ink: #1a1a18;
  --color-ink-light: #3d3d38;
  --color-stone: #8a8578;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Gowun Batang', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  /* Typography Scale - Base 16px, 1.25 ratio */
  --text-display-xl: clamp(3.5rem, 12vw, 8rem);
  --text-display-lg: clamp(2.5rem, 6vw, 4.5rem);
  --text-display-md: clamp(1.75rem, 4vw, 2.75rem);
  --text-lg: 1.25rem;
  --text-base: 1.0625rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 10rem;

  /* Sizing */
  --max-width: 1200px;
  --header-height: 72px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ==========================================
   Reset & Base
   ========================================== */

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

html {
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-ink);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-forest);
}

h1 {
  font-size: var(--text-display-lg);
}

h2 {
  font-size: var(--text-display-md);
}

h3 {
  font-size: var(--text-lg);
}

h4 {
  font-size: var(--text-base);
}

p {
  max-width: 65ch;
}

a {
  color: var(--color-terracotta);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-terracotta-light);
}

strong {
  font-weight: 600;
  color: var(--color-forest);
}

ul {
  list-style: none;
}

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

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

/* ==========================================
   Sticky Header
   ========================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
}

.site-header.scrolled {
  background: rgba(247, 244, 237, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
}

.logo-img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-forest);
  letter-spacing: -0.02em;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-cream);
  background: var(--color-forest);
  border: 4px solid var(--color-cream-dark);
  border-radius: 100px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s var(--ease-out);
}

.cta-button:hover {
  color: var(--color-cream);
  background: var(--color-terracotta);
  box-shadow: 0 8px 24px rgba(196, 93, 58, 0.3);
}

/* Header Right Group */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 500;
}

.lang-link {
  color: var(--color-stone);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}

.lang-link:hover {
  color: var(--color-forest);
}

.lang-link.active {
  color: var(--color-forest);
  background: rgba(26, 47, 26, 0.08);
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + var(--space-xl)) var(--space-md) var(--space-xl);
  background: url('/assets/images/hero.avif') center/cover no-repeat;
  overflow: hidden;
}

.hero-texture {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(196, 93, 58, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(45, 90, 107, 0.06) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin-bottom: 6rem;
}

.hero-title {
  font-size: var(--text-display-xl);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-forest);
  margin-bottom: var(--space-lg);
}

.hero-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.hero-label {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-forest);
  background: rgba(247, 244, 237, 0.5);
  border-radius: 100px;
}

/* ==========================================
   Section Titles
   ========================================== */

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-display-md);
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-forest);
  margin-bottom: var(--space-lg);
}

.anchor-link {
  color: inherit;
  text-decoration: none;
}

.anchor-link svg {
  width: 0.6em;
  height: 0.6em;
  vertical-align: baseline;
  opacity: 0.35;
  margin-left: 0.15em;
  transition: opacity 0.2s;
}

.anchor-link:hover svg {
  opacity: 0.7;
}

/* ==========================================
   Layers Section - Simplified Alternating Layout
   ========================================== */

.layers-section {
  padding: var(--space-xl) var(--space-md);
  background: var(--color-cream);
}

.layers-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.layers-intro {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.layers-intro .section-title {
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--color-forest);
}

/* Layer Section - Standard: Text Left, Image Right */
.layer-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
  margin-bottom: var(--space-2xl);
}

.layer-section:last-child {
  margin-bottom: 0;
}

/* Alternate: Text Right, Image Left */
.layer-section.layer-section-alt {
  direction: rtl;
}

.layer-section.layer-section-alt .layer-content {
  direction: ltr;
}

/* Centered section (ProtoVille - no image) */
.layer-section.layer-section-centered {
  display: flex;
  justify-content: center;
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.layer-section.layer-section-centered .layer-content {
  max-width: 700px;
}

.layer-content {
  max-width: 500px;
}

.layer-image {
  max-width: 300px;
  margin: 0 auto;
}

.layer-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(26, 47, 26, 0.1);
}

/* Mobile: Layer images as background overlay with edge fade */
@media (max-width: 899px) {
  #farmfra,
  #dumo,
  #namhae {
    position: relative;
    overflow: hidden;
  }

  #namhae {
    padding: var(--space-xl) 0;
  }

  #farmfra .layer-image,
  #dumo .layer-image,
  #namhae .layer-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.3;
    max-width: none;
  }

  /* Farmfra & Namhae: left side fades out */
  #farmfra .layer-image,
  #namhae .layer-image {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
    mask-image: linear-gradient(to right, transparent 0%, black 40%);
  }

  /* Dumo: right side fades out */
  #dumo .layer-image {
    -webkit-mask-image: linear-gradient(to left, transparent 0%, black 40%);
    mask-image: linear-gradient(to left, transparent 0%, black 40%);
  }

  #farmfra .layer-image img,
  #dumo .layer-image img,
  #namhae .layer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: none;
  }

  #farmfra .layer-content,
  #dumo .layer-content,
  #namhae .layer-content {
    position: relative;
    z-index: 1;
    padding: 0 var(--space-md);
  }

  /* ProtoVille - keep logo on top */
  #protoville {
    flex-direction: column;
    align-items: center;
  }

  #protoville .layer-image {
    order: -1;
    max-width: 48px;
  }

  #protoville .layer-image img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: none;
  }
}

/* Desktop: side by side */
@media (min-width: 900px) {
  .layer-section {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    position: relative;
  }

  .layer-section.layer-section-alt {
    grid-template-columns: 1fr 1fr;
    direction: ltr;
  }

  .layer-section.layer-section-alt .layer-content {
    order: 2;
  }

  .layer-section.layer-section-alt .layer-image {
    order: 1;
  }

  .layer-content {
    max-width: none;
    position: relative;
    z-index: 2;
  }

  /* Show layer images on desktop - larger and overlapping */
  #farmfra .layer-image,
  #dumo .layer-image,
  #namhae .layer-image {
    display: block;
    max-width: none;
    position: relative;
    z-index: 1;
  }

  /* ProtoVille - icon on top of text */
  #protoville {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }

  #protoville .layer-image {
    display: block;
    order: -1;
    max-width: 64px;
    margin: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  #protoville .layer-image img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    box-shadow: none;
  }

  /* Normal layout: image overlaps left into text area */
  .layer-section .layer-image {
    margin-left: -4rem;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
    mask-image: linear-gradient(to right, transparent 0%, black 40%);
  }

  /* Alt layout: image overlaps right into text area */
  .layer-section.layer-section-alt .layer-image {
    margin-right: -4rem;
    margin-left: 0;
    -webkit-mask-image: linear-gradient(to left, transparent 0%, black 40%);
    mask-image: linear-gradient(to left, transparent 0%, black 40%);
  }
}

/* Layer Content Styles */
.layer-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  margin-bottom: var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-cream);
  background: var(--color-terracotta);
  border-radius: 100px;
}

.layer-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--color-forest);
  margin-bottom: var(--space-xs);
}

.layer-description {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-ink-light);
  margin-bottom: var(--space-sm);
}

.layer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.layer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  font-size: var(--text-xs);
  color: var(--color-terracotta);
  background: rgba(196, 93, 58, 0.08);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.layer-link:hover {
  color: var(--color-terracotta-light);
  background: rgba(196, 93, 58, 0.15);
}

/* Layer Carousel */
.layer-carousel {
  position: relative;
  margin-top: var(--space-sm);
}

@media (max-width: 899px) {
  .layer-carousel {
    margin-top: var(--space-xs);
  }
}

.carousel-track {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-sm);
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 200px;
  border-radius: 10px;
  overflow: hidden;
}

@media (min-width: 600px) {
  .carousel-slide {
    flex: 0 0 240px;
    border-radius: 12px;
  }
}

.carousel-slide img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

@media (min-width: 600px) {
  .carousel-slide img {
    height: 180px;
  }
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  position: relative;
  z-index: 10;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-forest);
  background: var(--color-cream-dark);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.carousel-btn:hover {
  background: var(--color-forest);
  color: var(--color-cream);
}

.carousel-btn:active {
  transform: scale(0.95);
}

/* ==========================================
   Map Section
   ========================================== */

.map-section {
  background: var(--color-cream-dark);
}

/* ==========================================
   Korea Map (Leaflet)
   ========================================== */

.korea-map-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl) var(--space-md);
  margin-top: var(--space-md);
}

.korea-map-container .section-title {
  margin-bottom: var(--space-lg);
}

#korea-map {
  width: 100%;
  max-width: 800px;
  height: 550px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(26, 26, 24, 0.08);
  border: 1px solid var(--color-cream-dark);
  filter: sepia(8%) saturate(90%) contrast(105%) brightness(98%);
}

.map-directions-links {
  display: flex;
  gap: 12px;
  margin-top: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.map-directions-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-terracotta);
  text-decoration: none;
  border: 1px solid var(--color-terracotta);
  border-radius: 24px;
  transition: all 0.2s var(--ease-out);
}

.map-directions-link:hover {
  background-color: var(--color-terracotta);
  color: var(--color-cream);
}

.map-directions-link svg {
  transition: transform 0.2s var(--ease-out);
}

.map-directions-link:hover svg {
  transform: translate(2px, -2px);
}

/* Custom Dumo marker - pin style */
.dumo-map-marker {
  width: 36px;
  height: 46px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
  filter: drop-shadow(0 3px 6px rgba(196, 93, 58, 0.5));
}

.dumo-map-marker::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background-color: var(--color-terracotta);
  border: 3px solid var(--color-cream);
  border-radius: 50% 50% 50% 0;
  transform: translateX(-50%) rotate(-45deg);
}

.dumo-map-marker::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background-color: var(--color-cream);
  border-radius: 50%;
}

.dumo-map-marker:hover {
  transform: scale(1.15);
}

/* Mapbox popup styling */
.mapboxgl-popup-content {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-ink);
  background: var(--color-cream);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 4px 12px rgba(26, 26, 24, 0.12);
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
  border-top-color: var(--color-cream);
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
  border-bottom-color: var(--color-cream);
}

.dumo-popup .mapboxgl-popup-content strong {
  color: var(--color-terracotta);
  font-weight: 600;
}

/* Mapbox NavigationControl styling */
.mapboxgl-ctrl-group {
  background-color: var(--color-cream);
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(196, 93, 58, 0.15);
  border: 1px solid var(--color-cream-dark);
}

.mapboxgl-ctrl-group button {
  width: 36px;
  height: 36px;
  background-color: var(--color-cream);
  border: none;
}

.mapboxgl-ctrl-group button:hover {
  background-color: var(--color-terracotta);
}

.mapboxgl-ctrl-group button:hover .mapboxgl-ctrl-icon {
  background-color: var(--color-terracotta);
}

.mapboxgl-ctrl-group button + button {
  border-top: 1px solid var(--color-cream-dark);
}

.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon,
.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon {
  background-image: none;
  position: relative;
}

.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon::before,
.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon::before,
.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon::after,
.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon::after {
  content: '';
  position: absolute;
  background-color: var(--color-terracotta);
  transition: background-color 0.2s ease;
}

.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon::before,
.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon::before {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 2px;
}

.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon::after {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 14px;
}

.mapboxgl-ctrl-group button:hover .mapboxgl-ctrl-icon::before,
.mapboxgl-ctrl-group button:hover .mapboxgl-ctrl-icon::after {
  background-color: var(--color-cream);
}

/* ==========================================
   Gallery Section
   ========================================== */

.gallery-section {
  padding: var(--space-md) var(--space-md) var(--space-xl);
  background: var(--color-cream);
}

.gallery-carousel {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.gallery-carousel::before,
.gallery-carousel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 5;
}

.gallery-carousel::before {
  left: 0;
  background: linear-gradient(to left, transparent, var(--color-cream));
}

.gallery-carousel::after {
  right: 0;
  background: linear-gradient(to right, transparent, var(--color-cream));
}

.gallery-carousel .carousel-track {
  padding: var(--space-sm) calc(50% - 120px);
  scroll-snap-type: x mandatory;
}

.gallery-carousel .carousel-slide {
  flex: 0 0 calc((100vw - 4rem) / 2.3);
  scroll-snap-align: center;
}

@media (min-width: 768px) {
  .gallery-carousel .carousel-track {
    padding: var(--space-sm) calc(50% - 200px);
  }

  .gallery-carousel .carousel-slide {
    flex: 0 0 calc((100vw - 4rem) / 2.3);
  }
}

.gallery-carousel .carousel-slide img {
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
}

@media (min-width: 768px) {
  .gallery-carousel .carousel-slide img {
    height: 380px;
  }
}

/* ==========================================
   Accommodation & Co-Working Section
   ========================================== */

.stay-section {
  padding: var(--space-xl) var(--space-md);
  background: var(--color-cream-dark);
}

.stay-section .section-title {
  text-align: center;
}

.stay-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (min-width: 900px) {
  .stay-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.stay-grid h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--color-forest);
  text-align: center;
}

.stay-carousel {
  position: relative;
}

.stay-carousel::before,
.stay-carousel::after {
  display: none;
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 5;
}

.stay-carousel::before {
  left: 0;
  background: linear-gradient(to left, transparent, var(--color-cream-dark));
}

.stay-carousel::after {
  right: 0;
  background: linear-gradient(to right, transparent, var(--color-cream-dark));
}

.stay-carousel .carousel-track {
  scroll-snap-type: x mandatory;
}

.stay-carousel .carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  border-radius: 12px;
  overflow: hidden;
}

.stay-carousel .carousel-slide img {
  height: 280px;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
}

@media (min-width: 900px) {
  .stay-carousel .carousel-slide img {
    height: 320px;
  }
}

/* ==========================================
   Theme Section
   ========================================== */

.theme-section {
  padding: var(--space-xl) var(--space-md);
  background: var(--color-forest);
  color: var(--color-cream);
}

.theme-section .section-title {
  color: var(--color-cream);
  text-align: center;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.theme-card {
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  text-align: center;
}

.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-md);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--color-gold);
}

.theme-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-cream);
  margin-bottom: var(--space-xs);
}

.theme-description {
  font-size: var(--text-sm);
  color: rgba(247, 244, 237, 0.75);
  line-height: 1.6;
}

/* ==========================================
   Schedule Section
   ========================================== */

.schedule-section {
  padding: var(--space-xl) var(--space-md);
  background: var(--color-cream);
  text-align: center;
  overflow: hidden;
}

.activities-section {
  background: var(--color-cream-dark);
}

.schedule-intro {
  color: var(--color-stone);
  margin-bottom: var(--space-xl);
  margin-left: auto;
  margin-right: auto;
  font-size: var(--text-lg);
}

.schedule-timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  text-align: left;
}


.schedule-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
}

.schedule-time {
  width: 70px;
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-stone);
}

.schedule-dot {
  display: none;
}

.schedule-content {
  flex: 1;
}

.schedule-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-forest);
  margin-bottom: 0.25rem;
}

.schedule-content p {
  font-size: var(--text-sm);
  color: var(--color-ink-light);
}

.korean {
  font-weight: 600;
  color: var(--color-forest);
}

/* Week Timetable */
.week-timetable-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-sm);
}

.week-timetable {
  width: 100%;
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 3px;
  font-size: var(--text-base);
  table-layout: fixed;
}

.week-timetable thead th {
  background: var(--color-forest);
  color: var(--color-cream);
  padding: var(--space-sm) var(--space-xs);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  text-align: center;
  border-radius: 8px 8px 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.week-timetable thead th .date {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  opacity: 0.7;
  margin-top: 2px;
}

.week-timetable thead th.time-header {
  background: var(--color-cream);
  width: 70px;
  min-width: 70px;
  position: sticky;
  left: 0;
  z-index: 15;
}

.week-timetable thead th.time-header::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -6px;
  bottom: -3px;
  width: 6px;
  background: var(--color-cream);
}

/* Equal width for all day columns */
.week-timetable thead th:not(.time-header) {
  width: calc((100% - 70px) / 7);
}

.week-timetable tbody tr {
  height: 42px;
}

.week-timetable tbody td {
  background: white;
  padding: var(--space-xs);
  text-align: center;
  vertical-align: middle;
  border-radius: 4px;
  overflow: hidden;
}

/* Equal width for day cells */
.week-timetable tbody td:not(.time-cell) {
  width: calc((100% - 70px) / 7);
}

.week-timetable .time-cell {
  background: var(--color-cream-dark);
  color: var(--color-stone);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 5;
  text-align: right;
  padding-right: var(--space-sm);
}

.week-timetable .time-cell::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -6px;
  bottom: -3px;
  width: 6px;
  background: var(--color-cream);
}

.week-timetable .activity {
  font-weight: 500;
  color: var(--color-forest);
  padding: var(--space-xs) var(--space-xs);
  line-height: 1.3;
  overflow-wrap: normal;
}

.week-timetable .activity.compact {
  font-size: var(--text-xs);
}

.week-timetable .activity-detail {
  display: block;
  font-size: var(--text-xs);
  font-weight: 400;
  opacity: 0.7;
  margin-top: 2px;
}

/* Activity type colors */
.week-timetable .activity.morning {
  background: #f5e6c8;
  color: var(--color-forest);
}

.week-timetable .activity.work {
  background: #d4e4d4;
  color: var(--color-forest);
}

.week-timetable .activity.meal {
  background: #f5dcd4;
  color: var(--color-terracotta);
}

.week-timetable .activity.community {
  background: #d4e8eb;
  color: var(--color-forest);
}

.week-timetable .activity.special {
  background: #e6d4f0;
  color: var(--color-forest);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .week-timetable-wrapper {
    margin: 0 calc(-1 * var(--space-md));
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .week-timetable {
    font-size: var(--text-xs);
  }

  .week-timetable thead th {
    padding: var(--space-xs);
    font-size: var(--text-sm);
  }

  .week-timetable tbody td {
    height: 32px;
  }

  .week-timetable .time-cell {
    font-size: 0.65rem;
  }

  .week-timetable .activity {
    font-size: var(--text-xs);
  }

  .week-timetable .activity-detail {
    font-size: 0.625rem;
  }
}

.activities-section {
  padding: var(--space-xl) var(--space-md);
  background: var(--color-cream-dark);
  text-align: center;
}

.activities-section .section-title {
  text-align: center;
}

/* Activity Cards (below timetable) */
.subsection-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-forest);
  margin: var(--space-lg) 0 var(--space-md);
  text-align: center;
}

.activity-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.activity-card {
  width: calc((100% - 3 * var(--space-md)) / 4);
  background: white;
  border-radius: 12px;
  padding: var(--space-md);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.activity-card--featured {
  width: calc((100% - 2 * var(--space-md)) / 3);
}

.activity-card--has-image {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.activity-card--has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.60) 60%, rgba(0, 0, 0, 0.25) 100%);
  border-radius: inherit;
}

.activity-card--has-image .activity-card-title {
  color: var(--color-cream);
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.activity-card--has-image .activity-card-description {
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.activity-card--has-image .activity-card-description a {
  color: #a8dce6;
  text-decoration: underline;
}

.activity-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-cream-dark);
  border-radius: 50%;
  color: var(--color-forest);
}

.activity-card-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-forest);
  margin-bottom: var(--space-xs);
}

.activity-card-description {
  font-size: var(--text-sm);
  color: var(--color-stone);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .activity-card {
    width: calc((100% - var(--space-md)) / 2);
  }
}

@media (max-width: 600px) {
  .activity-card,
  .activity-card--featured {
    width: 100%;
  }

  .subsection-title {
    font-size: var(--text-lg);
  }
}

/* ==========================================
   UBI Watching Kit Section
   ========================================== */

.kit-section {
  padding: var(--space-xl) var(--space-md);
  background: var(--color-cream);
}

.kit-container {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.kit-section .section-title {
  color: var(--color-forest);
}

.kit-intro {
  font-size: var(--text-lg);
  color: var(--color-ink-light);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.kit-preview {
  max-width: 420px;
  margin: 0 auto var(--space-lg);
}

.kit-mockup {
  background: var(--color-forest);
  border-radius: 16px;
  padding: var(--space-lg);
  font-family: 'Courier New', monospace;
}

.mockup-header {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(247, 244, 237, 0.15);
  margin-bottom: var(--space-md);
}

.mockup-title {
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-cream);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: var(--space-xs);
}

.mockup-subtitle {
  font-size: var(--text-sm);
  color: rgba(247, 244, 237, 0.5);
  letter-spacing: 0.04em;
  display: block;
}

.mockup-scoring {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mockup-scale {
  display: grid;
  grid-template-columns: 6rem 1fr 6rem;
  align-items: center;
  gap: var(--space-sm);
}

.scale-label {
  font-size: var(--text-xs);
  color: rgba(247, 244, 237, 0.55);
  letter-spacing: 0.04em;
}

.scale-label:last-child {
  text-align: right;
}

.scale-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.scale-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(247, 244, 237, 0.18);
  border: 1px solid rgba(247, 244, 237, 0.2);
}

.scale-dot.active {
  background: #c9a95e;
  border-color: #c9a95e;
}


/* ==========================================
   Signup Section
   ========================================== */

.signup-section {
  padding: var(--space-xl) var(--space-md);
  background: var(--color-cream-dark);
}

.signup-container {
  max-width: 600px;
  margin: 0 auto;
}

.signup-section .section-title {
  text-align: center;
}

.cost-breakdown {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  align-items: center;
}

.cost-header {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-forest);
  background: var(--color-cream);
  padding: 0.4em 0.75em;
  border-radius: 99px;
  text-align: center;
  justify-self: center;
}

.cost-header-corner {
  background: none;
}

.cost-row-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-forest);
  background: var(--color-cream);
  padding: 0.4em 0.75em;
  border-radius: 99px;
  text-align: center;
  justify-self: start;
}

.cost-detail {
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--color-stone);
}

.cost-item {
  background: white;
  border-radius: 16px;
  padding: var(--space-md) var(--space-lg);
  box-shadow: 0 4px 20px rgba(26, 47, 26, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-cream);
}

.cost-item.sold-out {
  position: relative;
}

.cost-item.sold-out .cost-value {
  opacity: 0.25;
}

.cost-item.sold-out::after {
  content: attr(data-sold-label);
  position: absolute;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-forest);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cost-value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--color-terracotta);
}

@media (max-width: 480px) {
  .cost-breakdown {
    grid-template-columns: auto 1fr 1fr;
    gap: var(--space-xs);
  }

  .cost-item {
    padding: var(--space-sm);
  }

  .cost-header {
    font-size: var(--text-base);
  }
}

.signup-notes {
  margin-bottom: var(--space-lg);
}

.signup-notes p {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-ink-light);
}

.check-mark {
  flex-shrink: 0;
  color: var(--color-forest-light);
  font-weight: 600;
}

.signup-note-indent {
  padding-left: calc(var(--space-sm) + 1em);
  font-size: var(--text-xs);
  color: var(--color-stone);
  margin-bottom: var(--space-xs);
}

.signup-note-indent::before {
  content: '∟';
  margin-right: 0.35em;
  opacity: 0.5;
}

/* ==========================================
   FAQ Section
   ========================================== */

.faq-section {
  padding: var(--space-xl) var(--space-md);
  background: var(--color-cream);
}

.faq-section .section-title {
  text-align: center;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto var(--space-xl);
}

.faq-item {
  border-bottom: 1px solid var(--color-cream-dark);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: var(--space-sm) 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-forest);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-stone);
  transition: transform 0.3s var(--ease-out);
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-question:hover {
  color: var(--color-terracotta);
}

.faq-answer {
  padding: 0 0 var(--space-md);
  color: var(--color-ink);
  font-size: var(--text-base);
  line-height: 1.8;
}

.faq-answer p {
  margin-bottom: var(--space-sm);
}

.faq-answer ul {
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
}

.faq-answer li {
  margin-bottom: var(--space-xs);
  position: relative;
}

.faq-answer li::before {
  content: '•';
  position: absolute;
  left: -1rem;
  color: var(--color-terracotta);
}

.faq-answer a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-answer > .faq-item {
  margin-left: var(--space-md);
  border-bottom: none;
  padding: 0;
}

.faq-answer > .faq-item .faq-question {
  font-size: var(--text-base);
  padding: var(--space-xs) 0;
}

.faq-answer > .faq-item .faq-answer p,
.faq-answer > .faq-item .faq-answer ul {
  margin-left: var(--space-md);
}

.address {
  padding: var(--space-sm);
  background: var(--color-cream-dark);
  border-radius: 8px;
  font-size: var(--text-sm);
}

.organizer {
  margin-bottom: var(--space-md);
}

.organizer h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-forest);
  margin-bottom: 0.25rem;
}

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

/* ==========================================
   Footer
   ========================================== */

.site-footer {
  padding-top: var(--space-2xl);
  padding-bottom: 10rem;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
  background: var(--color-forest);
  text-align: center;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: var(--text-display-lg);
  font-weight: 400;
  font-style: italic;
  color: var(--color-cream);
  line-height: 1.2;
  margin-bottom: var(--space-md);
  margin-left: auto;
  margin-right: auto;
}

.footer-date {
  font-size: var(--text-sm);
  color: rgba(247, 244, 237, 0.6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: auto;
  margin-right: auto;
}

.footer-links {
  font-size: var(--text-sm);
  color: rgba(247, 244, 237, 0.6);
  margin-top: var(--space-md);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.footer-links a {
  color: rgba(247, 244, 237, 0.6);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-cream);
}

.footer-links .separator {
  padding-left: 0.5em;
  padding-right: 0.5em;
  opacity: 0.3;
}

/* ==========================================
   Responsive Adjustments
   ========================================== */

@media (max-width: 768px) {
  :root {
    --space-3xl: 6rem;
  }

  .layers-section,
  .map-section,
  .korea-map-container,
  .gallery-section,
  .stay-section,
  .theme-section,
  .schedule-section,
  .activities-section,
  .kit-section,
  .signup-section,
  .faq-section {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .hero {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .site-footer {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
    padding-bottom: 12rem;
  }

  .activity-grid {
    padding-left: 0;
    padding-right: 0;
  }

  .site-header {
    padding: 0 var(--space-sm);
  }

  .header-right {
    gap: var(--space-sm);
  }

  .language-switcher {
    font-size: var(--text-xs);
  }

  .lang-link {
    padding: 0.2rem 0.35rem;
  }

  .cta-button {
    padding: 0.6rem 1rem;
    font-size: var(--text-xs);
  }

  .hero-title {
    line-height: 1.15;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .hide-mobile {
    display: none;
  }
}

/* ==========================================
   Utility Classes
   ========================================== */

.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;
}

/* ==========================================
   Fixed CTA Button
   ========================================== */

.fixed-cta {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
}

.fixed-cta .cta-button {
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(26, 47, 26, 0.3);
}
