:root {
  color-scheme: light;
  --ink: #15231f;
  --muted: #5f6965;
  --paper: #f6f0e9;
  --cream: #fffaf4;
  --clay: #bd6543;
  --clay-dark: #91482f;
  --moss: #244c3d;
  --line: #d9cfc4;
  --shadow: 0 18px 55px rgba(39, 32, 25, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(21, 35, 31, 0.12);
  background: rgba(246, 240, 233, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 760; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.back-link { color: var(--moss); text-underline-offset: 4px; }

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 10vw, 8rem) 7vw clamp(4rem, 8vw, 7rem);
  background: var(--moss);
  color: #fffaf4;
}
.hero::after {
  content: "";
  position: absolute;
  width: 34rem;
  height: 34rem;
  right: -8rem;
  top: -13rem;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  box-shadow: 0 0 0 6rem rgba(255,255,255,.025), 0 0 0 12rem rgba(255,255,255,.02);
}
.eyebrow { margin: 0 0 .8rem; color: var(--clay); font-size: .76rem; font-weight: 800; letter-spacing: .18em; }
.hero h1 { max-width: 800px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(3.2rem, 8vw, 7.2rem); line-height: .94; letter-spacing: -.045em; }
.hero-copy { max-width: 720px; margin: 2rem 0 0; color: #dce6e1; font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.6; }

.events-shell { width: min(1180px, 90vw); margin: 0 auto; padding: 5rem 0 7rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 500; }
.view-tabs { display: inline-flex; padding: .3rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.45); }
.view-tab { border: 0; border-radius: 999px; padding: .65rem 1.1rem; color: var(--muted); background: transparent; }
.view-tab.is-active { color: white; background: var(--moss); }

.event-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.event-card { border: 1px solid var(--line); border-radius: 20px; background: var(--cream); overflow: hidden; box-shadow: 0 2px 0 rgba(21,35,31,.03); transition: transform .2s ease, box-shadow .2s ease; }
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-card button { width: 100%; padding: 0; border: 0; text-align: left; background: transparent; color: inherit; }
.event-image { height: 180px; background: linear-gradient(135deg, var(--moss), #39725d); background-position: center; background-size: cover; }
.event-card-body { padding: 1.45rem; }
.event-meta { display: flex; justify-content: space-between; gap: 1rem; color: var(--clay-dark); font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.event-card h3 { margin: 1rem 0 .55rem; font-family: Georgia, serif; font-weight: 500; font-size: 1.65rem; }
.event-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.event-card-footer { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.price { font-weight: 800; }
.availability { color: var(--muted); font-size: .9rem; }
.loading, .empty { padding: 4rem 2rem; text-align: center; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); }
.notice { margin-bottom: 1.4rem; padding: 1rem 1.2rem; border-radius: 12px; background: #e4efe8; color: #17432f; }
.notice.error { background: #f7e2dc; color: #7c321e; }

.calendar { border: 1px solid var(--line); border-radius: 20px; background: var(--cream); overflow: hidden; }
.calendar-toolbar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 1rem; border-bottom: 1px solid var(--line); }
.calendar-toolbar h3 { margin: 0; text-align: center; font-family: Georgia, serif; font-size: 1.6rem; }
.calendar-toolbar button { border: 1px solid var(--line); border-radius: 50%; height: 40px; color: var(--moss); background: white; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { padding: .65rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .72rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.calendar-grid { background: var(--line); gap: 1px; }
.calendar-day { min-height: 128px; padding: .65rem; background: var(--cream); }
.calendar-day.is-outside { background: #f3ece4; color: #9d9992; }
.day-number { font-size: .82rem; font-weight: 700; }
.calendar-event { display: block; width: 100%; margin-top: .45rem; padding: .45rem; border: 0; border-radius: 7px; overflow: hidden; text-align: left; text-overflow: ellipsis; color: white; background: var(--clay); font-size: .72rem; white-space: nowrap; }

.event-dialog { width: min(720px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0; border-radius: 22px; color: var(--ink); background: var(--cream); box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.event-dialog::backdrop { background: rgba(13, 24, 20, .72); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: .8rem; right: .8rem; z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.92); font-size: 1.7rem; }
.dialog-hero { padding: 3rem 2.2rem 2rem; color: white; background: var(--moss); }
.dialog-hero h2 { margin: .5rem 0; font-family: Georgia, serif; font-size: clamp(2rem, 6vw, 3.3rem); font-weight: 500; }
.dialog-hero p { color: #dce6e1; line-height: 1.5; }
.dialog-body { padding: 2rem 2.2rem 2.4rem; }
.dialog-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
.detail { padding: 1rem; border: 1px solid var(--line); border-radius: 10px; }
.detail span { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.long-details { color: var(--muted); line-height: 1.65; white-space: pre-wrap; }
.registration-form { display: grid; grid-template-columns: 1fr 1fr 110px; gap: .8rem; margin-top: 1.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.field label { display: block; margin-bottom: .35rem; font-size: .8rem; font-weight: 700; }
.field input, .field select { width: 100%; height: 46px; padding: 0 .8rem; border: 1px solid #bcb2a8; border-radius: 8px; background: white; }
.form-submit { grid-column: 1 / -1; min-height: 50px; border: 0; border-radius: 9px; color: white; background: var(--clay); font-weight: 800; }
.form-submit:disabled { opacity: .55; cursor: wait; }
.form-message { grid-column: 1 / -1; margin: 0; color: var(--clay-dark); }

footer { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem 5vw; color: #cfdbd6; background: #132a22; font-size: .9rem; }

@media (max-width: 720px) {
  .brand span { display: none; }
  .hero { padding-left: 5vw; padding-right: 5vw; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .event-list { grid-template-columns: 1fr; }
  .calendar-day { min-height: 78px; padding: .35rem; }
  .calendar-event { color: transparent; height: 9px; padding: 0; }
  .registration-form { grid-template-columns: 1fr; }
  .dialog-details { grid-template-columns: 1fr; }
  .dialog-hero, .dialog-body { padding-left: 1.3rem; padding-right: 1.3rem; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
