/* Theme variables are injected inline via _layouts/base.html */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font-family);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 16px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo img { display: block; height: 40px; width: auto; }

.nav-links { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); font-weight: 600; }

.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; cursor: pointer; position: relative; width: 32px; height: 28px; }
.nav-toggle .nav-toggle-bar { position: absolute; left: 5px; right: 5px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 200ms ease, opacity 200ms ease, top 200ms ease; }
.nav-toggle .nav-toggle-bar:nth-child(1) { top: 7px; }
.nav-toggle .nav-toggle-bar:nth-child(2) { top: 13px; }
.nav-toggle .nav-toggle-bar:nth-child(3) { top: 19px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { top: 13px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { top: 13px; transform: rotate(-45deg); }

/* Site banner */
.site-banner { position: sticky; top: 0; z-index: 20; background: var(--banner-bg); color: var(--banner-fg); border-bottom: 1px solid rgba(0,0,0,0.06); }
.site-banner-inner { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 16px; }
.site-banner a { color: inherit; text-decoration: underline; font-weight: 700; }
.site-banner-text { flex: 1; }
.site-banner-close { background: transparent; color: inherit; border: 0; font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.site-banner-close:hover { background: rgba(255,255,255,0.12); }
.site-banner--closing { animation: bannerOut 180ms ease forwards; }
@keyframes bannerOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-6px); } }

/* Hero */
.hero { padding: 72px 0 72px; text-align: center; background: transparent; color: inherit; }
.hero-panel { background: var(--brand); color: #fff; padding: 32px 20px; border-radius: 10px; }
.hero-title { margin: 0; font-weight: 800; line-height: 1.15; font-size: clamp(20px, 3.5vw, 36px); font-family: var(--heading-font-family); }

/* Apply heading font to headers and navbar items */
h1, h2, h3, h4, .nav-links a { font-family: var(--heading-font-family); }

.bubble { background: var(--brand); color: #fff; padding: 16px 20px; border-radius: 12px; display: inline-block; font-size: 18px; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.lead { margin-top: 16px; font-size: 18px; }
.about-text { font-size: 18px; text-align: left; }

/* Sections */
section { padding: 32px 0; }
h2 { margin: 0 0 12px; font-size: 28px; }
h3 { margin: 16px 0 8px; font-size: 20px; }

/* Calendar */
.calendar-wrap { display: flex; justify-content: center; }
.calendar-frame { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: 10px; }
.calendar-note { font-size: 14px; color: #555; margin-top: 8px; }

/* Programs */
.programs-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.program-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: #fff; }
.tag { display: inline-block; background: var(--muted); border: 1px solid var(--border); color: var(--ink); font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.muted { color: #666; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 24px 0 40px; background: #fff; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-links { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; }
.footer small { color: #666; }
.footer .brandmark { height: 28px; width: 28px; border-radius: 6px; display: block; }

/* Rails */
.delimited { position: relative; }
.delimited::before, .delimited::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); pointer-events: none; }
.delimited::before { left: 0; }
.delimited::after { right: 0; }
.page-rails { position: relative; }
.page-rails::before, .page-rails::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); pointer-events: none; z-index: 5; }
.page-rails::before { left: calc((100vw - var(--container-max)) / 2); }
.page-rails::after { right: calc((100vw - var(--container-max)) / 2); }

/* Responsive */
@media (max-width: 800px) {
    .nav-toggle { display: inline-block; }
    .nav-links { position: absolute; top: 60px; right: 0; left: 0; background: #fff; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 0; overflow: hidden; max-height: 0; opacity: 0; transform: translateY(-6px); transition: max-height 220ms ease, opacity 180ms ease, transform 220ms ease; }
    .nav-links li { border-top: none; }
    .nav-links a { display: block; padding: 12px 16px; }
    .nav-links.open { max-height: 360px; opacity: 1; transform: translateY(0); }
    .nav-inner { height: 60px; }
}

@media (max-width: 640px) {
    .nav-inner { height: auto; padding: 10px 0; gap: 12px; }
    .logo img { height: 32px; }
    .bubble { font-size: 16px; }
    .lead { font-size: 16px; }
    .footer-links { display: none; }
}
