/* ============================================================
   Tandava Journey — guest journey platform prototype
   Built by Astral for Tandava Retreats · demo, not live
   System: sacred processional. One vertical thread.
   Sage is the only chromatic voice. Terracotta appears once.
   ============================================================ */

:root {
  --sage: #6e8c75;
  --sage-deep: #4f6a57;
  --sage-mist: #6e8c7522;
  --sage-faint: #6e8c7510;
  --terracotta: #d14424;
  --ink: #1c1c1a;
  --slate: #758696;
  --paper: #fffcf0;
  --oat: #f4f5f0;
  --sand: #efead8;
  --line: #e7e2d4;

  --font-head: "Sawarabi Mincho", serif;
  --font-body: "PT Serif", serif;
  --font-mono: "IBM Plex Mono", monospace;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;

  --shadow-sm: 0 1px 2px rgba(28, 28, 26, 0.04), 0 2px 8px rgba(28, 28, 26, 0.04);
  --shadow-md: 0 2px 6px rgba(28, 28, 26, 0.05), 0 12px 32px rgba(28, 28, 26, 0.07);

  --ease-sacred: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.005em;
}

h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }

p { max-width: 62ch; }

a { color: var(--sage-deep); text-decoration: none; transition: color 0.3s var(--ease-sacred); }
a:hover { color: var(--sage); }

img { display: block; max-width: 100%; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}

.mono.sage { color: var(--sage-deep); }

/* ---------- demo banner ---------- */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--sand);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
}
.demo-banner a { color: var(--sand); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 1.85rem;
  z-index: 50;
}

.wordmark {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.wordmark small {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.nav-actions { display: flex; align-items: center; gap: 1.1rem; }

.lang-toggle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--slate);
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: all 0.3s var(--ease-sacred);
}
.lang-toggle:hover { border-color: var(--sage); color: var(--sage-deep); }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.85rem 1.7rem;
  border-radius: 2px;
  border: 1px solid var(--sage-deep);
  color: var(--sage-deep);
  background: transparent;
  cursor: pointer;
  transition: all 0.35s var(--ease-sacred);
}
.btn:hover { background: var(--sage-deep); color: var(--paper); }
.btn.solid { background: var(--sage-deep); color: var(--paper); }
.btn.solid:hover { background: var(--sage); border-color: var(--sage); }
.btn.ghost { border-color: var(--line); color: var(--slate); }
.btn.ghost:hover { border-color: var(--sage); color: var(--sage-deep); background: transparent; }
.btn.small { padding: 0.5rem 1rem; font-size: 0.66rem; }

/* ---------- hero (marketing) ---------- */
.hero {
  position: relative;
  min-height: clamp(540px, 88vh, 880px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(255,252,240,0.08) 0%, rgba(255,252,240,0.55) 62%, var(--paper) 100%);
}
.hero-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: var(--space-xl) clamp(1.25rem, 4vw, 3rem) var(--space-lg);
}
.hero-inner .kicker { margin-bottom: 1.2rem; }
.hero-inner h1 { max-width: 17ch; margin-bottom: 1.4rem; }
.hero-inner .lede { font-size: 1.15rem; color: var(--ink); max-width: 52ch; margin-bottom: 2.2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- sections ---------- */
.section {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: var(--space-xl) clamp(1.25rem, 4vw, 3rem);
}
.section.tight { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.section .kicker { margin-bottom: 1rem; }
.section h2 { margin-bottom: 1.4rem; max-width: 24ch; }
.section .intro { font-size: 1.1rem; color: var(--slate); max-width: 56ch; }

.band { background: var(--oat); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-sand { background: var(--sand); }

/* ---------- the spine (marketing + portal) ---------- */
.spine {
  position: relative;
  margin: var(--space-lg) 0 0;
  padding-left: 2.4rem;
}
.spine::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--sage) 0%, var(--sage) 70%, var(--line) 100%);
}
.spine-phase { margin-bottom: var(--space-lg); position: relative; }
.spine-phase:last-child { margin-bottom: 0; }

.spine-node {
  position: relative;
  padding-bottom: 1.7rem;
}
.spine-node:last-child { padding-bottom: 0; }
.spine-node::before {
  content: "";
  position: absolute;
  left: -2.4rem;
  top: 0.42rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--sage);
  margin-left: 5.5px;
}
.spine-node.done::before { background: var(--sage); }
.spine-node.current::before {
  background: var(--sage);
  box-shadow: 0 0 0 5px var(--sage-mist), 0 0 18px 2px var(--sage-mist);
}
.spine-node.locked::before { border-color: var(--line); }
.spine-node.locked { color: var(--slate); }
.spine-node .when { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); display: block; margin-bottom: 0.15rem; }
.spine-node strong { font-weight: 700; }
.spine-node .note { color: var(--slate); font-size: 0.95rem; }
.spine-node.ceremony-node::before { border-color: var(--terracotta); }
.spine-node.ceremony-node.done::before, .spine-node.ceremony-node.current::before { background: var(--terracotta); box-shadow: 0 0 0 5px #d144241e; }

.phase-label {
  display: inline-flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}
.phase-label h3 { font-size: 1.35rem; }
.phase-label .mono { font-size: 0.66rem; }

/* ---------- phase cards (marketing) ---------- */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
  gap: 1.2rem;
  margin-top: var(--space-md);
}
.phase-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.phase-card img { width: 100%; height: 190px; object-fit: cover; filter: saturate(0.88); }
.phase-card .pad { padding: 1.4rem 1.5rem 1.7rem; }
.phase-card .mono { display: block; margin-bottom: 0.5rem; }
.phase-card h3 { margin-bottom: 0.6rem; }
.phase-card p { font-size: 0.96rem; color: var(--slate); }

/* ---------- module grid ---------- */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: var(--space-md);
}
.module {
  background: var(--paper);
  padding: 1.6rem 1.5rem 1.8rem;
}
.module .mono { display: block; margin-bottom: 0.7rem; }
.module h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.module p { font-size: 0.93rem; color: var(--slate); }

/* ---------- trust strip ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}
.trust-item .big {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--sage-deep);
  display: block;
  margin-bottom: 0.3rem;
}
.trust-item p { font-size: 0.93rem; color: var(--slate); }

/* ---------- full-bleed CTA ---------- */
.bleed-cta {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
.bleed-cta img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.bleed-cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(28,28,26,0.45); }
.bleed-cta .inner { padding: var(--space-lg) 1.5rem; color: var(--paper); }
.bleed-cta h2 { color: var(--paper); margin: 0 auto 1.2rem; }
.bleed-cta p { color: #fffcf0cc; margin: 0 auto 2rem; }
.bleed-cta .btn { border-color: var(--paper); color: var(--paper); }
.bleed-cta .btn:hover { background: var(--paper); color: var(--ink); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: var(--space-md) clamp(1.25rem, 4vw, 3rem) var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: baseline;
  color: var(--slate);
  font-size: 0.9rem;
}

/* ============================================================
   PORTAL (guest view)
   ============================================================ */

.portal-head {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: var(--space-lg) clamp(1.25rem, 4vw, 2rem) var(--space-md);
}
.portal-head .day-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  border: 1px solid var(--sage);
  border-radius: 999px;
  padding: 0.32rem 0.9rem;
  margin-bottom: 1.3rem;
}
.portal-head h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 0.7rem; }
.portal-head .sub { color: var(--slate); font-size: 1.05rem; }

.upnext {
  width: min(880px, calc(100% - 2.5rem));
  margin: var(--space-md) auto 0;
  background: var(--paper);
  border: 1px solid var(--sage);
  border-left: 3px solid var(--sage);
  border-radius: 3px;
  box-shadow: var(--shadow-md);
  padding: 1.3rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.6rem;
}
.upnext .what { flex: 1 1 260px; }
.upnext .what .mono { display: block; margin-bottom: 0.35rem; }
.upnext .what strong { font-size: 1.1rem; font-family: var(--font-head); font-weight: 400; }
.upnext .what p { color: var(--slate); font-size: 0.92rem; margin-top: 0.2rem; }

/* tabs */
.tabs {
  position: sticky;
  top: 1.85rem;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  margin-top: var(--space-md);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs .inner {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  display: flex;
  gap: 1.6rem;
  white-space: nowrap;
}
.tab {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--slate);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.95rem 0.1rem;
  cursor: pointer;
  transition: color 0.3s var(--ease-sacred);
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--sage-deep); border-bottom-color: var(--sage); }

.panel { display: none; width: min(880px, 100%); margin: 0 auto; padding: var(--space-md) clamp(1.25rem, 4vw, 2rem) var(--space-xl); }
.panel.active { display: block; animation: rise 0.5s var(--ease-sacred); }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* practice checklist */
.practice-day { margin-bottom: var(--space-md); }
.practice-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.practice-item .box {
  flex: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--sage);
  border-radius: 50%;
  margin-top: 0.2rem;
  display: grid;
  place-items: center;
  transition: background 0.3s var(--ease-sacred);
}
.practice-item.done .box { background: var(--sage); }
.practice-item.done .box::after { content: "✓"; color: var(--paper); font-size: 0.7rem; }
.practice-item.done .label { color: var(--slate); }
.practice-item .label strong { display: block; font-weight: 700; }
.practice-item .label span { color: var(--slate); font-size: 0.92rem; }

.tended { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage-deep); margin-top: 1.1rem; }

/* cards inside panels */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.card.oat { background: var(--oat); }
.card.sand { background: var(--sand); border-color: #e0d8bf; }
.card h3 { margin-bottom: 0.6rem; }
.card .mono { display: block; margin-bottom: 0.5rem; }
.card p { font-size: 0.97rem; }
.card p + p { margin-top: 0.6rem; }
.card ul { margin: 0.6rem 0 0 1.1rem; font-size: 0.97rem; }
.card li { margin-bottom: 0.35rem; }

.call-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
}
.call-row:last-child { border-bottom: none; }
.call-row .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--sage); }
.call-row.done .dot { background: var(--sage); }
.call-row.next .dot { background: var(--sage); box-shadow: 0 0 0 4px var(--sage-mist); }
.call-row .meta { flex: 1 1 220px; }
.call-row .meta strong { display: block; }
.call-row .meta span { color: var(--slate); font-size: 0.9rem; }
.call-row .mono { font-size: 0.64rem; }

/* ceremony window — the one terracotta moment */
.ceremony-banner {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  isolation: isolate;
  margin-bottom: var(--space-md);
  min-height: 230px;
  display: flex;
  align-items: flex-end;
}
.ceremony-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.ceremony-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 20%, rgba(28,28,26,0.55)); }
.ceremony-banner .inner { padding: 1.5rem; color: var(--paper); }
.ceremony-banner .mono { color: #ffd9cd; }
.ceremony-banner h3 { color: var(--paper); font-size: 1.5rem; }

.checklist .practice-item .box { border-radius: 2px; }

/* journal */
.journal-entry { border-left: 2px solid var(--sage); padding: 0.2rem 0 0.2rem 1.2rem; margin-bottom: var(--space-md); }
.journal-entry .when { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--slate); display: block; margin-bottom: 0.4rem; }
.journal-entry p { font-style: italic; color: #3d3d39; }

.prompt-card textarea {
  width: 100%;
  min-height: 110px;
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1rem;
  color: var(--ink);
  resize: vertical;
}
.prompt-card textarea:focus { outline: none; border-color: var(--sage); }

/* messages */
.thread { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: var(--space-md); }
.msg { max-width: 78%; padding: 0.85rem 1.1rem; border-radius: 3px; font-size: 0.97rem; }
.msg.them { background: var(--oat); border: 1px solid var(--line); align-self: flex-start; }
.msg.me { background: var(--sage-faint); border: 1px solid var(--sage-mist); align-self: flex-end; }
.msg .who { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--slate); display: block; margin-bottom: 0.3rem; }

.support-line {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

/* integration graph */
.graph-card svg { width: 100%; height: auto; margin-top: 0.6rem; }

/* ============================================================
   FACILITATOR VIEW
   ============================================================ */

.fac-wrap { width: min(1080px, 100%); margin: 0 auto; padding: var(--space-md) clamp(1.25rem, 4vw, 3rem) var(--space-xl); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: var(--space-md) 0; }
.stat { background: var(--paper); padding: 1.2rem 1.3rem; }
.stat .big { font-family: var(--font-head); font-size: 2rem; display: block; color: var(--ink); }
.stat.warn .big { color: var(--terracotta); }
.stat .mono { font-size: 0.64rem; }

.cohort { border: 1px solid var(--line); background: var(--paper); }
.cohort-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.7fr 1fr 1.2fr;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.25s var(--ease-sacred);
}
.cohort-row:hover { background: var(--oat); }
.cohort-row:last-child { border-bottom: none; }
.cohort-row.head { cursor: default; background: var(--oat); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--slate); }
.cohort-row.head:hover { background: var(--oat); }
.cohort-row .name strong { display: block; }
.cohort-row .name span { font-size: 0.85rem; color: var(--slate); }
.cohort-row.flagged { background: #d144240a; }
.cohort-row.flagged:hover { background: #d1442414; }

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  color: var(--slate);
}
.chip.ok { border-color: var(--sage); color: var(--sage-deep); background: var(--sage-faint); }
.chip.flag { border-color: var(--terracotta); color: var(--terracotta); background: #d144240d; }
.chip.window { border-color: var(--terracotta); color: var(--terracotta); }
.chip.review { border-color: var(--slate); color: var(--slate); background: var(--oat); }

.guest-detail { border: 1px solid var(--line); background: var(--oat); padding: var(--space-md) clamp(1.25rem, 3vw, 2.2rem); margin-top: var(--space-md); display: none; }
.guest-detail.open { display: block; animation: rise 0.45s var(--ease-sacred); }
.guest-detail .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1.2rem; margin-top: var(--space-md); }

.flag-note { border-left: 3px solid var(--terracotta); background: #d1442408; padding: 0.9rem 1.1rem; font-size: 0.95rem; margin: 0.8rem 0; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease-sacred), transform 0.8s var(--ease-sacred); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* responsive */
@media (max-width: 720px) {
  .cohort-row { grid-template-columns: 1.4fr 1fr 1.1fr; }
  .cohort-row .hide-m { display: none; }
  .hero { min-height: 78vh; }
  .nav { top: 2.5rem; }
  .tabs { top: 2.5rem; }
  .demo-banner { font-size: 0.58rem; }
}
