/* Silly Spaces, sillyspaces.com
   Calm layout: warm paper background, one serif for headings, thin
   hairlines instead of shadows, slow easing everywhere. Light is the
   default; dark overrides sit under [data-theme="dark"] and the system query. */

:root {
  --blue: #4f7fd9;
  --pink: #d9407a;
  --bg: #f6f3ed;
  --surface: #fdfbf7;
  --text: #2a2926;
  --muted: #7c776e;
  --line: rgba(42, 41, 38, 0.11);
  --line-strong: rgba(42, 41, 38, 0.28);
  --tint-blue: rgba(79, 127, 217, 0.10);
  --tint-pink: rgba(217, 64, 122, 0.10);
  --ink: #2a2926;
  --ink-text: #f6f3ed;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --slow: 0.9s;
  --mid: 0.6s;
  --nav-h: 64px;
  --max: 860px;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #1b1a18;
  --surface: #232220;
  --text: #ece8e0;
  --muted: #9a958c;
  --line: rgba(236, 232, 224, 0.12);
  --line-strong: rgba(236, 232, 224, 0.3);
  --tint-blue: rgba(79, 127, 217, 0.18);
  --tint-pink: rgba(217, 64, 122, 0.18);
  --ink: #ece8e0;
  --ink-text: #1b1a18;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1a18;
    --surface: #232220;
    --text: #ece8e0;
    --muted: #9a958c;
    --line: rgba(236, 232, 224, 0.12);
    --line-strong: rgba(236, 232, 224, 0.3);
    --tint-blue: rgba(79, 127, 217, 0.18);
    --tint-pink: rgba(217, 64, 122, 0.18);
    --ink: #ece8e0;
    --ink-text: #1b1a18;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 32px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--slow) var(--ease), color var(--slow) var(--ease);
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; transition: color var(--mid) var(--ease), opacity var(--mid) var(--ease); }
p a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: text-decoration-color var(--mid) var(--ease); }
p a:hover { text-decoration-color: var(--text); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
a, button { touch-action: manipulation; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--ink-text); padding: 10px 16px; border-radius: 10px;
  transition: top var(--mid) var(--ease);
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--slow) var(--ease), background-color var(--slow) var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; height: 100%; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 21px; letter-spacing: -0.01em; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); will-change: opacity, transform; }
/* On the homepage the big logo is the brand until it scrolls under the bar.
   The script adds show-brand once the hero logo is out of view. */
.nav:has(+ main .hero .mark):not(.show-brand) .brand { opacity: 0; transform: translateY(8px) scale(0.96); pointer-events: none; }
.nav-links { display: flex; gap: 26px; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.nav-links a { color: var(--muted); font-size: 15px; }
.nav-links li { display: flex; align-items: center; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

.theme-toggle, .menu-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted);
  transition: background-color var(--mid) var(--ease), color var(--mid) var(--ease);
}
.theme-toggle:hover, .menu-btn:hover { background: var(--line); color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

.menu-btn { display: none; margin-left: auto; flex-direction: column; justify-content: center; align-items: center; }
.menu-btn span { display: block; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform var(--mid) var(--ease), opacity 0.3s; }
.menu-btn span + span { margin-top: 5px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Logo mark ----------
   Two SVGs traced from the original artwork, both drawn in the same
   coordinate box, so stacking them reproduces the logo exactly. Each S
   slides in from its own side, then drifts on its own slow loop, out of
   phase with the other, so they read as two letters leaning on each other. */
.mark { position: relative; aspect-ratio: 876 / 741; --p: 0; }
.mark-s { position: absolute; inset: 0; display: block; will-change: transform; }
.mark-s img { display: block; width: 100%; height: 100%; }
/* --p goes 0 to 1 as the hero scrolls away: the letters ease apart a little */
.mark-blue { transform: translate(calc(var(--p) * -9%), calc(var(--p) * -5%)) rotate(calc(var(--p) * -4deg)); }
.mark-pink { transform: translate(calc(var(--p) * 9%), calc(var(--p) * 5%)) rotate(calc(var(--p) * 4deg)); }
.mark-blue img { animation: s-in-left 1.4s var(--ease) both; }
.mark-pink img { animation: s-in-right 1.4s 0.18s var(--ease) both; }
@keyframes s-in-left { from { opacity: 0; transform: translate(-12%, 5%) rotate(-5deg); } to { opacity: 1; transform: none; } }
@keyframes s-in-right { from { opacity: 0; transform: translate(12%, -5%) rotate(5deg); } to { opacity: 1; transform: none; } }
.brand img { width: 30px; height: 25px; }

/* ---------- Hero ---------- */
.hero { min-height: calc(100vh - var(--nav-h)); min-height: calc(100svh - var(--nav-h)); display: flex; align-items: center; justify-content: center; padding: 48px 0 64px; text-align: center; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: clamp(168px, 24vw, 250px); margin: 0 auto 32px; }
.hero h1 { font-size: clamp(44px, 7.5vw, 84px); line-height: 1.02; margin-bottom: 20px; }
.hero h1 .blue { color: var(--blue); }
.hero h1 .pink { color: var(--pink); }
.hero p { font-size: clamp(18px, 2.2vw, 22px); color: var(--muted); max-width: 560px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 22px; justify-content: center; align-items: center; flex-wrap: wrap; }
.prose-cta { margin-top: 36px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font-size: 16px; font-weight: 500; text-decoration: none;
  transition: background-color var(--mid) var(--ease), color var(--mid) var(--ease), border-color var(--mid) var(--ease), transform var(--mid) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--ink-text); }
.btn-primary:hover { background: var(--blue); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--text); }
.btn-link { display: inline-block; color: var(--text); font-size: 16px; border-bottom: 1px solid var(--line-strong); padding: 10px 0 2px; margin-top: -10px; transition: border-color var(--mid) var(--ease); }
.btn-link:hover { border-color: var(--text); }
.btn-link::after { content: " \2192"; }
.back-link { display: inline-block; margin-bottom: 20px; font-size: 15px; color: var(--muted); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: color var(--mid) var(--ease), border-color var(--mid) var(--ease); }
.back-link::before { content: "\2190 "; }
.back-link:hover { color: var(--text); border-color: var(--text); }

.btn:active { transform: scale(0.97); transition-duration: 0.12s; }

/* Touch screens: no hover lifts that would stick after a tap, a short press instead */
@media (hover: none) {
  .card:hover, .member:hover, .social:hover, .gallery-item:hover, .btn:hover { transform: none; }
  .gallery-item:hover img, .photo:hover img { transform: none; }
  .card:active, .member:active, .social:active, .gallery-item:active, .photo:active, .cal-item:active { transform: scale(0.985); transition-duration: 0.12s; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 14vw, 150px) 0; border-top: 1px solid var(--line); }
.section.alt { background: transparent; }
.section-head { margin: 0 auto 40px; max-width: 560px; text-align: center; }
.eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.section h2 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.12; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }
.section-foot { margin-top: 32px; text-align: center; }

/* Scroll reveal, slow and small */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

/* ---------- Event cards ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); max-width: 760px; margin: 0 auto; }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--line);
  transition: border-color var(--slow) var(--ease), transform var(--slow) var(--ease), background-color var(--slow) var(--ease);
  display: flex; flex-direction: column; gap: 12px;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card h3 { font-size: 28px; line-height: 1.15; }
.card p { margin: 0; color: var(--muted); }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.card .meta span { display: inline-flex; align-items: center; gap: 7px; }
.card .meta svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.card .actions { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.card.wide { grid-column: 1 / -1; display: grid; grid-template-columns: 200px 1fr; gap: 12px 40px; align-items: start; }
.card.wide .date-col { display: flex; flex-direction: column; gap: 4px; }
.card.wide .date-col b { font-family: var(--serif); font-weight: 400; font-size: 64px; line-height: 0.95; }
.card.wide .date-col span { color: var(--muted); font-size: 15px; }
.card.wide .body { display: flex; flex-direction: column; gap: 12px; }
/* a poster sits where the big date would go until the date is known */
.card.wide .poster img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }

.tag { font-size: 13px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.free { background: var(--tint-blue); border-color: transparent; color: var(--blue); }
.tag.pink { background: var(--tint-pink); border-color: transparent; color: var(--pink); }

.empty { color: var(--muted); padding: 32px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); margin: 0 auto; max-width: 560px; text-align: center; }
.empty a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Calendar ---------- */
.cal-toggle { margin-top: 24px; margin-bottom: 0; background: none; border: 0; border-bottom: 1px solid var(--line-strong); padding: 0 0 2px; cursor: pointer; font: inherit; font-size: 16px; color: var(--text); transition: border-color var(--mid) var(--ease); }
.cal-toggle:hover { border-color: var(--text); }
.cal-toggle::after { content: " \2193"; }
.cal-toggle[aria-expanded="true"]::after { content: " \2191"; }
.calendar[hidden] { display: none; }
.calendar { overflow: hidden; margin: 16px auto 0; max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 8px 36px; align-items: start; transition: background-color var(--slow) var(--ease); }
.cal-head { display: flex; align-items: center; justify-content: space-between; grid-column: 1; }
.cal-title { font-size: 20px; }
.cal-nav { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 18px; color: var(--muted); display: grid; place-items: center; transition: border-color var(--mid) var(--ease), color var(--mid) var(--ease); }
.cal-nav:hover { border-color: var(--text); color: var(--text); }
.cal-grid { grid-column: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.cal-dow { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); text-align: center; padding: 4px 0 6px; }
.cal-day, .cal-pad { aspect-ratio: 1; display: grid; place-items: center; position: relative; border-radius: 10px; font-size: 14px; border: 0; background: transparent; color: var(--text); font: inherit; }
.cal-day b { font-weight: 400; }
.cal-day.today b { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.cal-day.has { cursor: pointer; transition: background-color var(--mid) var(--ease); }
.cal-day.has::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--blue); }
.cal-day.has.past::after { background: var(--pink); }
.cal-day.has.up { background: var(--tint-blue); }
.cal-day.has.past { background: var(--tint-pink); }
.cal-day.has:hover { background: var(--line); }
.cal-list { grid-column: 2; grid-row: 1 / 3; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cal-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; font: inherit; color: var(--text); transition: background-color var(--mid) var(--ease); }
.cal-item:hover { background: var(--line); }
.cal-item .d { color: var(--muted); font-size: 14px; min-width: 52px; }
.cal-none { color: var(--muted); padding: 10px 12px; font-size: 15px; }
.cal-legend { grid-column: 1 / -1; margin: 8px 0 0; font-size: 13px; color: var(--muted); display: flex; gap: 16px; align-items: center; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-right: 6px; flex: none; }
.dot.past { background: var(--pink); }

/* ---------- Members ---------- */
.members { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 760px; margin: 0 auto; }
.member {
  display: flex; align-items: center; gap: 14px; flex: 0 1 220px;
  padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--slow) var(--ease), background-color var(--slow) var(--ease);
}
.member:hover { border-color: var(--line-strong); }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 14px; font-weight: 500; letter-spacing: 0.02em; color: var(--text);
  background: var(--tint-blue);
}
.member:nth-child(even) .avatar { background: var(--tint-pink); }
.member strong { font-family: var(--serif); font-weight: 400; font-size: 20px; }
.member.you { border-style: dashed; color: var(--muted); }
.member.you .avatar { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
.member.you strong { color: var(--muted); }

/* ---------- Join form ---------- */
.join-box {
  max-width: 520px; margin: 0 auto; background: var(--surface); border-radius: 20px;
  padding: clamp(24px, 5vw, 40px); border: 1px solid var(--line);
  transition: background-color var(--slow) var(--ease);
}
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
/* "optional" sits at the right edge of the label line */
.field label small { font-size: 12px; color: var(--muted); opacity: 0.8; }
.field input {
  font: inherit; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text);
  transition: border-color var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
}
.field select {
  font: inherit; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text); appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c776e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
  transition: border-color var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
}
.field select:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px var(--line); }
.field select option { color: initial; background: initial; }
.field input::placeholder { color: var(--muted); opacity: 0.7; }
.field input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px var(--line); }
.field input:user-invalid { border-color: var(--pink); }
.check {
  display: flex; align-items: flex-start; gap: 12px; padding: 0 16px; border-radius: 12px;
  background: var(--tint-blue); font-size: 15px;
  max-height: 0; opacity: 0; overflow: hidden; margin-bottom: 0;
  transition: max-height var(--slow) var(--ease), opacity var(--mid) var(--ease), margin var(--slow) var(--ease), padding var(--slow) var(--ease);
}
.check.show { max-height: 140px; opacity: 1; margin-bottom: 18px; padding-top: 14px; padding-bottom: 14px; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--blue); flex: none; }
.check span small { display: block; color: var(--muted); }
.form-note { font-size: 14px; color: var(--muted); margin: 14px 0 0; text-align: center; }
.form-note a { text-decoration: underline; text-underline-offset: 3px; }
.honey { position: absolute; left: -9999px; }

/* ---------- Gallery ---------- */
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.gallery-item {
  flex: 0 1 260px; border: 0; padding: 0; text-align: left; text-decoration: none; background: transparent; cursor: pointer; font: inherit; color: inherit;
  display: flex; flex-direction: column; gap: 12px;
}
.gallery-item .ph { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), opacity var(--slow) var(--ease); }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item .body { display: flex; flex-direction: column; gap: 4px; }
.gallery-item h3 { font-size: 24px; }
.gallery-item .when { font-size: 14px; color: var(--muted); }
.gallery-item p { margin: 0; color: var(--muted); font-size: 15px; }
.gallery-item p + p { margin-top: 4px; }
.gallery-item .count { font-size: 13px; color: var(--muted); margin-top: 2px; border-bottom: 1px solid var(--line-strong); align-self: flex-start; transition: border-color var(--mid) var(--ease); }
.gallery-item:hover .count { border-color: var(--text); }

/* Event page photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; max-width: 860px; margin: 40px auto 0; }
.photo { border: 0; padding: 0; background: var(--surface); border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer; border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease); }
.photo:hover img { transform: scale(1.03); }
.event-page .prose { text-align: left; }
.event-page .eyebrow { margin-bottom: 8px; }
.event-page .empty { margin-top: 40px; }
/* Share button: looks like the text links around it, but it is a button
   because on phones it opens the system share sheet, not a page. */
.share-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 10px 0 2px;
  background: none; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  font: inherit; font-size: 16px; color: var(--text); cursor: pointer;
  transition: border-color var(--mid) var(--ease), color var(--mid) var(--ease);
}
.share-btn:hover { border-color: var(--text); }
.share-btn svg { flex: 0 0 auto; }
.share-btn.is-done { color: var(--muted); pointer-events: none; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(960px, calc(100vw - 32px)); width: 100%; border-radius: 20px; overflow: hidden; }
.lightbox::backdrop { background: rgba(20, 18, 16, 0.55); }
.lightbox[open] { animation: fade-up var(--slow) var(--ease); }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.lb-inner { background: var(--surface); color: var(--text); border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; border: 1px solid var(--line); }
.lb-photos { position: relative; background: var(--bg); aspect-ratio: 4 / 3; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.lightbox.no-photos .lb-photos { display: none; }
.lightbox.no-photos .lb-inner { grid-template-columns: 1fr; }
.lightbox.no-photos { max-width: 520px; }
.lb-photos img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; opacity: 0; transition: opacity var(--slow) var(--ease); }
.lb-photos img.on { opacity: 1; }
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(253, 251, 247, 0.9); color: #2a2926; cursor: pointer; font-size: 20px; display: grid; place-items: center;
  transition: background-color var(--mid) var(--ease);
}
.lb-arrow:hover { background: #fff; }
.lb-arrow.prev { left: 12px; } .lb-arrow.next { right: 12px; }
.lb-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; }
.lb-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); transition: background-color var(--mid) var(--ease); }
.lb-dots i.on { background: #fff; }
.lb-text { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.lb-text h3 { font-size: 28px; }
.lb-text .when { color: var(--muted); font-size: 14px; }
.lb-text p { margin: 0; color: var(--muted); white-space: pre-line; }
.lb-close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: var(--line); color: var(--text); cursor: pointer; font-size: 18px; display: grid; place-items: center;
  transition: background-color var(--mid) var(--ease);
}
.lb-close:hover { background: var(--line-strong); }

/* ---------- FAQ ---------- */
.faq { max-width: 680px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0; font-family: var(--serif); font-size: 21px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  transition: color var(--mid) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--blue); }
.faq summary .plus { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; position: relative; transition: transform var(--slow) var(--ease); }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; background: currentColor; }
.faq summary .plus::before { width: 10px; height: 1.4px; }
.faq summary .plus::after { width: 1.4px; height: 10px; transition: transform var(--slow) var(--ease); }
.faq details[open] summary .plus { transform: rotate(180deg); }
.faq details[open] summary .plus::after { transform: scaleY(0); }
.faq .answer { overflow: hidden; }
.faq .answer p { margin: 0 0 22px; color: var(--muted); padding-right: 40px; }

/* ---------- About teaser ---------- */
.about-teaser { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; }
.about-teaser .art { border-radius: 20px; background: var(--surface); border: 1px solid var(--line); padding: 40px; display: grid; place-items: center; aspect-ratio: 1; }
.about-teaser .art .mark { width: 55%; }
.about-teaser p { color: var(--muted); font-size: 18px; }
.about-teaser h2 { font-size: clamp(30px, 4.6vw, 44px); margin-bottom: 12px; }

/* ---------- Prose page ---------- */
.prose { max-width: 640px; margin: 0 auto; }
.prose h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.05; margin: 0 0 20px; }
.prose h2 { font-size: 28px; margin: 44px 0 12px; }
.prose p { font-size: 18px; color: var(--muted); }
.prose p.lede { font-size: 23px; color: var(--text); font-family: var(--serif); }
.prose ul { color: var(--muted); font-size: 18px; padding-left: 22px; }
.prose li + li { margin-top: 8px; }

/* ---------- Footer / socials ---------- */
.socials { padding: clamp(56px, 8vw, 96px) 0 36px; border-top: 1px solid var(--line); }
/* Three socials plus a wider email tile, so the address stays on one line. */
.social-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(max-content, 1.4fr); gap: 12px; }
.social {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--slow) var(--ease), background-color var(--slow) var(--ease);
}
.social:hover { border-color: var(--line-strong); }
.social svg { width: 20px; height: 20px; flex: none; fill: currentColor; color: var(--muted); }
.social span { font-size: 15px; }
.social small { display: block; font-size: 12px; color: var(--muted); }
.footer { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 22px; display: flex; flex-wrap: wrap; flex-direction: column; align-items: center; gap: 12px 24px; justify-content: center; text-align: center; font-size: 13px; color: var(--muted); }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ---------- Utility pages ---------- */
.center-page { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; text-align: center; padding: 60px 0; }
.center-page .code { font-family: var(--serif); font-size: clamp(90px, 18vw, 160px); line-height: 1; color: var(--muted); }
.center-page h1 { font-size: clamp(32px, 5vw, 48px); margin: 8px 0 12px; }
.center-page p { color: var(--muted); font-size: 18px; max-width: 460px; margin: 0 auto 28px; }
.checkmark { width: 84px; height: 84px; margin: 0 auto 24px; border-radius: 50%; background: var(--tint-blue); display: grid; place-items: center; animation: fade-up var(--slow) var(--ease); }
.checkmark svg { width: 38px; height: 38px; stroke: var(--blue); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 0.9s 0.3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .about-teaser { grid-template-columns: 1fr; gap: 28px; }
  .about-teaser .art { aspect-ratio: 16 / 9; }
  .lb-inner { grid-template-columns: 1fr; }
  .card.wide { grid-template-columns: 1fr; gap: 16px; }
  .calendar { grid-template-columns: 1fr; gap: 8px; padding: 18px; }
  .cal-list { grid-column: 1; grid-row: auto; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
  .card.wide .date-col { flex-direction: row; align-items: baseline; gap: 12px; }
  .card.wide .date-col b { font-size: 48px; }
  .card.wide .poster { max-width: 300px; }
}

@media (max-width: 734px) {
  :root { --nav-h: 56px; }
  body { font-size: 16px; }
  .wrap { width: calc(100% - 36px); }
  .menu-btn { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; margin: 0;
    height: calc(100dvh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    flex-direction: column; gap: 0; padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
    background: var(--bg);
    transform: translateY(-6px); opacity: 0; pointer-events: none;
    transition: transform var(--mid) var(--ease), opacity var(--mid) var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links a { display: block; padding: 18px 0; font-size: 22px; font-family: var(--serif); color: var(--text); }
  .nav-links li.nav-theme { border-bottom: 0; display: flex; justify-content: center; padding: 22px 0; }
  .nav-links li.nav-theme .theme-toggle { width: 48px; height: 48px; border: 1px solid var(--line); color: var(--text); }
  .nav-links li.nav-theme .theme-toggle svg { width: 22px; height: 22px; }
  .menu-btn { order: 3; margin-left: 0; }
  .brand { margin-right: auto; }
  body.menu-open { overflow: hidden; position: fixed; width: 100%; }
  .hero { padding: 24px 0 56px; }
  .footer { padding-bottom: env(safe-area-inset-bottom); }
  .card { padding: 22px; }
  .card h3 { font-size: 24px; }
  .grid { grid-template-columns: 1fr; }
  .gallery-item { flex-basis: 100%; }
  .gallery-item.no-photos .ph { aspect-ratio: 5 / 2; }
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  /* phone: the three socials stand in a row, email gets the full width under them */
  .social-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .social { flex-direction: column; text-align: center; gap: 8px; padding: 14px 6px 12px; min-width: 0; }
  .social span { font-size: 14px; min-width: 0; }
  .social small { font-size: 11px; overflow-wrap: anywhere; }
  .social.mail { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 12px; padding: 14px; text-align: left; }
  .social.mail small { font-size: 12px; }
  .member { flex-basis: calc(50% - 6px); }
  .member { padding: 14px; gap: 10px; }
  .member strong { font-size: 17px; }
  .avatar { width: 36px; height: 36px; font-size: 12px; }
  .lb-text { padding: 20px; }
  /* button groups stack and centre themselves whatever the phone width */
  .hero-cta { flex-direction: column; align-items: center; gap: 14px; }
  .btn { width: 100%; max-width: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
