/* ============================================================
   BETTER TOGETHER — THEMES + POSTER TYPOGRAPHY LAYER
   Light (sand) · Blue (klein) · Dark (graphite)
   ============================================================ */

/* ---------- theme tokens ---------- */
html[data-theme="blue"] body {
  --ink:#F5F1E8; --ink-soft:rgba(245,241,232,0.78); --rule:rgba(245,241,232,0.22);
  background-color:var(--klein); background-image:none; color:var(--ink);
}
html[data-theme="dark"] body {
  --ink:#F5F1E8; --ink-soft:rgba(245,241,232,0.74); --rule:rgba(245,241,232,0.16);
  background-color:var(--graphite); background-image:none; color:var(--ink);
}

/* accents flip to rose on colored grounds */
html[data-theme="blue"] .kicker, html[data-theme="dark"] .kicker { color:var(--rose); }
html[data-theme="blue"] .closing-line, html[data-theme="dark"] .closing-line { color:var(--rose); }
html[data-theme="blue"] .sec-index, html[data-theme="dark"] .sec-index { color:var(--rose); }

/* bands re-map for contrast */
html[data-theme="dark"] section.band.graphite { background-color:#1B2027; }
html[data-theme="blue"] header.site { border-bottom:1px solid rgba(245,241,232,0.2); }
html[data-theme="dark"] header.site { background-color:#1B2027; }

/* surfaces */
html[data-theme="blue"] .g-card, html[data-theme="dark"] .g-card,
html[data-theme="blue"] .entry, html[data-theme="dark"] .entry,
html[data-theme="blue"] .member-card, html[data-theme="dark"] .member-card,
html[data-theme="blue"] .apply-card, html[data-theme="dark"] .apply-card {
  background:rgba(245,241,232,0.05);
}
html[data-theme="blue"] .g-card:hover, html[data-theme="dark"] .g-card:hover { box-shadow:0 8px 30px rgba(0,0,0,.3); }
html[data-theme="blue"] .cal-row:hover, html[data-theme="dark"] .cal-row:hover { background:rgba(245,241,232,0.05); }

/* labels & keys on colored grounds */
html[data-theme="blue"] .spec-row .k, html[data-theme="dark"] .spec-row .k,
html[data-theme="blue"] .g-card .g-date, html[data-theme="dark"] .g-card .g-date,
html[data-theme="blue"] .cal-month .cal-label, html[data-theme="dark"] .cal-month .cal-label,
html[data-theme="blue"] .cal-st, html[data-theme="dark"] .cal-st,
html[data-theme="blue"] .g-card .g-status, html[data-theme="dark"] .g-card .g-status,
html[data-theme="blue"] .entry .e-ch, html[data-theme="dark"] .entry .e-ch {
  color:var(--rose);
}
html[data-theme="blue"] .cal-month .cal-label, html[data-theme="dark"] .cal-month .cal-label { border-bottom-color:var(--rose); }
html[data-theme="blue"] .s-trow.head, html[data-theme="dark"] .s-trow.head { border-bottom-color:var(--rose); }

/* pills */
html[data-theme="blue"] .pill, html[data-theme="dark"] .pill { background:rgba(245,241,232,0.12); color:var(--ink); }

/* buttons */
html[data-theme="blue"] .btn.outline, html[data-theme="dark"] .btn.outline {
  border-color:var(--sand); color:var(--sand);
}
html[data-theme="blue"] .btn.outline:hover, html[data-theme="dark"] .btn.outline:hover { background:var(--sand); color:var(--graphite); }
html[data-theme="dark"] .btn.blue, html[data-theme="dark"] .btn.block { background:var(--sand); color:var(--graphite); }
html[data-theme="dark"] .btn.blue .btn-x, html[data-theme="dark"] .btn.block .btn-x { color:var(--graphite); }

/* forms */
html[data-theme="blue"] .field input, html[data-theme="dark"] .field input,
html[data-theme="blue"] .field select, html[data-theme="dark"] .field select,
html[data-theme="blue"] .field textarea, html[data-theme="dark"] .field textarea {
  background:rgba(245,241,232,0.08); color:var(--ink);
}
html[data-theme="blue"] .field label, html[data-theme="dark"] .field label { color:var(--ink-soft); }

/* marquee strokes */
html[data-theme="blue"] .mq-item, html[data-theme="dark"] .mq-item { -webkit-text-stroke-color:rgba(245,241,232,0.7); }
html[data-theme="blue"] .mq-item.fill, html[data-theme="dark"] .mq-item.fill { color:var(--sand); -webkit-text-stroke:0; }

/* home hero + gatherings head on colored grounds */
html[data-theme="blue"] .hero h1 span, html[data-theme="dark"] .hero h1 span { color:var(--sand); }
html[data-theme="blue"] .hp-outline, html[data-theme="dark"] .hp-outline { -webkit-text-stroke-color:rgba(245,241,232,0.85); }
html[data-theme="blue"] .hero .kicker { color:var(--rose); }
html[data-theme="blue"] .hero img.stamp, html[data-theme="dark"] .hero img.stamp { filter:invert(0.93); }
html[data-theme="blue"] .ev-hero { background-color:transparent; border-bottom:1px solid var(--rule); }
html[data-theme="dark"] .gate .left { background-color:transparent; border-right:1px solid var(--rule); }
html[data-theme="blue"] .gate .left { background-color:transparent; border-right:1px solid var(--rule); }

/* gatherings toggles + type key on themes */
html[data-theme="blue"] .type-key b, html[data-theme="dark"] .type-key b { color:var(--rose); }
html[data-theme="blue"] .view-toggle button.on, html[data-theme="dark"] .view-toggle button.on {
  background:var(--sand); border-color:var(--sand); color:var(--graphite);
}
html[data-theme="blue"] .view-toggle button, html[data-theme="dark"] .view-toggle button { color:var(--ink); border-color:var(--rule); }

/* tabs / dash on themes */
html[data-theme="blue"] .tabs button.on, html[data-theme="dark"] .tabs button.on { color:var(--rose); border-bottom-color:var(--rose); }
html[data-theme="blue"] .dash-head, html[data-theme="dark"] .dash-head { background-color:rgba(0,0,0,0.25); }

/* header dots ---------- */
.theme-dots { display:flex; gap:8px; align-items:center; margin-left:26px; }
.theme-dots .td {
  width:15px; height:15px; border-radius:50%; cursor:pointer; border:1.5px solid rgba(245,241,232,0.5);
  padding:0; transition:transform .2s, box-shadow .2s;
}
.theme-dots .td:hover { transform:scale(1.2); }
.td-blue { background:#002FA7; }
.td-dark { background:#121417; }
html[data-theme="blue"] .td-blue, html[data-theme="dark"] .td-dark {
  box-shadow:0 0 0 2px var(--klein-ring, rgba(245,241,232,0.9));
}

/* ---------- real imagery in placeholders ---------- */
.ph > img.ph-img {
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  filter:saturate(0.92) contrast(1.03);
}
.ph:has(> img.ph-img) .ph-label { display:none; }
.ph::after { z-index:1; }
.ph.video::before { z-index:2; }
.g-idx { z-index:2; }

/* ---------- poster hero (home) ---------- */
.hero-poster {
  min-height:calc(100vh - 64px); display:flex; flex-direction:column; justify-content:center;
  position:relative; padding:40px 4vw 90px; text-align:left; overflow:hidden;
}
.hp-type { position:relative; z-index:2; }
.hp-line {
  display:block; font-family:'Marcellus',serif; text-transform:uppercase;
  font-size:clamp(64px,14.6vw,224px); line-height:0.9; letter-spacing:0.5px; color:var(--klein);
  overflow:hidden;
}
.hp-line > span { display:block; transform:translateY(105%); animation:hp-up 1s cubic-bezier(.22,1,.36,1) .25s forwards; }
.hp-line.two > span { animation-delay:.4s; }
.hero.hero-poster h1 { opacity:1 !important; animation:none !important; }
@keyframes hp-up { to { transform:none; } }
.hp-outline > span { color:transparent; -webkit-text-stroke:2px var(--klein); }
.hero img.hp-stamp {
  position:absolute; right:6vw; top:12vh; width:clamp(110px,14vw,210px); margin:0; z-index:3;
  animation:spin-slow 60s linear infinite;
}
.hp-foot {
  display:flex; justify-content:space-between; align-items:baseline; gap:20px; flex-wrap:wrap;
  margin-top:7vh; border-top:1px solid var(--rule); padding-top:22px;
}
.hp-foot .kicker { letter-spacing:4px; }
.hp-coords { font-family:'IBM Plex Mono',monospace; font-size:9.5px; letter-spacing:2px; color:var(--ink-soft); text-transform:uppercase; }
.hp-side {
  position:absolute; right:18px; top:50%; transform:rotate(90deg) translateX(-50%); transform-origin:right top;
  font-family:'IBM Plex Mono',monospace; font-size:9px; letter-spacing:3px; text-transform:uppercase; color:var(--ink-soft);
  white-space:nowrap; z-index:1;
}

/* ---------- ghost numerals ---------- */
section.band { position:relative; }
.ghost-num {
  position:absolute; top:28px; right:-10px; z-index:0; pointer-events:none;
  font-family:'Marcellus',serif; font-size:clamp(120px,17vw,260px); line-height:1;
  color:transparent; -webkit-text-stroke:1.2px rgba(18,20,23,0.09);
}
section.band.dark .ghost-num, section.band.graphite .ghost-num { -webkit-text-stroke-color:rgba(245,241,232,0.09); }
html[data-theme="blue"] .ghost-num, html[data-theme="dark"] .ghost-num { -webkit-text-stroke-color:rgba(245,241,232,0.09); }
section.band > .wrap { position:relative; z-index:1; }

/* ---------- orbit badge ---------- */
#orbit-badge {
  position:fixed; right:26px; bottom:26px; width:104px; height:104px; z-index:150;
  display:flex; align-items:center; justify-content:center;
}
#orbit-badge::before {
  content:''; position:absolute; inset:-4px; border-radius:50%;
  background:var(--sand); box-shadow:0 8px 28px rgba(0,0,0,0.16);
}
#orbit-badge svg { position:absolute; inset:0; animation:spin-slow 34s linear infinite; }
#orbit-badge svg text {
  font-family:'IBM Plex Mono',monospace; font-size:9.2px; letter-spacing:1.5px; text-transform:uppercase;
  fill:var(--klein);
}
#orbit-badge .ob-c {
  position:relative; width:40px; height:40px; border-radius:50%; background:var(--klein); color:var(--sand);
  display:flex; align-items:center; justify-content:center; font-size:15px; transition:transform .25s;
}
#orbit-badge:hover .ob-c { transform:scale(1.14); }

/* ---------- calendar preview scrim (image legibility) ---------- */
#cal-preview::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(to top, rgba(18,20,23,0.7), rgba(18,20,23,0) 55%);
}
#cal-preview span { position:relative; z-index:1; color:rgba(245,241,232,0.92); }

/* ---------- mixed italic accent ---------- */
.it-mix { font-family:'Cormorant Garamond',serif; font-style:italic; text-transform:none; letter-spacing:0; }

/* ---------- mobile hardening ---------- */
@media (max-width: 900px) {
  body .hero-poster { padding:24px 20px 60px; }
  body .hero img.hp-stamp { right:20px; top:8vh; }
  body .hp-side { display:none; }
  body .ev-strip { grid-template-columns:1fr 1fr; }
  body .ev-strip .cell:nth-child(2n) { border-right:none; }
  body .ev-strip .cell { border-bottom:1px solid var(--rule-light); }
  body .mosaic { grid-template-columns:1fr 1fr; grid-template-rows:180px 150px 150px; }
  body .mosaic .ph:first-child { grid-column:span 2; grid-row:auto; height:180px; }
  body .act { grid-template-columns:1fr; gap:16px; }
  body .act .no { font-size:38px; }
  body .act .ph { margin-top:6px; }
  body .dash-tabs { overflow-x:auto; white-space:nowrap; gap:22px; -webkit-overflow-scrolling:touch; }
  body .dir-grid { grid-template-columns:1fr; }
  body .stat-row { gap:30px; }
  body .shelf { grid-template-columns:1fr 1fr; }
  body .format-grid { grid-template-columns:1fr; }
  body #orbit-badge { display:none; }
  body .theme-dots { margin-left:0; }
  body .toc-item { grid-template-columns:1fr; gap:6px; }
  body .split { gap:40px; }
  body .booking { grid-template-columns:1fr 1fr; row-gap:6px; }
}
@media (max-width: 640px) {
  body header.site .tagline { display:none; }
  body .hero.hero-poster { min-height:86vh; }
  body .hero img.hp-stamp { top:6vh; width:110px; }
}
@media (max-width: 560px) {
  body .shelf { grid-template-columns:1fr; }
  body .ev-strip { grid-template-columns:1fr; }
  body .ev-strip .cell { border-right:none; }
  body .cal-row { grid-template-columns:78px 1fr; }
}


/* ============================================================
   NO MIXED GROUNDS — blue theme: sections are klein or sand;
   dark theme: sections are graphite-family or sand. Never both.
   ============================================================ */

/* ---- blue: colored bands become white (sand) sections ---- */
html[data-theme="blue"] section.band.dark,
html[data-theme="blue"] section.band.graphite {
  background-color:var(--sand); color:var(--graphite);
  --ink:#121417; --ink-soft:rgba(18,20,23,0.72); --rule:rgba(18,20,23,0.16);
}
html[data-theme="blue"] .band.dark p.lede, html[data-theme="blue"] .band.graphite p.lede,
html[data-theme="blue"] .band.dark p.body-c, html[data-theme="blue"] .band.graphite p.body-c { color:rgba(18,20,23,0.75); }
html[data-theme="blue"] .band.dark .ghost-num, html[data-theme="blue"] .band.graphite .ghost-num { -webkit-text-stroke-color:rgba(18,20,23,0.08); }
html[data-theme="blue"] .band.dark .spec-row, html[data-theme="blue"] .band.graphite .spec-row { border-bottom-color:rgba(18,20,23,0.18); }
html[data-theme="blue"] .band.dark .spec-row .k, html[data-theme="blue"] .band.graphite .spec-row .k { color:var(--klein); }
html[data-theme="blue"] .band.dark .btn.outline, html[data-theme="blue"] .band.graphite .btn.outline { border-color:var(--graphite); color:var(--graphite); }
html[data-theme="blue"] .band.dark .btn.outline:hover, html[data-theme="blue"] .band.graphite .btn.outline:hover { background:var(--graphite); color:var(--sand); }
html[data-theme="blue"] .band.dark .g-card, html[data-theme="blue"] .band.graphite .g-card,
html[data-theme="blue"] .band.dark .entry, html[data-theme="blue"] .band.graphite .entry {
  background:rgba(18,20,23,0.04);
}
html[data-theme="blue"] .band.dark .pill, html[data-theme="blue"] .band.graphite .pill { background:rgba(18,20,23,0.07); }
html[data-theme="blue"] .band.dark .field input, html[data-theme="blue"] .band.dark .field select,
html[data-theme="blue"] .band.dark .field textarea { background:rgba(18,20,23,0.05); }
html[data-theme="blue"] .band.dark .field input, html[data-theme="blue"] .band.dark .field select,
html[data-theme="blue"] .band.dark .field textarea { color:#121417; border-color:rgba(18,20,23,0.2); }
html[data-theme="blue"] .band.dark .apply-card, html[data-theme="blue"] .band.graphite .apply-card {
  background:rgba(18,20,23,0.04); border-color:rgba(18,20,23,0.18);
}
html[data-theme="blue"] .band.dark .mq-item, html[data-theme="blue"] .band.graphite .mq-item { -webkit-text-stroke-color:rgba(18,20,23,0.5); }
html[data-theme="blue"] .band.dark .mq-item.fill, html[data-theme="blue"] .band.graphite .mq-item.fill { color:var(--graphite); }
/* klein buttons read on sand bands; sand buttons on klein page */
html[data-theme="blue"] .btn.blue { background:var(--sand); color:var(--graphite); }
html[data-theme="blue"] .btn.blue:hover { background:var(--rose); color:var(--graphite); }
html[data-theme="blue"] .band.dark .btn.blue, html[data-theme="blue"] .band.graphite .btn.blue { background:var(--klein); color:var(--sand); }
html[data-theme="blue"] .band.dark .btn.blue:hover, html[data-theme="blue"] .band.graphite .btn.blue:hover { background:var(--graphite); color:var(--rose); }

/* ---- blue: graphite chrome becomes klein-family ---- */
html[data-theme="blue"] footer.site { background-color:var(--klein); border-top:1px solid rgba(245,241,232,0.25); }
html[data-theme="blue"] .arch-hero { background-color:transparent; border-bottom:1px solid var(--rule); }
html[data-theme="blue"] .dash-head { background-color:transparent; border-bottom:1px solid var(--rule); }

/* ---- dark: klein bands become elevated black ---- */
html[data-theme="dark"] section.band.dark { background-color:#1B2027; }
html[data-theme="dark"] .btn.blue:hover, html[data-theme="dark"] .btn.block:hover { background:var(--rose); color:var(--graphite); }

/* ---- shared: klein accents that sat on colored grounds ---- */
html[data-theme="blue"] ::selection, html[data-theme="dark"] ::selection { background:var(--rose); color:var(--graphite); }
html[data-theme="blue"] body::-webkit-scrollbar-thumb, html[data-theme="dark"] body::-webkit-scrollbar-thumb { background:rgba(245,241,232,0.35); }
html[data-theme="blue"] .sec-index::after, html[data-theme="dark"] .sec-index::after { background:var(--rose); }
html[data-theme="blue"] .band.dark .sec-index::after, html[data-theme="blue"] .band.graphite .sec-index::after { background:var(--klein); }
html[data-theme="blue"] .band.dark .kicker, html[data-theme="blue"] .band.graphite .kicker { color:var(--klein); }
html[data-theme="blue"] .band.dark .closing-line, html[data-theme="blue"] .band.graphite .closing-line { color:var(--klein); }
html[data-theme="blue"] .band.dark .sec-index, html[data-theme="blue"] .band.graphite .sec-index { color:var(--klein); }

/* smooth ground transitions when switching themes */
body, section.band, footer.site, header.site {
  transition: background-color .55s ease, color .55s ease;
}
