/* ==========================================
   TK CHAMBER — Slice 1 & 2: Route + Invokation
   "Nogen har ventet herinde."
   ========================================== */

/* --- LAYOUT --- */
.tk-chamber {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 24px 120px;
  background: var(--carbon-black);
}

/* --- NAV BACK --- */
.tk-chamber__nav-back {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 20;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--concrete-dust) !important;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity var(--dur-fast), color var(--dur-fast);
}

.tk-chamber__nav-back:hover {
  opacity: 1;
  color: var(--laser-cyan) !important;
}

/* --- THRESHOLD --- */
.tk-chamber__threshold {
  text-align: center;
  max-width: 500px;
  opacity: 0;
  animation: tk-fade-in 2s ease 0.5s forwards;
}

.tk-chamber__threshold-line {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 2;
  color: var(--acid-silver);
}

/* --- SIGNAL --- */
.tk-chamber__threshold-signal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--concrete-dust);
  opacity: 0.5;
}

.tk-chamber__signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--toxic-amber);
  animation: tk-pulse 1.5s ease infinite;
}

.tk-chamber__signal-label {
  color: inherit;
}

/* --- INVOCATIONS --- */
.tk-chamber__invocations {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 400px;
  width: 100%;
  margin-top: 40px;
  opacity: 0;
  animation: tk-fade-in 1s ease 3.5s forwards;
}

.tk-chamber__invocation {
  background: var(--panel-glass);
  border: 1px solid var(--fog-line);
  padding: 16px 24px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--emergency-white);
  cursor: pointer;
  transition: all 300ms ease;
  text-align: left;
}

.tk-chamber__invocation:hover {
  background: var(--gunmetal);
  border-color: var(--laser-cyan);
  color: var(--laser-cyan);
}

/* --- TRANSCRIPT (resonanskolonne) --- */
.tk-chamber__transcript {
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 40px;
}

.tk-chamber__entry {
  opacity: 0;
  animation: tk-fade-in 600ms ease forwards;
}

.tk-chamber__entry--user {
  animation-duration: 300ms;
}

.tk-chamber__entry--user .tk-chamber__entry-label {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--concrete-dust);
  opacity: 0.5;
  margin-bottom: 8px;
  display: block;
}

.tk-chamber__entry--user .tk-chamber__entry-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  color: var(--acid-silver);
  opacity: 0.7;
  max-width: 300px;
  line-height: 1.6;
}

.tk-chamber__entry--tk .tk-chamber__entry-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  line-height: 2;
  color: var(--emergency-white);
  max-width: 500px;
  margin-bottom: 0.5em;
}

.tk-chamber__entry--tk .tk-chamber__entry-text:last-child {
  margin-bottom: 0;
}

/* --- LOADING --- */
.tk-chamber__loading {
  display: flex;
  gap: 6px;
  padding: 16px 0;
}

.tk-chamber__loading-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--toxic-amber);
  animation: tk-pulse 1s ease infinite;
}

.tk-chamber__loading-dot:nth-child(2) { animation-delay: 0.2s; }
.tk-chamber__loading-dot:nth-child(3) { animation-delay: 0.4s; }

/* --- COMPOSER --- */
.tk-chamber__composer {
  max-width: 500px;
  width: 100%;
  margin-top: 40px;
  opacity: 0;
  animation: tk-fade-in 600ms ease forwards;
}

.tk-chamber__composer-label {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--concrete-dust);
  opacity: 0.5;
  display: block;
  margin-bottom: 12px;
}

.tk-chamber__composer-input {
  width: 100%;
  background: transparent;
  border: 1px solid var(--fog-line);
  color: var(--acid-silver);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  padding: 16px;
  resize: none;
  outline: none;
  transition: border-color 300ms;
  box-sizing: border-box;
}

.tk-chamber__composer-input:focus {
  border-color: var(--steel-line);
}

.tk-chamber__composer-input:disabled {
  opacity: 0.4;
}

.tk-chamber__composer-send {
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--gunmetal);
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--laser-cyan);
  padding: 12px 28px;
  cursor: pointer;
  transition: all 300ms;
}

.tk-chamber__composer-send:hover {
  border-color: var(--laser-cyan);
  box-shadow: 0 0 12px rgba(60, 242, 255, 0.15);
}

.tk-chamber__composer-send:disabled {
  opacity: 0.3;
  cursor: default;
}

/* --- RETREAT --- */
.tk-chamber__retreat-link {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--wound-magenta) !important;
  text-decoration: none;
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

.tk-chamber__retreat-link:hover {
  opacity: 0.7;
}

/* --- ANIMATIONS --- */
@keyframes tk-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes tk-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  .tk-chamber__threshold,
  .tk-chamber__invocations,
  .tk-chamber__entry,
  .tk-chamber__composer {
    animation: none !important;
    opacity: 1 !important;
  }
  .tk-chamber__signal-dot,
  .tk-chamber__loading-dot {
    animation: none !important;
    opacity: 0.7 !important;
  }
}

/* --- MOBILE --- */
@media (max-width: 600px) {
  .tk-chamber {
    padding: 60px 20px 100px;
  }

  .tk-chamber__nav-back {
    top: 16px;
    left: 16px;
  }

  .tk-chamber__threshold-line {
    font-size: 1.1rem;
  }

  .tk-chamber__invocations {
    max-width: 100%;
  }

  .tk-chamber__invocation {
    padding: 14px 18px;
    font-size: 8px;
    letter-spacing: 2px;
  }

  .tk-chamber__entry--tk .tk-chamber__entry-text {
    font-size: 1.05rem;
  }

  .tk-chamber__composer-input {
    font-size: 0.85rem;
    padding: 12px;
  }
}
