:root {
  --night: #1b2a4a;
  --night-deep: #0f1b33;
  --night-darker: #0a1220;
  --cream: #fff8ec;
  --paper: #fffdf7;
  --amber: #f2a541;
  --amber-dark: #d9862a;
  --brown: #6b4a35;
  --leaf: #7a9e7e;
  --pink: #e8879a;
  --muted: #9aa3b2;
  --shadow: 0 10px 30px rgba(27, 42, 74, 0.12);
  --radius: 20px;
  font-size: 16px;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  background: var(--cream);
  color: var(--brown);
  min-height: 100dvh;
}

h1, h2, h3 { font-family: 'Comfortaa', 'Nunito', sans-serif; font-weight: 500; margin: 0; }

/* ---------- Hero band (header + next event) ---------- */

.hero-band {
  position: relative;
  background: linear-gradient(160deg, var(--night-darker) 0%, var(--night) 55%, var(--night-deep) 100%);
  overflow: hidden;
  padding: 30px 20px 44px;
}

.bg-decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.moon-glow {
  position: absolute;
  top: -120px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 165, 65, 0.22) 0%, rgba(242, 165, 65, 0) 70%);
}
.star {
  position: absolute;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  animation: twinkle 3.4s ease-in-out infinite;
}
.s1 { top: 14%; left: 8%; font-size: 18px; }
.s2 { top: 34%; left: 24%; animation-delay: 0.6s; }
.s3 { top: 10%; left: 46%; font-size: 12px; animation-delay: 1.1s; }
.s4 { top: 55%; left: 58%; animation-delay: 1.6s; }
.s5 { top: 12%; left: 78%; font-size: 20px; animation-delay: 0.3s; }
.s6 { top: 60%; left: 90%; font-size: 10px; animation-delay: 2s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.25); }
}

.hero-band-inner {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: center;
}

.brand-col { display: flex; flex-direction: column; gap: 20px; }

.brand { display: flex; align-items: center; gap: 14px; }
.brand-owl {
  font-size: 46px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35));
  animation: float 4.5s ease-in-out infinite;
  display: inline-block;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.brand h1 { color: #fff; font-size: 30px; letter-spacing: 0.5px; }
.subtitle { color: #c9d2e8; margin: 4px 0 0; font-size: 14px; }

.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--amber);
  color: #3a2408;
  box-shadow: 0 6px 16px rgba(242, 165, 65, 0.4);
}
.btn-primary:hover { background: var(--amber-dark); }
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); }
.btn-ghost.active {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #16321c;
}
.btn-outline {
  background: var(--paper);
  color: var(--brown);
  border: 1px solid rgba(107, 74, 53, 0.22);
}
.btn-outline:hover { background: #fff3de; }
.btn-outline.active {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #16321c;
}
.btn-small { padding: 7px 14px; font-size: 12.5px; }

/* ---------- Hero card (glass panel, next event) ---------- */

.hero-card-col { min-width: 0; }

.hero-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(10, 18, 32, 0.35), inset 0 1px 0 rgba(255,255,255,0.12);
  animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--amber);
  margin-bottom: 10px;
}
.hero-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-icon {
  font-size: 38px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 66px; height: 66px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hero-title { font-size: 19px; color: #fff; margin-bottom: 4px; font-weight: 700; }
.hero-date { color: #c9d2e8; font-size: 13px; }
.hero-note { font-size: 12px; color: #c9d2e8; opacity: 0.85; margin-top: 4px; }
.hero-countdown {
  margin-left: auto;
  text-align: center;
  background: var(--amber);
  color: #3a2408;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 700;
}
.hero-countdown .num { display: block; font-size: 24px; line-height: 1.1; }
.hero-countdown .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.hero-empty { color: #fff; font-size: 15px; margin: 0; }

/* ---------- Main content ---------- */

main { max-width: 980px; margin: 0 auto; padding: 30px 20px 10px; }

.ics-hint {
  font-size: 13px;
  color: var(--brown);
  opacity: 0.8;
  background: #fff3de;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 22px;
  line-height: 1.5;
}

/* ---------- Legend ---------- */

.list-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 16px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  font-size: 12px;
  color: var(--brown);
  opacity: 0.85;
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.legend-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  background: var(--leaf);
}
.legend-dot.soon { background: var(--amber); }
.legend-dot.today { background: var(--pink); }
.legend-dot.past { background: #b7b7b7; }

/* ---------- Event cards (stacked list) ---------- */

.events-list {
  max-width: 720px;
  margin: 0 auto 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.month-divider {
  font-family: 'Comfortaa', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--amber-dark);
  margin: 18px 4px 2px;
}
.month-divider:first-child { margin-top: 4px; }

.events-empty {
  text-align: center;
  color: var(--brown);
  opacity: 0.75;
  font-size: 14px;
  padding: 30px 20px;
}

.event-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(107, 74, 53, 0.06);
  border-left: 6px solid var(--leaf);
  padding: 18px 22px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.event-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(27, 42, 74, 0.16); }

.event-card.status-soon { border-left-color: var(--amber); }
.event-card.status-today {
  border-left-color: var(--pink);
  background: #fffaf2;
  box-shadow: 0 10px 30px rgba(232, 135, 154, 0.25);
}
.event-card.status-past { border-left-color: #c7c7c7; opacity: 0.55; }

.ec-date {
  flex-shrink: 0;
  width: 56px;
  text-align: center;
  background: var(--cream);
  border-radius: 14px;
  padding: 8px 0;
  line-height: 1.1;
}
.ec-day { display: block; font-size: 24px; font-weight: 700; color: var(--night); }
.ec-mon { display: block; font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.5px; }

.ec-body { flex: 1; min-width: 0; }
.ec-top { display: flex; align-items: center; gap: 10px; }
.ec-icon { font-size: 24px; flex-shrink: 0; }
.ec-title { font-size: 17px; font-weight: 700; color: var(--night); margin: 0; }
.ec-note { font-size: 13px; color: var(--brown); opacity: 0.8; margin: 6px 0 0; line-height: 1.5; }

.ec-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.event-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--leaf);
  color: #16321c;
  white-space: nowrap;
}
.event-badge.today { background: var(--pink); color: #3a0f1c; }
.event-badge.past { background: #e3e3e3; color: #777; }

.ec-icon-btn {
  border: none;
  background: var(--cream);
  font-size: 15px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.ec-icon-btn:hover { background: #fff3de; transform: scale(1.08); }

@media (max-width: 560px) {
  .event-card { flex-wrap: wrap; padding: 16px; }
  .ec-side { flex-direction: row; align-items: center; margin-left: 74px; }
}

.site-footer {
  text-align: center;
  padding: 20px;
  color: var(--brown);
  opacity: 0.6;
  font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .hero-band-inner { grid-template-columns: 1fr; }
  .hero-band { padding: 26px 20px 34px; }
}

@media (max-width: 560px) {
  .hero-countdown { margin-left: 0; width: 100%; }
  .hero-row { flex-direction: column; align-items: flex-start; }
}
