:root {
  --font: "Suisse Intl", "Helvetica Neue", Helvetica, Arial, "Inter", system-ui, sans-serif;
  --line: #141414;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: #000;
  color: #fff;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ---------- split ---------- */
.split {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

/* left: the decline */
.stage {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7vh 5vw;
  min-height: 0;
  border-right: 1px solid var(--line);
}
.frame-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame {
  position: absolute;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 700ms ease;
}
.frame.show { opacity: 1; }

/* right: the mind — a black field with a single centred stack of thought */
.mind {
  background: #000;
  padding: 6vh 4vw;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}
.present-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: 84%;
  height: 80%;
  text-align: center;
  font-weight: 400;
  color: #fff;
  font-size: clamp(24px, 2.9vw, 46px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow: hidden;
}
.present-type .sentence {
  opacity: 0;
  transition: opacity 1200ms ease;
  will-change: opacity;
}
.present-type .sentence.show { opacity: 1; }
.present-type .sentence.out { opacity: 0; }
.present-type .caret {
  display: inline-block;
  width: 0;
  height: 1em;
  margin-left: 3px;
  border-right: 2px solid #fff;
  transform: translateY(4px);
  animation: caretblink 1.05s steps(1) infinite;
}
@keyframes caretblink { 50% { opacity: 0; } }

/* ---------- transport ---------- */
.transport {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  border-top: 1px solid var(--line);
  background: #000;
  flex: none;
}
.t-btn {
  border: 1px solid #2a2a2a;
  background: #000;
  color: #e8e8e8;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, border-color 160ms ease;
}
.t-btn:hover { background: #0e0e0e; border-color: #444; }
.t-btn.play { background: #eee; color: #000; border-color: #eee; font-size: 14px; }
.t-btn.play:hover { opacity: 0.85; }
.scrub {
  flex: 1 1 auto;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: #242424;
  border-radius: 2px;
  cursor: pointer;
}
.scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.scrub::-moz-range-thumb {
  width: 14px; height: 14px;
  border: none; border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.counter {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #777;
  flex: 0 0 auto;
}
.sig {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #555;
  flex: 0 0 auto;
}

/* ---------- cover ---------- */
.cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw;
  opacity: 1;
  transition: opacity 900ms ease;
}
.cover.hide { opacity: 0; pointer-events: none; }
.cover-inner {
  max-width: 760px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.case {
  font-size: 12px;
  letter-spacing: 0.34em;
  color: #6a6a6a;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.demo-tag {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #cfcfcf;
  border: 1px solid #3a3a3a;
  border-radius: 20px;
  padding: 3px 10px;
}
.cover-note {
  margin: 4px 0 0;
  font-size: clamp(12px, 1.1vw, 14px);
  line-height: 1.5;
  color: #8a8a8a;
  max-width: 520px;
}
.demo-badge {
  position: fixed;
  top: 16px;
  left: 20px;
  z-index: 40;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6f6f6f;
  border: 1px solid #262626;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 11px;
  border-radius: 20px;
  pointer-events: none;
}
.cover-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 62px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.cover-logline {
  margin: 0;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.6;
  color: #b7b7b7;
  max-width: 620px;
}
.begin {
  margin-top: 6px;
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #000;
  background: #fff;
  border: none;
  padding: 15px 42px;
  border-radius: 40px;
  cursor: pointer;
  transition: transform 200ms ease, opacity 200ms ease;
}
.begin:hover { transform: translateY(-1px); opacity: 0.9; }
.cover-foot {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #5f5f5f;
  max-width: 520px;
}
.cover-foot em { font-style: italic; color: #7a7a7a; }

/* ---------- password gate ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw;
  transition: opacity 500ms ease;
}
.gate.hide { opacity: 0; pointer-events: none; }
.gate-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  max-width: 380px;
  width: 100%;
}
.gate-label {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #8a8a8a;
}
.gate-input {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  color: #fff;
  background: #0c0c0c;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 13px 16px;
  text-align: center;
  letter-spacing: 0.05em;
  outline: none;
  transition: border-color 160ms ease;
}
.gate-input:focus { border-color: #555; }
.gate-error {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #b23b3b;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .stage { border-right: none; border-bottom: 1px solid var(--line); padding: 4vh 6vw; }
  .present-type { font-size: clamp(20px, 5.5vw, 30px); }
  .sig { display: none; }
}
