/* =============================================================================
   THE GRAND BRIEFING — a three-slide archival console shown before first use.
   Centered large-format folder: ink black, generous whitespace, brass accents.
   ============================================================================= */

/* Flow diagram embedded in a briefing slide — pictorial, not a wall of text. */
.briefing-diagram {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 18px auto 12px;
}

.briefing {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
}
.briefing.open { display: flex; }
body.welcome-open { overflow: hidden; }
body.welcome-open .app-header,
body.welcome-open .app-main,
body.welcome-open .app-footer {
  filter: brightness(0.4) saturate(0.6);
  transition: filter 480ms var(--ease-out);
  pointer-events: none;
}

.briefing-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 4, 0.72);
  backdrop-filter: blur(18px) saturate(0.6);
  -webkit-backdrop-filter: blur(18px) saturate(0.6);
  animation: backdrop-in 480ms var(--ease-out);
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

/* the archival folder */
.briefing-console {
  position: relative;
  width: min(960px, 100%);
  height: min(720px, calc(100vh - 80px));
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(201, 168, 92, 0.05) 0%, transparent 55%),
    linear-gradient(180deg, #0a0c0f 0%, #060708 100%);
  border: 1px solid #20262d;
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 120px rgba(0, 0, 0, 0.8),
    0 0 80px rgba(201, 168, 92, 0.04);
  overflow: hidden;
  animation: console-in 560ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes console-in {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* skip — quiet, top-right */
.briefing-skip {
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 5;
  background: transparent;
  border: 1px solid #242b32;
  color: var(--text-dim);
  border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 200ms, border-color 200ms;
}
.briefing-skip:hover { color: var(--brass-bright); border-color: rgba(201, 168, 92, 0.5); }

/* ---------- slides ---------- */
.briefing-slides {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.briefing-slide {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 72px 96px 48px;
  opacity: 0;
  transform: translateX(28px);
  pointer-events: none;
  transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-out);
  scrollbar-width: thin;
  scrollbar-color: #242b32 transparent;
  display: flex;
  flex-direction: column;
}
.briefing-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.briefing-slide.is-left {
  opacity: 0;
  transform: translateX(-28px);
}

/* ---------- slide 01 — philosophy ---------- */
.slide-philosophy {
  align-items: center;
  text-align: center;
  /* SAFE centering: auto margins center the block when there's room and
     collapse to zero when content overflows — so the top never clips. */
  justify-content: flex-start;
  padding-top: 48px;
  padding-bottom: 40px;
}
.slide-philosophy > :first-child { margin-top: auto; }
.slide-philosophy > :last-child  { margin-bottom: auto; }
.briefing-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border: 1px solid rgba(201, 168, 92, 0.30);
  border-radius: 999px;
  margin-bottom: 28px;
}
.briefing-eyebrow::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 6px var(--brass-glow);
}

/* the slow-pulsing golden ring */
.briefing-ring {
  width: 72px; height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--brass);
  position: relative;
  margin-bottom: 26px;
  background: radial-gradient(circle at 50% 45%, rgba(201, 168, 92, 0.22) 0%, transparent 65%);
  box-shadow:
    inset 0 0 16px rgba(201, 168, 92, 0.25),
    0 0 28px var(--brass-glow-soft);
  animation: ring-pulse 5s var(--ease-in-out) infinite;
}
.briefing-ring::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px solid rgba(232, 199, 125, 0.45);
}
.briefing-ring::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 92, 0.12);
  animation: ring-halo 5s var(--ease-in-out) infinite;
}
@keyframes ring-pulse {
  0%, 100% { box-shadow: inset 0 0 16px rgba(201,168,92,0.25), 0 0 24px rgba(201,168,92,0.14); }
  50%      { box-shadow: inset 0 0 22px rgba(201,168,92,0.40), 0 0 52px rgba(201,168,92,0.28); }
}
@keyframes ring-halo {
  0%, 100% { transform: scale(1);    opacity: 0.5; }
  50%      { transform: scale(1.12); opacity: 1; }
}

.briefing-wordmark {
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.42em;
  color: var(--text-primary);
  margin: 0 0 20px;
  text-indent: 0.42em; /* optically recenter the letterspaced run */
}
/* Clearly subordinate to the wordmark — a caption in the title's shadow. */
.briefing-headline {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.45;
  color: #f7f1e0;
  margin: 0 0 26px;
  max-width: 640px;
  text-shadow: 0 0 28px rgba(210, 176, 102, 0.10);
  letter-spacing: 0.006em;
}
.briefing-lead {
  font-family: var(--font-editorial);
  font-size: 19px;
  line-height: 1.65;
  color: #eee8da;
  max-width: 600px;
  margin: 0 0 22px;
}
.briefing-lead em { font-style: italic; color: var(--brass-bright); }
.briefing-body {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0;
}
.briefing-body strong { color: var(--text-primary); font-weight: 600; }
.briefing-body em { font-family: var(--font-editorial); font-style: italic; color: #ece6d3; font-size: 1.06em; }

/* ---------- slide headers (02, 03) ---------- */
.slide-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.slide-kicker::after {
  content: "";
  flex: 0 0 36px;
  height: 1px;
  background: linear-gradient(90deg, var(--brass), transparent);
}
.slide-headline {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.25;
  color: #fcf8ea;
  margin: 0 0 10px;
}
.slide-sub {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 18px;
  color: var(--brass-bright);
  margin: 0 0 36px;
}

/* ---------- slide 02 — the hybrid core ---------- */
.arch-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  margin-bottom: 30px;
}
.arch-side {
  background: linear-gradient(180deg, #0d1014, #090b0e);
  border: 1px solid #1d242b;
  border-radius: 14px;
  padding: 28px 28px 26px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}
.arch-side-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: 14px;
}
.arch-side.home .arch-side-tag { color: var(--brass); }
.arch-side-title {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 14px;
}
.arch-side-body {
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
}
.arch-side-body strong { color: var(--text-primary); font-weight: 600; }
.arch-side-foot {
  margin-top: 16px;
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 14px;
  color: #b8b2a0;
}

/* the single wire that crosses */
.arch-wire-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  position: relative;
}
.arch-wire-line {
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
  box-shadow: 0 0 10px var(--brass-glow-soft);
  position: relative;
}
.arch-wire-line::after {
  content: "→";
  position: absolute;
  right: -4px;
  top: -9px;
  color: var(--brass);
  font-size: 12px;
}
.arch-wire-badge {
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.10em;
  line-height: 1.8;
  color: var(--text-dim);
  text-transform: uppercase;
  max-width: 120px;
}
.arch-wire-badge strong {
  display: block;
  color: var(--brass-bright);
  font-weight: 600;
}
.slide-coda {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 18px;
  color: var(--brass-bright);
  text-align: left;
  margin: 10px 0 0;
  line-height: 1.55;
}

/* flowing prose for the briefing's teaching slides — sans, generous leading */
.slide-prose {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 0 20px;
  letter-spacing: 0.005em;
}
.slide-prose strong { color: var(--text-primary); font-weight: 600; }
.slide-prose em {
  font-family: var(--font-editorial);
  font-style: italic;
  color: #f3edda;
  font-size: 1.07em;
}

/* ---------- slide 03 — the rooms ---------- */
.rooms-lead {
  font-family: var(--font-editorial);
  font-size: 19px;
  line-height: 1.65;
  color: #eee8da;
  max-width: 640px;
  margin: 0 0 30px;
}
.rooms-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.rooms-list li {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 18.5px;
  color: var(--text-primary);
  padding: 16px 4px 16px 34px;
  border-bottom: 1px solid #181f25;
  position: relative;
  line-height: 1.45;
}
.rooms-list li:last-child { border-bottom: none; }
.rooms-list li::before {
  content: "·";
  position: absolute;
  left: 8px;
  color: var(--brass);
  font-size: 26px;
  line-height: 1;
  top: 14px;
  text-shadow: 0 0 8px var(--brass-glow);
}
.rooms-list li span {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 3px;
  letter-spacing: 0.01em;
}
.rooms-close {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 0 36px;
}
.rooms-close em { font-family: var(--font-editorial); font-style: italic; color: #ece6d3; font-size: 1.06em; }

/* enter CTA */
.briefing-enter-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.slide-philosophy .briefing-enter-row,
.briefing-enter-row.center { align-items: center; }
.briefing-enter {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  color: var(--ink-on-brass);
  border: none;
  border-radius: 12px;
  padding: 16px 34px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 24px var(--brass-glow-soft), 0 4px 0 rgba(60, 46, 16, 0.6);
  transition: transform 140ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.briefing-enter:hover { transform: translateY(-2px); box-shadow: 0 0 36px var(--brass-glow), 0 6px 0 rgba(60, 46, 16, 0.6); }
.slide-rooms .briefing-enter-note { margin-top: 4px; }
.briefing-enter-note {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- navigation rail ---------- */
.briefing-nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-top: 1px solid #181f25;
  background: rgba(5, 6, 7, 0.6);
}
.briefing-nav-btn {
  background: transparent;
  border: 1px solid #242b32;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 200ms, border-color 200ms, opacity 200ms;
  min-width: 110px;
}
.briefing-nav-btn:hover:not(:disabled) { color: var(--brass-bright); border-color: rgba(201, 168, 92, 0.5); }
.briefing-nav-btn:disabled { opacity: 0; pointer-events: none; }
.briefing-nav-btn.next {
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  color: var(--ink-on-brass);
  border-color: transparent;
  box-shadow: 0 0 16px var(--brass-glow-faint);
}
.briefing-nav-btn.next:hover { color: var(--ink-on-brass); border-color: transparent; box-shadow: 0 0 24px var(--brass-glow-soft); }
.briefing-progress {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 14px;
}
.briefing-progress .current { color: var(--brass-bright); }
.briefing-dots { display: flex; gap: 8px; }
.briefing-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #2a323a;
  transition: background 300ms, box-shadow 300ms;
}
.briefing-dots span.on {
  background: var(--brass);
  box-shadow: 0 0 7px var(--brass-glow);
}

/* ---------- narrow ---------- */
@media (max-width: 860px) {
  .briefing { padding: 18px 12px; }
  .briefing-console { height: calc(100vh - 36px); }
  .briefing-slide { padding: 56px 28px 36px; }
  .arch-split { grid-template-columns: 1fr; gap: 16px; }
  .arch-wire-col { padding: 4px 0; flex-direction: row; gap: 14px; }
  .arch-wire-line { transform: rotate(90deg); width: 36px; }
  .arch-wire-badge { margin-top: 0; max-width: none; }
}
