:root {
  --bg: #fbfaf5; --ink: #1d2b32; --teal: #265b70; --teal-dark: #034f6e; --mist: #bdcfd3; --line: #dfe5e3;
  --body: "DM Sans", system-ui, sans-serif; --head: "Fahkwang", "DM Sans", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { background: var(--teal); position: sticky; top: 0; z-index: 10; }
.bar { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo img { height: 38px; width: auto; }
.main-nav { display: flex; gap: 28px; }
.main-nav a, .subnav a { color: #fff; text-decoration: none; font-size: 14px; letter-spacing: .02em; padding: 6px 0; border-bottom: 1px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current], .subnav a:hover, .subnav a[aria-current] { border-bottom-color: #fff; }
.subnav { background: var(--teal-dark); display: flex; gap: 26px; justify-content: center; padding: 6px 20px; }
.menu-toggle, .burger { display: none; }

/* hero + home */
.hero { min-height: 62vh; background-size: cover; background-position: center; position: relative; display: flex; align-items: flex-end; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,30,40,.65), rgba(10,30,40,.1) 70%); }
.hero-inner { position: relative; max-width: 1240px; margin: 0 auto; padding: 0 20px 48px; width: 100%; }
.hero h1 { font: 400 clamp(32px, 6vw, 64px)/1.1 var(--head); color: #fff; margin: 0; }
.intro { padding-top: 48px; font-size: 19px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; padding-top: 24px; padding-bottom: 64px; }
.card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20,50,60,.12); }
.card img { aspect-ratio: 4/3; width: 100%; object-fit: cover; }
.card span { display: block; padding: 16px 18px 20px; }
.card h3 { margin: 0 0 6px; font: 400 21px var(--head); color: var(--teal-dark); }
.card p { margin: 0; font-size: 15px; color: #4a5b62; }

/* prose */
.prose { padding-top: 36px; padding-bottom: 36px; max-width: 760px; }
.prose h1, .page-title h1 { font: 400 clamp(30px, 5vw, 46px)/1.15 var(--head); color: var(--teal-dark); margin: 0 0 .6em; }
.prose h2 { font: 400 28px/1.25 var(--head); color: var(--teal-dark); margin: 2em 0 .5em; }
.prose h3 { font: 500 20px/1.3 var(--body); margin: 1.6em 0 .4em; }
.prose h4 { font: 700 16px/1.3 var(--body); margin: 1.4em 0 .2em; text-transform: none; }
.prose p { margin: 0 0 1em; }
.actions { margin: 1.4em 0; }
.btn { display: inline-block; background: var(--teal); color: #fff; text-decoration: none; padding: 10px 22px; border-radius: 2px; font-size: 15px; font-weight: 500; transition: background .2s; }
.btn:hover { background: var(--teal-dark); color: #fff; }
.btn.disabled { background: var(--mist); color: #4a5b62; cursor: default; }
.gallery { padding-bottom: 64px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.grid img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 3px; }

/* workshops */
.page-title { padding: 40px 0 8px; max-width: 760px; }
.lede { font-size: 19px; }
.month h2 { font: 400 28px var(--head); color: var(--teal-dark); margin: 44px 0 6px; padding-bottom: 8px; border-bottom: 2px solid var(--mist); }
.event { display: grid; grid-template-columns: 170px 1fr auto; gap: 8px 28px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: start; }
.when { font: 500 15px/1.5 var(--body); color: var(--teal); padding-top: 4px; }
.event h3 { margin: 0; font: 400 24px/1.25 var(--head); }
.event .sub { margin: 2px 0 0; color: #4a5b62; }
.event.jam .when { color: #8a6a2f; }
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--teal-dark); font-size: 15px; font-weight: 500; }
details .prose { padding-top: 12px; padding-bottom: 6px; font-size: 16px; }
details .prose h4 { font-size: 15px; }

/* footer */
.site-footer { background: var(--teal); color: #e6eef0; padding: 40px 0 48px; margin-top: 24px; }
.site-footer a { color: #fff; }
.small { font-size: 13.5px; opacity: .85; margin: 14px 0 0; }

@media (max-width: 820px) {
  .burger { display: block; width: 28px; height: 22px; position: relative; cursor: pointer; order: 3; }
  .burger span, .burger::before, .burger::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: #fff; }
  .burger span { top: 10px; } .burger::before { top: 3px; } .burger::after { top: 17px; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--teal); flex-direction: column; gap: 0; padding: 8px 20px 18px; }
  .main-nav a { padding: 12px 0; font-size: 16px; }
  .menu-toggle:checked ~ .main-nav { display: flex; }
  .event { grid-template-columns: 1fr; gap: 4px; }
  .act { margin-top: 8px; }
  .hero { min-height: 52vh; }
}

/* event detail, teasers, calendar */
.event .teaser { margin: 8px 0 4px; font-size: 15.5px; color: #3c4d55; max-width: 60ch; }
.event .links { margin: 6px 0 0; font-size: 14px; }
.event h3 a { text-decoration: none; color: inherit; }
.event h3 a:hover { color: var(--teal); text-decoration: underline; }
.detail { max-width: 760px; padding-top: 28px; padding-bottom: 48px; }
.detail h1 { font: 400 clamp(30px, 5vw, 46px)/1.15 var(--head); color: var(--teal-dark); margin: 4px 0 8px; }
.detail .when { color: var(--teal); font-weight: 500; margin: 8px 0 0; }
.detail .prose { padding: 8px 0 12px; }
.crumb { font-size: 14px; margin: 0 0 14px; }
.btn.ghost { background: transparent; color: var(--teal-dark); border: 1px solid var(--teal); padding: 9px 20px; }
.btn.ghost:hover { background: var(--teal); color: #fff; }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 36px 40px; margin-top: 8px; }
.cal-month h2 { font: 400 26px var(--head); color: var(--teal-dark); margin: 0 0 8px; }
.dow, .week { display: grid; grid-template-columns: repeat(7, 1fr); }
.dow span { font-size: 12px; text-align: center; color: #6a7a81; letter-spacing: .08em; padding-bottom: 4px; }
.week { grid-auto-rows: 22px; border-top: 1px solid var(--line); padding-bottom: 6px; column-gap: 2px; }
.week .day { grid-row: 1; font-size: 13px; text-align: center; color: #44565e; height: 24px; line-height: 24px; }
.cal-bar { font-size: 11.5px; line-height: 20px; color: #1d2b32; text-decoration: none; padding: 0 7px; border-radius: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 1px 0; }
.cal-bar:hover { filter: brightness(.93); color: #000; }
.legend { list-style: none; padding: 0; margin: 12px 0 56px; columns: 2 320px; column-gap: 40px; }
.legend li { padding: 5px 0; break-inside: avoid; }
.legend .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 9px; }
.muted { color: #6a7a81; font-size: 14px; }
.cal-list-title { font: 400 24px var(--head); color: var(--teal-dark); margin: 40px 0 0; }
@media (max-width: 560px) { .cal-grid { grid-template-columns: 1fr; } .cal-bar { font-size: 10.5px; padding: 0 4px; } }

/* event photos and bio */
.event { grid-template-columns: 170px 120px 1fr auto; }
.event .thumb { display: block; width: 120px; aspect-ratio: 4/5; border-radius: 4px; overflow: hidden; background: #e8eeed; }
.event .thumb img { width: 100%; height: 100%; object-fit: cover; }
.event-hero { margin: 8px 0 22px; }
.event-hero img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 6px; }
.about-teacher { margin-top: 28px; padding-top: 6px; border-top: 1px solid var(--line); }
.about-teacher h2, .photo-grid h2 { font: 400 26px var(--head); color: var(--teal-dark); margin: 22px 0 4px; }
.photo-grid { margin-top: 28px; }
.photo-grid .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 820px) { .event { grid-template-columns: 1fr; } .event .thumb { width: 100%; max-width: 280px; aspect-ratio: 3/2; } .event .thumb.empty { display: none; } }

/* nav dropdown */
.main-nav .has-sub { position: relative; display: flex; align-items: center; gap: 4px; }
.caret { width: 6px; height: 6px; border-right: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(45deg) translateY(-2px); opacity: .85; }
.sub { display: none; position: absolute; top: 100%; right: 0; min-width: 220px; background: #fff; border-radius: 4px; box-shadow: 0 10px 28px rgba(20,50,60,.18); padding: 8px 0; z-index: 20; }
.main-nav .sub a { display: block; color: var(--ink); padding: 10px 18px; border: 0; font-size: 15px; white-space: nowrap; }
.main-nav .sub a:hover, .main-nav .sub a[aria-current] { background: #eef4f4; color: var(--teal-dark); }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.has-sub::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
/* add to calendar menu */
.addcal { position: relative; display: inline-block; margin: 0; vertical-align: middle; }
.addcal summary { list-style: none; cursor: pointer; display: inline-block; border: 1px solid var(--teal); color: var(--teal-dark); padding: 9px 18px; border-radius: 2px; font-size: 15px; font-weight: 500; background: transparent; }
.addcal summary::-webkit-details-marker { display: none; }
.addcal summary::after { content: " ▾"; font-size: 12px; }
.addcal summary:hover, .addcal[open] summary { background: var(--teal); color: #fff; }
.addcal .menu { position: absolute; z-index: 15; left: 0; top: calc(100% + 6px); min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 12px 30px rgba(20,50,60,.18); padding: 6px 0; }
.addcal .menu a { display: block; padding: 9px 16px; text-decoration: none; color: var(--ink); font-size: 15px; }
.addcal .menu a:hover { background: #eef4f4; color: var(--teal-dark); }
.addcal .menu .note { display: block; padding: 8px 16px 6px; font-size: 12.5px; color: #6a7a81; border-top: 1px solid var(--line); margin-top: 4px; }
.event .links { display: flex; gap: 18px; align-items: center; margin-top: 10px; font-size: 14px; }
.event .links .addcal summary { padding: 5px 12px; font-size: 14px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
@media (max-width: 820px) {
  .has-sub { display: block; } .caret { display: none; } .has-sub::after { display: none; }
  .sub { display: block; position: static; box-shadow: none; background: transparent; padding: 0 0 0 16px; min-width: 0; }
  .main-nav .sub a { color: #dbe9ee; padding: 8px 0; font-size: 15px; background: transparent; }
  .main-nav .sub a:hover { background: transparent; color: #fff; }
  .addcal .menu { left: 0; right: auto; max-width: calc(100vw - 40px); }
}
