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

:root {
  --bg: #fafaf7;
  --text: #2d2d2d;
  --text-light: #777;
  --accent: #4a7c59;
  --accent-light: #6aad7a;
  --font-sans: 'Montserrat', sans-serif;
  --font-serif: 'Playfair Display', serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== HERO Section ===== */
.hero {
  height: 500vh;
  position: relative;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

.hero-overlay {
  position: relative;
  z-index: 10;
  text-align: center;
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(30px);
}

.hero-title span { color: #a8e6a3; }

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: #ffd700;
  margin-top: 0.5rem;
  text-shadow: 0 2px 15px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(20px);
}

/* ===== WHEEL Section ===== */
.wheel-section {
  min-height: 100vh;
  padding: 0 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.wheel-header {
  text-align: center;
  margin-bottom: 0;
  padding-top: 20px;
  opacity: 0;
  transform: translateY(40px);
  flex-shrink: 0;
}

.wheel-title {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.wheel-description {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 300;
}

/* Toggle */
.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color 0.3s;
  cursor: pointer;
  user-select: none;
}

.toggle-label--active {
  color: var(--accent);
  font-weight: 600;
}

.toggle-switch {
  width: 50px;
  height: 26px;
  background: #ddd;
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-switch.active { background: var(--accent-light); }

.toggle-knob {
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px; left: 3px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.toggle-switch.active .toggle-knob { transform: translateX(24px); }

/* Wheel wrapper */
.wheel-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 1200px;
  flex: 1;
  justify-content: flex-end;
}

/* Month items panel — compact, close to wheel */
.month-items {
  width: 100%;
  max-width: 750px;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 0;
}

.month-items-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.items-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.item-card {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s;
  opacity: 0;
  transform: translateY(8px);
  animation: fadeInCard 0.3s forwards;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 14px rgba(0,0,0,0.1);
}

.item-icon-img {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

@keyframes fadeInCard {
  to { opacity: 1; transform: translateY(0); }
}

.item-card:nth-child(1) { animation-delay: 0.02s; }
.item-card:nth-child(2) { animation-delay: 0.03s; }
.item-card:nth-child(3) { animation-delay: 0.04s; }
.item-card:nth-child(4) { animation-delay: 0.05s; }
.item-card:nth-child(5) { animation-delay: 0.06s; }
.item-card:nth-child(6) { animation-delay: 0.07s; }
.item-card:nth-child(7) { animation-delay: 0.08s; }
.item-card:nth-child(8) { animation-delay: 0.09s; }
.item-card:nth-child(9) { animation-delay: 0.10s; }
.item-card:nth-child(10) { animation-delay: 0.11s; }
.item-card:nth-child(n+11) { animation-delay: 0.12s; }

/* Clip container — top half of wheel */
.wheel-clip {
  position: relative;
  width: min(1350px, 140vw);
  height: min(580px, 60vw);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Arrow indicator — attached to wheel top edge */
.current-indicator {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.indicator-arrow {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 16px solid var(--accent);
}

/* Wheel container */
.wheel-container {
  width: min(1350px, 140vw);
  height: min(1350px, 140vw);
  cursor: grab;
  touch-action: none;
  user-select: none;
  position: relative;
  margin: 0 auto;
  margin-top: -100px;
}

.wheel-container:active { cursor: grabbing; }

#wheel-svg {
  width: 100%;
  height: 100%;
}

/* SVG styles */
.sector-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  fill: #333;
  pointer-events: none;
  text-anchor: middle;
}

.item-icon { pointer-events: none; }

.center-month {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  fill: var(--accent);
}

.center-year {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 400;
  fill: #999;
}

.center-day {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 300;
  fill: #aaa;
}

.sector-path {
  transition: opacity 0.3s;
}

.sector-path:hover {
  opacity: 0.85;
}

/* ===== Footer ===== */
.footer { display: none; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .wheel-container {
    width: 150vw;
    height: 150vw;
  }

  .wheel-clip {
    max-width: 150vw;
    height: 75vw;
  }

  .sector-label { font-size: 10px; }

  .hero-title { font-size: 2.5rem; }

  .month-items { min-height: 80px; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }
