:root {
  --teal: #1c4e63;
  --teal-dark: #123240;
  --teal-mid: #17435570;
  --orange: #d97d3d;
  --tan: #f4f1ea;
  --text-on-dark: #f4f1ea;
  --text: #2b2b2b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--teal-dark);
  color: var(--text-on-dark);
}

/* Hero */
.hero {
  background: var(--teal);
  color: #fff;
  text-align: center;
  padding: 48px 16px 56px;
}
.hero-logo {
  max-width: 200px; width: 100%; height: auto;
  background: var(--tan);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.hero-sub { margin: 12px 0 4px; font-size: 14px; letter-spacing: 0.5px; opacity: 0.9; }
.hero-tagline { color: var(--orange); font-size: 22px; font-weight: 700; margin: 10px 0 20px; }
.hero-cta {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 30px;
  transition: transform 0.2s ease;
}
.hero-cta:hover { transform: translateY(-2px); }

/* Sections */
main { max-width: 720px; margin: 0 auto; padding: 0 16px; }

.section {
  padding: 48px 8px;
  border-bottom: 1px solid rgba(244,241,234,0.08);
}
.section h2 {
  color: var(--orange);
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 24px;
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* Calendar */
.calendar { background: rgba(244,241,234,0.06); border-radius: 10px; padding: 20px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calendar-nav { background: none; border: none; color: var(--tan); cursor: pointer; padding: 6px; border-radius: 6px; }
.calendar-nav:hover { background: rgba(244,241,234,0.12); }
.calendar-month-label { font-weight: 700; color: var(--tan); }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 12px; opacity: 0.7; margin-bottom: 6px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-grid, .calendar-month-label { transition: opacity 0.15s ease; }
.calendar-transition .calendar-grid, .calendar-transition .calendar-month-label { opacity: 0; }
.calendar-day { aspect-ratio: 1; min-width: 0; width: 100%; min-height: 36px; border: none; border-radius: 6px; background: transparent; color: var(--text-on-dark); font-family: inherit; font-size: 13px; cursor: default; }
.calendar-day.is-empty { visibility: hidden; }
.calendar-day.has-meeting { background: rgba(217,125,61,0.25); cursor: pointer; font-weight: 700; }
.calendar-day.has-meeting:hover { background: rgba(217,125,61,0.4); }
.calendar-day.is-selected { outline: 2px solid var(--orange); }
@keyframes calendar-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217,125,61,0.5); } 50% { box-shadow: 0 0 0 6px rgba(217,125,61,0); } }
.calendar-day.is-next { animation: calendar-pulse 2s ease-in-out infinite; }
.calendar-detail { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.calendar-detail.open { max-height: 240px; margin-top: 6px; }
.calendar-detail-item { padding-top: 12px; }
.calendar-detail-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0; opacity: 0.9; }
.calendar-detail-row .icon svg { width: 16px; height: 16px; flex-shrink: 0; }
.calendar-empty { grid-column: 1 / -1; margin-top: 10px; opacity: 0.7; }

/* Book */
.current-book {
  display: flex;
  gap: 20px;
  align-items: center;
  background: rgba(244,241,234,0.06);
  border-radius: 10px;
  padding: 20px;
}
.book-cover { width: 100px; height: auto; border-radius: 6px; flex-shrink: 0; }
.book-info .label { color: var(--orange); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.more-link { display: inline-block; margin-top: 8px; color: var(--orange); font-weight: 700; font-size: 13px; text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.book-history { margin-top: 20px; font-size: 14px; opacity: 0.85; }
.book-history a { color: var(--tan); text-decoration: none; }
.book-history a:hover { text-decoration: underline; }
.book-history ul { padding-left: 18px; margin: 8px 0 0; }

/* News slider */
.news-slider { position: relative; overflow: hidden; border-radius: 10px; background: rgba(244,241,234,0.06); }
.news-track { min-height: 220px; padding: 24px 48px 40px; }
.news-slide { display: flex; gap: 20px; align-items: flex-start; animation: news-fade-in 0.4s ease; }
@keyframes news-fade-in { from { opacity: 0; } to { opacity: 1; } }
.news-image { width: 140px; height: 140px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.news-body { min-width: 0; }
.news-body h3 { margin: 0 0 8px; color: var(--tan); font-size: 18px; overflow-wrap: break-word; }
.news-body p { margin: 0; font-size: 14px; line-height: 1.5; opacity: 0.9; overflow-wrap: break-word; }
.news-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.news-dot { width: 7px; height: 7px; border-radius: 50%; border: none; background: rgba(244,241,234,0.3); cursor: pointer; padding: 0; }
.news-dot.active { background: var(--orange); }

@media (max-width: 420px) {
  .news-image { width: 90px; height: 90px; }
}
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.35); color: #fff; border: none;
  width: 34px; height: 34px; border-radius: 50%; font-size: 18px; cursor: pointer;
  transition: background 0.2s ease;
}
.slider-btn:hover { background: rgba(0,0,0,0.6); }
.slider-btn.prev { left: 8px; }
.slider-btn.next { right: 8px; }

.empty-note { opacity: 0.7; font-size: 14px; }

/* Icons */
.icon { display: inline-flex; align-items: center; vertical-align: -3px; }
.icon svg { width: 18px; height: 18px; }
h2 .icon svg { width: 22px; height: 22px; vertical-align: -2px; }

/* Registration form (Phase 1, restyled for dark backdrop) */
.card {
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 28px 24px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}
.card h2 { color: var(--teal); font-size: 22px; margin-top: 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; font-weight: 700; }
.field input, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d8d2c2; border-radius: 6px;
  font-family: inherit; font-size: 15px;
}
.field .error { color: #b83b3b; font-size: 13px; display: block; margin-top: 4px; min-height: 16px; }
.honeypot { position: absolute; left: -9999px; top: -9999px; }
.consent { background: var(--tan); border-radius: 8px; padding: 14px 16px; margin: 20px 0; }
.consent p { font-size: 12.5px; line-height: 1.5; margin: 0 0 10px; color: #555; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--teal); }
button[type="submit"] {
  width: 100%; padding: 14px; background: var(--orange); color: #fff; border: none;
  border-radius: 6px; font-size: 16px; font-weight: 700; cursor: pointer;
}
button[type="submit"]:disabled { background: #d8c9b8; cursor: not-allowed; }
.success-message { margin-top: 20px; padding: 16px; background: #e7f3ea; border: 1px solid #b6d9bd; border-radius: 8px; color: #2a5c34; }

/* Footer */
footer {
  max-width: 720px; margin: 0 auto; padding: 32px 16px 56px;
  display: flex; align-items: center; gap: 16px; font-size: 13px; opacity: 0.85;
}
.footer-shield {
  width: 56px; height: auto; flex-shrink: 0;
  background: var(--tan);
  border-radius: 8px;
  padding: 6px;
}
.footer-info p { margin: 2px 0; }
.footer-info a { color: var(--orange); }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
  .hero-cta:hover { transform: none; }
  .calendar-day.is-next { animation: none; }
  .calendar-grid, .calendar-month-label, .calendar-detail { transition: none; }
  .news-slide { animation: none; }
}

/* Book/news detail pages */
.detail-page { max-width: 720px; margin: 0 auto; padding: 32px 16px 56px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--tan); text-decoration: none; font-size: 14px; margin-bottom: 24px; opacity: 0.85; }
.back-link:hover { opacity: 1; }
.book-detail-header { display: flex; gap: 24px; align-items: flex-start; }
.book-detail-cover { width: 140px; height: auto; border-radius: 8px; flex-shrink: 0; }
.book-detail-header > div { min-width: 0; }
.book-detail-header h1 { margin: 0 0 6px; color: var(--tan); font-size: 26px; overflow-wrap: break-word; }
.book-detail-author { margin: 0; opacity: 0.85; }
.book-detail-summary { margin-top: 24px; font-size: 15px; line-height: 1.6; opacity: 0.9; }
.article-date { opacity: 0.7; font-size: 13px; margin: 4px 0 20px; }
.article-hero-image { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; margin-bottom: 20px; }
.article-body p { font-size: 15px; line-height: 1.7; opacity: 0.92; margin: 0 0 14px; overflow-wrap: break-word; }
.article-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 24px; }
.article-gallery-img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; }
.article-files { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.article-file-link { display: inline-flex; align-items: center; gap: 8px; color: var(--orange); text-decoration: none; font-weight: 700; font-size: 14px; }
.article-file-link:hover { text-decoration: underline; }
.article-file-link .icon svg { width: 16px; height: 16px; }
