/* === CSS Variables === */
:root {
  --bg-deep: #0a0a1a;
  --bg-space: #0d1b2a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-card-solid: #111827;
  --text-primary: #f5f5fa;
  --text-secondary: #b8b8d0;
  --text-dim: #7a7a96;
  --accent-gold: #d4a853;
  --accent-coral: #e87461;
  --accent-teal: #4ecdc4;
  --accent-blue: #6ea8fe;
  --star-bright: #ffffff;
  --star-dim: rgba(255, 255, 255, 0.3);
  --star-glow: rgba(100, 140, 255, 0.4);
  --line-constellation: rgba(255, 255, 255, 0.08);
  --success: #4ecdc4;
  --warning: #d4a853;
  --error: #e87461;
  --border: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(212, 168, 83, 0.5);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-deep);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-gold); }

/* === Starfield Canvas === */
#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, var(--bg-deep) 0%, #0d1b2a 40%, #1b0a2e 100%);
}

/* === Navigation === */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
  transition: background 0.3s, backdrop-filter 0.3s;
  background: transparent;
}

.site-nav .nav-inner {
  position: relative;
}

.site-nav.scrolled {
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-menu-centered {
  width: 100%;
  justify-content: center;
}

.nav-menu a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-menu a:hover { color: var(--text-primary); }

.nav-cta {
  background: var(--accent-gold) !important;
  color: var(--bg-deep) !important;
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: #e0b95e !important; }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 768px) {
  .site-nav { display: none; }
}

/* === Hero === */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-content { max-width: 720px; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 50%, var(--accent-coral) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2vw, 1rem);
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.scroll-hint {
  margin-top: 3rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* === Buttons === */
.btn-gold {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-gold), #c49540);
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 2.5rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(212, 168, 83, 0.4);
  color: var(--bg-deep);
}
.btn-large { font-size: 1.1rem; padding: 1rem 3rem; }

/* === Sections === */
.section {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.page-container {
  position: relative;
  z-index: 1;
  padding: 6rem 1.5rem 4rem;
  max-width: 900px;
  margin: 0 auto;
}

/* === Glass Cards === */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.section-body {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* === Timeline === */
.timeline { padding-left: 0; }

.timeline-day { margin-bottom: 2rem; }

.timeline-date {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.timeline-item {
  display: flex;
  gap: 1.25rem;
  padding: 0.75rem 0;
  border-left: 2px solid var(--border);
  padding-left: 1.25rem;
  margin-left: 0.5rem;
}

.timeline-time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-teal);
  white-space: nowrap;
  min-width: 80px;
  flex-shrink: 0;
}

.timeline-detail strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.timeline-detail p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.callout-warning {
  background: rgba(232, 116, 97, 0.08);
  border-left-color: var(--accent-coral) !important;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem !important;
  margin-top: 0.5rem;
}

/* === Highlight Box === */
.highlight-box {
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid rgba(212, 168, 83, 0.2);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.highlight-box p { color: var(--text-secondary); font-size: 0.95rem; margin: 0; }

/* === Gear Grid === */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.gear-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}

.gear-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--accent-gold);
}

.gear-card ul {
  list-style: none;
  padding: 0;
}
.gear-card li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  padding-left: 1.2rem;
  position: relative;
}
.gear-card li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent-teal);
  font-weight: bold;
}

/* === Rules === */
.rules-list {
  list-style: none;
  padding: 0;
}
.rules-list li {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.rules-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-gold);
}

/* === Collapsible === */
.collapsible { margin: 0.75rem 0; }

.collapsible-toggle {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.collapsible-toggle:hover { background: var(--bg-card-hover); }

.toggle-icon {
  font-size: 1.2rem;
  color: var(--accent-gold);
  transition: transform 0.3s;
}
.collapsible.open .toggle-icon { transform: rotate(45deg); }

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.25rem;
}
.collapsible.open .collapsible-content {
  max-height: 500px;
  padding: 1rem 1.25rem;
}
.collapsible-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* === Map === */
.map-container {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-legend {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.map-pin {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.pin-launch { background: var(--accent-teal); }
.pin-party { background: var(--accent-gold); }

/* === CTA Section === */
.cta-section { padding-top: 3rem; padding-bottom: 4rem; }

.cta-text {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* === Footer === */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* === Registration Form === */
.register-page { padding-top: 5rem; }

.form-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
}

.form-card legend {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-gold);
  padding: 0 0.5rem;
}

.field-hint {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.hint { color: var(--text-dim); font-weight: 400; }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
}

.form-group textarea { resize: vertical; }

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.5rem;
}

/* Radio Cards */
.radio-cards {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.radio-card {
  cursor: pointer;
  display: block;
}

.radio-card input { display: none; }

.radio-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.radio-card input:checked + .radio-card-body {
  border-color: var(--accent-gold);
  background: rgba(212, 168, 83, 0.06);
  box-shadow: 0 0 20px rgba(212, 168, 83, 0.1);
}

.radio-card:hover .radio-card-body {
  background: var(--bg-card-hover);
}

.slot-time {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.slot-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Checkbox */
.form-check {
  margin-bottom: 1rem;
}

.form-check label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-gold);
  flex-shrink: 0;
}

.form-check .hint {
  display: block;
  margin-left: 2.1rem;
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

/* Error */
.form-error {
  background: rgba(232, 116, 97, 0.1);
  border: 1px solid rgba(232, 116, 97, 0.3);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--accent-coral);
  font-size: 0.9rem;
}
.form-error p { margin: 0.25rem 0; }

/* === Success Page === */
.success-card { overflow: hidden; }

.success-star {
  font-size: 4rem;
  animation: pulse-star 2s ease-in-out infinite;
  margin-bottom: 1rem;
}
@keyframes pulse-star {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  text-align: left;
}
@media (max-width: 400px) {
  .summary-grid { grid-template-columns: 1fr; }
}

.summary-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
}

.summary-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.summary-value {
  font-weight: 600;
  color: var(--text-primary);
}

.mono { font-family: var(--font-mono); font-size: 0.9em; }

/* === Hero Message & CTA Row === */
.hero-message {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.hero-cta-row {
  margin-bottom: 4rem;
}

.hero-footnote {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}
.hero-footnote a { color: var(--accent-teal); }

/* === Outline Button (subtle, for forms/secondary contexts) === */
.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 2.5rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.btn-outline:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

/* === Visible Outline Button (prominent, for CTAs) === */
.btn-outline-visible {
  display: inline-block;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 2.5rem;
  border-radius: 100px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.btn-outline-visible:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
}

/* === Food Section === */
.food-section {
  margin-bottom: 1.25rem;
}
.food-section h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--accent-gold);
  margin-bottom: 0.35rem;
}
.food-section p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

/* === Scroll Reveal === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Mobile Optimization === */
@media (max-width: 600px) {
  .section { padding: 1rem; }
  .page-container { padding: 2rem 1rem 3rem; }
  .register-page { padding-top: 2rem; }

  .glass-card { padding: 1.5rem 1rem; border-radius: 14px; }

  .form-card { padding: 1rem 0.75rem; margin-bottom: 1rem; border-radius: 12px; }
  .form-card legend { font-size: 1.1rem; }

  .radio-card-body { padding: 0.7rem 0.9rem; border-radius: 10px; }
  .radio-cards { gap: 0.5rem; }

  .form-group { margin-bottom: 0.75rem; }
  .form-group input,
  .form-group textarea,
  .form-group select { padding: 0.6rem 0.75rem; }

  .field-hint { margin-bottom: 0.5rem; }

  .section-title { font-size: 1.6rem; margin-bottom: 1rem; }
  .section-body { font-size: 0.95rem; }

  .hero { padding: 1.5rem 1rem; }
  .hero-title { font-size: 2.8rem; }
  .hero-message { font-size: 1rem; margin-bottom: 2rem; }
  .hero-cta-row { margin-bottom: 3rem; }
  .hero-footnote { font-size: 0.85rem; }
  .btn-large { padding: 0.75rem 2rem; font-size: 0.95rem; }

  .timeline-item { gap: 0.75rem; padding-left: 1rem; }
  .timeline-time { min-width: 65px; font-size: 0.8rem; }

  .gear-grid { gap: 0.75rem; }
  .gear-card { padding: 1rem; }

  .highlight-box { padding: 0.75rem 1rem; }

  .summary-grid { gap: 0.5rem; }
  .summary-item { padding: 0.6rem 0.75rem; }

  .success-card { padding: 2rem 1.25rem !important; }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
  .success-star { animation: none; }
  #starfield { display: none; }
  body {
    background: linear-gradient(180deg, var(--bg-deep) 0%, #0d1b2a 40%, #1b0a2e 100%);
  }
}
