/* ────────────────────────────────────────────────────────────
   gatherings · session 001  ·  v2
   Aesthetic: ethereal cream + cocoa  ×  terminal precision
   ──────────────────────────────────────────────────────────── */

:root {
  /* palette — cream/cocoa borrowed from natura.inc */
  --cream:        #f8f6f2;
  --cream-soft:   #fbf9f4;
  --paper:        #f1ebde;
  --ink:          #2d2926;
  --ink-soft:     #6b625a;
  --ink-faint:    #9a9087;
  --line:         #d8d0c2;
  --line-soft:    #eae3d4;

  /* accent — natura cyan */
  --accent:       #5badd0;
  --accent-warm:  #82c4e0;
  --accent-deep:  #3d8eb2;

  /* atmosphere */
  --sky-1:        #d8e7f0;
  --sky-2:        #ece8de;

  /* type */
  --font-display: "Instrument Serif", "Cormorant Garamond", "Times New Roman", serif;
  --font-sans:    "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  --font-mono:    "Geist Mono", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* layout */
  --status-h:     34px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::selection { background: var(--accent); color: var(--cream); }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  padding-bottom: calc(var(--status-h) + 8px);
}

/* ─────────── ATMOSPHERE ─────────── */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(168, 200, 224, 0.40) 0%, transparent 65%),
    radial-gradient(ellipse 50% 35% at 85% 8%,  rgba(240, 246, 248, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 12% 20%, rgba(252, 235, 215, 0.45) 0%, transparent 60%),
    var(--cream);
  pointer-events: none;
}
.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.17  0 0 0 0 0.16  0 0 0 0 0.15  0 0 0 0.35 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
  opacity: 0.18;
  mix-blend-mode: multiply;
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(45,41,38,0.05) 1px, transparent 0);
  background-size: 26px 26px;
  opacity: 0.55;
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 88%, transparent 100%);
}

/* ─────────── HEADER ─────────── */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px 36px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(248, 246, 242, 0.72);
  border-bottom: 1px solid var(--line-soft);
}

.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.wordmark .period { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 30px;
  justify-self: center;
}
.site-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.04em;
  position: relative;
  transition: color 0.2s ease;
}
.site-nav a::before {
  content: "·";
  margin-right: 8px;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::before { opacity: 1; color: var(--accent); }

.header-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  grid-column: 3;
  justify-self: end;
  padding: 9px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.22s ease;
}
.header-cta .arrow { transition: transform 0.22s ease; display: inline-block; }
.header-cta:hover { background: var(--ink); color: var(--cream); }
.header-cta:hover .arrow { transform: translateX(3px); }

/* ─────────── MAIN ─────────── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 36px 40px;
}

/* ─────────── HERO ─────────── */
.hero { padding: 70px 0 50px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 7px 16px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 38px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 173, 208, 0.22);
  animation: pulse 2.4s ease-in-out infinite;
}

.headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, 8vw, 100px);
  line-height: 0.98;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin-bottom: 30px;
}
.headline em { font-style: italic; color: var(--ink); }
.caret {
  display: inline-block;
  color: var(--accent);
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 0.55em;
  vertical-align: 0.18em;
  animation: blink 1.05s steps(2, start) infinite;
}

.subhead {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.42;
  color: var(--ink-soft);
  max-width: 700px;
}

/* ─────────── MANIFEST ─────────── */
.manifest {
  margin: 64px 0;
  border: 1px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream-soft);
  box-shadow:
    0 1px 0 rgba(45, 41, 38, 0.04),
    0 28px 60px -28px rgba(45, 41, 38, 0.18);
}

.manifest-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.manifest-dots { display: flex; gap: 6px; }
.manifest-dots .m-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line);
  border: 1px solid rgba(45,41,38,0.22);
}
.manifest-dots .m-dot:nth-child(1) { background: #e8b4a0; }
.manifest-dots .m-dot:nth-child(2) { background: #e6cfa0; }
.manifest-dots .m-dot:nth-child(3) { background: var(--accent); }

.manifest-title { text-align: center; color: var(--ink); font-weight: 500; }
.manifest-state {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--accent-deep); font-weight: 500;
}
.manifest-state-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 173, 208, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

.manifest-body {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 18px 26px;
  color: var(--ink);
  min-height: 360px;
}
.manifest-body .line {
  display: flex;
  align-items: baseline;
  padding: 9px 0;
  gap: 0;
}
.manifest-body .line > .prompt { width: 22px; flex: 0 0 22px; }
.manifest-body .line > .key    { width: 110px; flex: 0 0 110px; }
.manifest-body .line > .val    { flex: 0 1 auto; min-width: 0; }
.manifest-body .line + .line {
  border-top: 1px dashed var(--line-soft);
}
.manifest-body .prompt { color: var(--accent); font-weight: 500; }
.manifest-body .key { color: var(--ink-soft); text-transform: lowercase; }
.manifest-body .val { color: var(--ink); }
.manifest-body .val.accent { color: var(--accent-deep); font-style: italic; }
.manifest-body .caret-row {
  display: inline-block;
  margin-left: 6px;
  color: var(--accent);
  animation: blinkFast 0.7s steps(2, start) infinite;
}

/* When JS hasn't started yet, the static fallback rows show */
.manifest-body:not(.is-typing) .line .caret-row { display: none; }

/* ─────────── ABOUT ─────────── */
.about {
  margin: 96px 0 40px;
  max-width: 740px;
}
.lede {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.42;
  color: var(--ink);
  margin-bottom: 22px;
  letter-spacing: -0.006em;
}
.lede em { font-style: italic; color: var(--accent-deep); }
.lede.emphasis { font-style: italic; color: var(--ink-soft); }

/* ─────────── ROOM (who shows up) ─────────── */
.room {
  margin: 64px 0;
  max-width: 820px;
}
.room-label {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 22px;
  font-weight: 500;
}
.room-label-mark { color: var(--accent); }

.room-lede {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 28px;
  max-width: 720px;
}
.room-lede em { font-style: italic; color: var(--accent-deep); }

.room-list {
  display: grid;
  gap: 10px;
  margin-bottom: 36px;
  max-width: 720px;
}
.room-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
  padding: 6px 0;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.room-item:hover { color: var(--ink); border-bottom-color: var(--line-soft); }
.room-item .bullet {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
}

.orgs {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px 20px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}
.orgs-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.orgs-prompt { color: var(--accent); font-weight: 500; }
.orgs-blink {
  display: inline-block;
  color: var(--accent);
  margin-left: 2px;
  animation: blink 0.95s steps(2, start) infinite;
}
.orgs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.org {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 11px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--cream);
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: default;
  letter-spacing: 0.01em;
}
.org::before {
  content: "·";
  color: var(--accent);
  margin-right: 6px;
  font-weight: 700;
}
.org:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.org:hover::before { color: var(--accent); }

/* ─────────── GUEST NOTE ─────────── */
.guest-note {
  margin: 64px 0;
  padding: 28px 34px 30px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
  max-width: 740px;
  position: relative;
}
.guest-label {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 14px;
  font-weight: 500;
}
.guest-label-mark { color: var(--accent); }
.guest-note p {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.guest-hint {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  display: flex;
  gap: 10px;
  align-items: baseline;
  line-height: 1.5;
}
.guest-hint-prompt { color: var(--accent); }

/* ─────────── APPLY ─────────── */
.apply { margin: 96px 0 80px; text-align: center; }

.apply-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 30px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  isolation: isolate;
}
.apply-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-warm) 60%, var(--accent) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.apply-button:hover {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -18px rgba(91, 173, 208, 0.6);
}
.apply-button:hover::before { opacity: 1; }
.apply-button .apply-prompt { color: var(--accent); transition: color 0.28s ease; }
.apply-button:hover .apply-prompt { color: var(--ink); }
.apply-button .apply-arrow { transition: transform 0.28s ease; display: inline-block; }
.apply-button:hover .apply-arrow { transform: translateX(5px); }

.apply-button.apply-pulse {
  animation: applyPulse 1.4s cubic-bezier(0.34, 0, 0.16, 1);
}

.apply-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 18px;
  letter-spacing: 0.06em;
}

.apply-kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 14px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  width: 100%;
}
kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 8px 4px;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

/* ─────────── STATUS BAR ─────────── */
.status-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--status-h);
  padding: 0 22px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.status-bar .status-left,
.status-bar .status-right {
  display: flex; align-items: center; gap: 10px;
}
.status-bar .status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 173, 208, 0.25);
  animation: pulse 2.4s ease-in-out infinite;
}
.status-bar .sep { color: rgba(255,255,255,0.28); }
.status-bar .status-state { color: var(--accent); }
.status-bar .status-applied #applied-count { color: var(--cream); font-weight: 500; }
.status-bar .time { color: rgba(255,255,255,0.85); font-variant-numeric: tabular-nums; }

/* ─────────── ANIMATIONS ─────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes blinkFast {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}
@keyframes applyPulse {
  0%   { box-shadow: 0 0 0 0 rgba(91, 173, 208, 0.65), 0 18px 40px -18px rgba(91, 173, 208, 0.6); transform: translateY(-2px) scale(1); }
  40%  { box-shadow: 0 0 0 14px rgba(91, 173, 208, 0.0), 0 18px 40px -18px rgba(91, 173, 208, 0.6); transform: translateY(-2px) scale(1.03); }
  100% { box-shadow: 0 0 0 0 rgba(91, 173, 208, 0); transform: translateY(0) scale(1); }
}

.eyebrow   { animation: fadeUp 0.65s cubic-bezier(0.2,0,0.2,1) 0.05s both; }
.headline  { animation: fadeUp 0.75s cubic-bezier(0.2,0,0.2,1) 0.18s both; }
.subhead   { animation: fadeUp 0.7s  cubic-bezier(0.2,0,0.2,1) 0.36s both; }
.manifest  { animation: fadeUp 0.8s  cubic-bezier(0.2,0,0.2,1) 0.5s both; }

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; padding: 16px 20px; }
  .site-nav { display: none; }

  main { padding: 30px 22px 60px; }
  .hero { padding: 30px 0 30px; }

  .manifest { margin: 48px 0; border-radius: 8px; }
  .manifest-header { padding: 8px 12px; gap: 8px; }
  .manifest-title { font-size: 10px; }
  .manifest-body { font-size: 12px; padding: 14px 16px; min-height: 320px; }
  .manifest-body .line > .prompt { width: 18px; flex-basis: 18px; }
  .manifest-body .line > .key    { width: 90px; flex-basis: 90px; }
  .manifest-body .line { padding: 7px 0; }

  .about { margin: 56px 0 30px; }
  .room { margin: 48px 0; }
  .orgs { padding: 14px 16px 18px; }
  .org { font-size: 11px; padding: 4px 9px; }
  .guest-note { padding: 22px 22px 24px; }
  .apply { margin: 56px 0 48px; }

  .status-bar { font-size: 10px; padding: 0 14px; }
  .status-bar .status-applied,
  .status-bar .status-right span:not(.time):not(.sep) { display: none; }
  .status-bar .status-right .sep:first-of-type,
  .status-bar .status-right .sep:nth-of-type(2) { display: none; }
}

@media (max-width: 480px) {
  .headline { font-size: clamp(38px, 10vw, 56px); }
  .status-bar .status-left .sep:nth-of-type(2),
  .status-bar .status-left .status-applied { display: none; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .manifest-body .caret-row { display: none !important; }
}
