/* ============================================================================
   TOBIAS HAGER - STORYTELLING HOMEPAGE CSS
   Award-winning personal brand with dark terminal/code aesthetic
   ============================================================================ */

/* ============================================================================
   CUSTOM PROPERTIES (extends global.css)
   ============================================================================ */
:root {
  /* These are assumed to exist in global.css:
     --th-vermillion: #E8430A (or similar orange-red)
     --th-dark-bg: dark background
     --th-font-mono: JetBrains Mono
     --th-font-sans: Space Grotesk / Inter
  */

  /* Additional custom properties for this page */
  --th-transition-standard: 0.3s ease;
  --th-transition-fast: 0.15s ease;
  --th-text-light: #f0f0f0;
  --th-text-muted: #8a8a8a;
  --th-border-subtle: rgba(255, 255, 255, 0.1);
  --th-border-subtle-strong: rgba(255, 255, 255, 0.3);
  --th-ok-color: #22c55e;
  --th-warn-color: #eab308;
  --th-spacing-unit: 1rem;
}

/* ============================================================================
   GLOBAL STYLES
   ============================================================================ */

#th-story {
  background-color: #0a0a0a;
  color: var(--th-text-light);
  font-family: var(--th-font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

#th-story::selection {
  background-color: var(--th-vermillion);
  color: #000;
}

/* Custom scrollbar styling */
#th-story::-webkit-scrollbar {
  width: 8px;
}

#th-story::-webkit-scrollbar-track {
  background: #0a0a0a;
}

#th-story::-webkit-scrollbar-thumb {
  background: var(--th-vermillion);
  border-radius: 4px;
}

#th-story::-webkit-scrollbar-thumb:hover {
  background: #ff5722;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--th-vermillion) #0a0a0a;
}

/* Base Act container */
.th-act {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Monospace utility class */
.th-mono {
  font-family: var(--th-font-mono);
  letter-spacing: 0.02em;
}

/* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .th-boot__line,
  .th-word,
  .th-exit__line,
  .th-boot__cursor {
    opacity: 1 !important;
    transform: none !important;
  }

  .th-hero__title {
    opacity: 1 !important;
  }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

@keyframes typeIn {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============================================================================
   ACT I: BOOT SEQUENCE
   ============================================================================ */

.th-act--boot {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  position: sticky;
  top: 0;
  z-index: 100;
}

.th-boot__screen {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Background video with low opacity */
.th-boot__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  z-index: 1;
}

/* Terminal container */
.th-boot__terminal {
  position: relative;
  z-index: 5;
  font-family: var(--th-font-mono);
  font-size: clamp(0.875rem, 1.2vw, 1.125rem);
  line-height: 1.8;
  max-width: 60%;
  width: 100%;
  text-align: left;
  color: var(--th-text-light);
  padding: 2rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--th-border-subtle);
  border-radius: 4px;
}

/* Individual boot lines */
.th-boot__line {
  opacity: 0;
  transform: translateY(20px);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.th-boot__line.th-ok {
  color: var(--th-ok-color);
}

.th-boot__line.th-warn {
  color: var(--th-warn-color);
}

.th-boot__line.th-ready {
  color: var(--th-vermillion);
  font-weight: 600;
}

/* Blinking cursor */
.th-boot__cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--th-vermillion);
  margin-left: 0.2em;
  vertical-align: middle;
  animation: blink 1s infinite;
}

/* Particle canvas overlay */
.th-boot__particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

/* Hero statement (revealed after boot) */
.th-boot__hero {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8;
  opacity: 0;
  text-align: center;
  padding: 2rem;
}

.th-hero__title {
  font-family: var(--th-font-sans);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 1.2;
  opacity: 0;
  color: var(--th-text-light);
}

.th-hero__line--3 em {
  color: var(--th-vermillion);
  font-style: italic;
  font-weight: 700;
}

/* ============================================================================
   ACT II: THE QUESTION
   ============================================================================ */

.th-act--question {
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #0a0a0a;
}

.th-question__text {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.3;
  max-width: 900px;
  text-align: center;
  padding: 2rem;
  font-family: var(--th-font-sans);
}

.th-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px);
  filter: blur(8px);
  margin: 0 0.25em;
  animation: fadeInUp 0.6s ease-out forwards;
  /* Staggered animation handled by GSAP */
}

.th-word--accent {
  color: var(--th-vermillion);
  font-weight: 700;
}

.th-word--question {
  font-size: 1.3em;
  color: var(--th-vermillion);
}

/* ============================================================================
   ACT III: THE INTERSECTION (Horizontal Scroll)
   ============================================================================ */

.th-act--intersection {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

/* Horizontal scroll track */
.th-hscroll__track {
  display: flex;
  width: 400vw;
  height: 100vh;
  position: relative;
  will-change: transform;
}

/* Individual scroll panels */
.th-hscroll__panel,
.th-world {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* World panel styling */
.th-world {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 4rem;
}

.th-world__title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 2px white;
  color: transparent;
  white-space: nowrap;
  z-index: 4;
  font-family: var(--th-font-sans);
  text-transform: uppercase;
}

/* Background video for world panels */
.th-world__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  z-index: 1;
}

/* Gradient overlay for text readability */
.th-world__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 2;
}

/* Narrator panel background (no video) */
.th-world__narrator-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a0a02 0%, #0a0a0a 50%, #0a1520 100%);
  z-index: 1;
}

/* Content layer (above video) */
.th-world__content {
  position: relative;
  z-index: 5;
  padding: 2rem;
  max-width: 600px;
}

.th-world__label {
  font-family: var(--th-font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: var(--th-text-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.th-world__sub {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--th-text-light);
}

/* Convergence panel (special) */
.th-world--convergence {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.th-world--convergence .th-world__title {
  position: relative;
  transform: none;
  top: auto;
  left: auto;
}

/* Stacked outline text for convergence */
.th-convergence__outline {
  position: relative;
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 2px white;
  color: transparent;
  white-space: nowrap;
  z-index: 4;
  font-family: var(--th-font-sans);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Solid VISION text (revealed during scroll) */
.th-convergence__solid {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 900;
  line-height: 1;
  color: var(--th-vermillion);
  white-space: nowrap;
  z-index: 6;
  font-family: var(--th-font-sans);
  text-transform: uppercase;
  opacity: 0;
  letter-spacing: 0.05em;
}

/* Horizontal scroll progress indicator */
.th-hscroll__progress {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--th-font-mono);
  font-size: 0.875rem;
  color: var(--th-text-muted);
}

.th-hscroll__progress-bar {
  width: 100px;
  height: 3px;
  background: var(--th-border-subtle);
  border-radius: 2px;
  overflow: hidden;
}

.th-hscroll__progress-fill {
  height: 100%;
  background: var(--th-vermillion);
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Mobile: Stack vertically */
@media (max-width: 768px) {
  .th-hscroll__track {
    flex-direction: column;
    width: 100%;
    height: auto;
  }

  .th-hscroll__panel,
  .th-world {
    width: 100vw;
    min-height: 100vh;
  }

  .th-world__title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .th-convergence__outline {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .th-convergence__solid {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
}

/* ============================================================================
   ACT IV: THE MANIFESTO
   ============================================================================ */

.th-act--manifesto {
  position: relative;
  z-index: 40;
  background: linear-gradient(#0a0a0a 0%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.th-manifesto__container {
  position: relative;
  width: 100%;
  height: 100vh;
}

.th-manifesto__container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.th-manifesto__page {
  top: 0;
  left: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.th-manifesto__quote {
  position: relative;
  max-width: 800px;
  padding: 4rem 2rem;
  text-align: center;
}

.th-manifesto__text,
.th-manifesto__quote p {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--th-text-light);
  font-family: var(--th-font-sans);
}

.th-quote-mark {
  position: absolute;
  top: -0.5em;
  left: 0;
  font-size: 3em;
  color: var(--th-vermillion);
  font-family: var(--th-font-sans);
  font-weight: 900;
  line-height: 1;
  opacity: 0.8;
}

/* Progress counter in manifesto */
.th-manifesto__progress {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  font-family: var(--th-font-mono);
  font-size: 0.875rem;
  color: var(--th-text-muted);
  letter-spacing: 0.05em;
}

/* ============================================================================
   ACT V: THE PROOF
   ============================================================================ */

.th-act--proof {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem;
}

/* Displacement canvas (background effect) */
.th-proof__displacement {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Main grid container */
.th-proof__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  position: relative;
  z-index: 2;
}

/* Left side: Statement */
.th-proof__statement {
  padding: 2rem;
}

.th-proof__text {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--th-text-light);
  font-family: var(--th-font-sans);
  margin-bottom: 2rem;
}

.th-proof__text em {
  color: var(--th-vermillion);
  font-style: italic;
  font-weight: 700;
}

.th-proof__cta {
  display: inline-block;
  font-family: var(--th-font-mono);
  font-size: 0.9rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--th-vermillion);
  color: var(--th-vermillion);
  text-decoration: none;
  transition: all var(--th-transition-standard);
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.th-proof__cta:hover {
  background-color: var(--th-vermillion);
  color: #000;
  box-shadow: 0 0 20px rgba(232, 67, 10, 0.3);
}

/* Right side: Metrics */
.th-proof__metrics {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 2rem;
}

.th-proof__metric {
  text-align: left;
}

.th-proof__number {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  color: var(--th-vermillion);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: var(--th-font-sans);
}

.th-proof__label {
  font-family: var(--th-font-mono);
  font-size: 0.85rem;
  color: var(--th-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.6;
}

/* Mobile: Stack grid */
@media (max-width: 768px) {
  .th-proof__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .th-proof__metrics {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
  }

  .th-proof__metric {
    flex: 1;
    min-width: 150px;
  }
}

/* ============================================================================
   ACT VI: THE INVITATION
   ============================================================================ */

.th-act--invitation {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  position: relative;
}

/* Calm, deliberate styling â minimal effects */
.th-invitation__headline {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.3;
  max-width: 700px;
  text-align: center;
  margin-bottom: 3rem;
  font-family: var(--th-font-sans);
  color: var(--th-text-light);
}

/* Terminal-style prompts */
.th-invitation__terminal {
  font-family: var(--th-font-mono);
  font-size: 0.9rem;
  color: var(--th-text-muted);
  opacity: 0.6;
  margin-bottom: 2rem;
  text-align: center;
  letter-spacing: 0.02em;
}

/* Form container */
.th-invitation__form {
  font-family: var(--th-font-mono);
  max-width: 600px;
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--th-border-subtle);
  padding: 3rem;
  border-radius: 4px;
}

/* Form field (label + input row) */
.th-form__field {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.th-form__label {
  font-size: 0.9rem;
  color: var(--th-text-muted);
  white-space: nowrap;
  min-width: 80px;
}

.th-form__input {
  flex: 1;
  min-width: 150px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--th-text-light);
  font-family: var(--th-font-mono);
  font-size: 0.9rem;
  padding: 0.75rem 0;
  outline: none;
  transition: border-color var(--th-transition-standard);
  letter-spacing: 0.02em;
}

.th-form__input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.th-form__input:focus {
  border-bottom-color: var(--th-vermillion);
  box-shadow: 0 1px 0 var(--th-vermillion);
}

/* Submit button */
.th-form__submit {
  font-family: var(--th-font-mono);
  font-size: 0.85rem;
  padding: 1rem 2rem;
  background: transparent;
  border: 1px solid var(--th-vermillion);
  color: var(--th-vermillion);
  cursor: pointer;
  transition: all var(--th-transition-standard);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  width: 100%;
}

.th-form__submit:hover {
  background-color: var(--th-vermillion);
  color: #000;
  box-shadow: 0 0 20px rgba(232, 67, 10, 0.4);
}

.th-form__submit:active {
  transform: scale(0.98);
}

/* Mobile: Adjust form layout */
@media (max-width: 768px) {
  .th-form__field {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .th-form__label {
    min-width: auto;
  }

  .th-form__input {
    width: 100%;
  }

  .th-invitation__form {
    padding: 2rem;
  }
}

/* ============================================================================
   ACT VII: THE EXIT
   ============================================================================ */

.th-act--exit {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  position: relative;
}

/* Exit lines container */
.th-exit__content {
  font-family: var(--th-font-mono);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  line-height: 2;
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
}

/* Individual exit lines */
.th-exit__line {
  opacity: 0;
  display: block;
  margin-bottom: 1rem;
  color: var(--th-text-muted);
  letter-spacing: 0.02em;
}

.th-exit__line.th-exit__emphasis {
  color: var(--th-vermillion);
  font-weight: 600;
}

/* Blinking cursor at end */
.th-exit__cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--th-vermillion);
  margin-left: 0.2em;
  vertical-align: middle;
  animation: blink 1s infinite;
}

/* Social links at bottom */
.th-exit__social {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.th-exit__link {
  font-family: var(--th-font-mono);
  font-size: 0.85rem;
  color: var(--th-text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all var(--th-transition-standard);
  letter-spacing: 0.02em;
  padding-bottom: 2px;
}

.th-exit__link:hover {
  color: var(--th-vermillion);
  border-bottom-color: var(--th-vermillion);
}

/* Mobile: Adjust exit styling */
@media (max-width: 768px) {
  .th-exit__social {
    gap: 1rem;
  }

  .th-exit__link {
    font-size: 0.8rem;
  }
}

/* ============================================================================
   RESPONSIVE UTILITIES
   ============================================================================ */

@media (max-width: 1024px) {
  .th-act {
    min-height: auto;
  }

  .th-boot__terminal {
    max-width: 85%;
    font-size: clamp(0.75rem, 1vw, 1rem);
  }

  .th-world__title,
  .th-convergence__outline,
  .th-convergence__solid {
    font-size: clamp(3rem, 12vw, 9rem);
  }

  .th-manifesto__text {
    font-size: clamp(1.5rem, 3.5vw, 3rem);
  }
}

@media (max-width: 640px) {
  .th-boot__terminal {
    max-width: 95%;
    padding: 1.5rem;
    font-size: 0.75rem;
  }

  .th-hero__title {
    font-size: clamp(2rem, 6vw, 4rem);
  }

  .th-question__text {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }

  .th-manifesto__quote {
    padding: 2rem 1rem;
  }

  .th-proof__grid {
    gap: 2rem;
    padding: 1.5rem;
  }

  .th-invitation__headline {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }

  .th-invitation__form {
    padding: 1.5rem;
  }

  .th-hscroll__progress {
    font-size: 0.75rem;
    bottom: 1rem;
    right: 1rem;
  }

  .th-manifesto__progress {
    font-size: 0.75rem;
    bottom: 1rem;
    right: 1rem;
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

/* Text color utilities */
.th-text--vermillion {
  color: var(--th-vermillion);
}

.th-text--muted {
  color: var(--th-text-muted);
}

.th-text--light {
  color: var(--th-text-light);
}

/* Visibility utilities */
.th-hidden {
  display: none !important;
}

.th-invisible {
  visibility: hidden;
}

/* Flex utilities */
.th-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.th-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Spacing utilities */
.th-mt-1 {
  margin-top: 1rem;
}

.th-mt-2 {
  margin-top: 2rem;
}

.th-mb-1 {
  margin-bottom: 1rem;
}

.th-mb-2 {
  margin-bottom: 2rem;
}

.th-px-2 {
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Z-index layering */
.th-z-behind {
  z-index: 1;
}

.th-z-base {
  z-index: 10;
}

.th-z-elevated {
  z-index: 100;
}

.th-z-modal {
  z-index: 1000;
}

/* ============================================================================
   ANIMATIONS - ADVANCED
   ============================================================================ */

/* Stagger effect for multiple elements */
@keyframes staggerFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes glitchText {
  0% {
    text-shadow: none;
  }
  20% {
    text-shadow: -2px 0 var(--th-vermillion), 2px 0 cyan;
  }
  40% {
    text-shadow: none;
  }
  100% {
    text-shadow: none;
  }
}

/* ============================================================================
   ACCESSIBILITY & FOCUS STATES
   ============================================================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--th-vermillion);
  outline-offset: 2px;
}

/* Enhanced contrast for interactive elements */
.th-proof__cta:focus-visible,
.th-form__submit:focus-visible {
  box-shadow: 0 0 0 3px rgba(232, 67, 10, 0.3), 0 0 20px rgba(232, 67, 10, 0.3);
}

/* Skip to main content link */
.th-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--th-vermillion);
  color: #000;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.th-skip-link:focus {
  top: 0;
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
  .th-act {
    page-break-after: always;
    break-after: page;
  }

  .th-act--boot,
  .th-act--question,
  .th-act--intersection,
  .th-act--manifesto {
    position: static;
  }

  .th-boot__cursor,
  .th-exit__cursor {
    animation: none;
    opacity: 1;
  }

  .th-word {
    opacity: 1;
    transform: none;
  }

  .th-boot__line,
  .th-exit__line {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================================
   END OF CSS
   ============================================================================ */


/* ============================================================================
   PATCH: Fixes for Points 1-8
   ============================================================================ */

/* --- POINT 1 & 3: Smooth transitions between sections --- */
/* Fade-out gradient at bottom of boot section */
.th-act--boot::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20vh;
  background: linear-gradient(to bottom, transparent, #0a0a0a);
  z-index: 200;
  pointer-events: none;
}

/* Fade-in gradient at top of question section */
.th-act--question::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 15vh;
  background: linear-gradient(to bottom, #0a0a0a, transparent);
  z-index: 60;
  pointer-events: none;
}

/* Fade-out gradient at bottom of question section */
.th-act--question::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 15vh;
  background: linear-gradient(to bottom, transparent, #0a0a0a);
  z-index: 60;
  pointer-events: none;
}

/* --- POINT 2: Normalize line spacing in question text --- */
.th-question__text {
  line-height: 1.4;
}

.th-word {
  margin: 0 0.2em;
  vertical-align: baseline;
}

.th-word--accent {
  line-height: inherit;
}

.th-word--question {
  font-size: 1.2em;
  vertical-align: baseline;
}

/* --- POINT 4: Fix overlapping texts in world panels --- */
.th-world__content {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 10;
  padding: 3rem 4rem;
  max-width: 600px;
  width: 100%;
}

.th-world__title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 2px rgba(255,255,255,0.3);
  color: transparent;
  white-space: nowrap;
  z-index: 3;
  font-family: var(--th-font-sans);
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0.4;
}

.th-world__label {
  font-family: var(--th-font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--th-vermillion);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.th-world__sub {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--th-text-light);
  text-shadow: 0 2px 20px rgba(0,0,0,0.8), 0 0 40px rgba(0,0,0,0.5);
}

/* --- POINT 5 & 6: Better text readability on video panels --- */
.th-world__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.2) 100%
  );
  z-index: 2;
}

/* Stronger overlay for narrative panel (no video, dark bg) */
.th-world--narrator .th-world__overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 40%,
    rgba(0, 0, 0, 0.3) 100%
  );
}

.th-world__video {
  opacity: 0.5;
}

/* Narrator background - make it more visible */
.th-world--narrator {
  background: linear-gradient(135deg, #1a0a00 0%, #0a0a0a 50%, #0a0a1a 100%);
}

.th-world__narrator-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(232,67,10,0.08) 0%, transparent 70%);
}

/* --- POINT 7: Convergence panel - better visibility --- */
.th-world--convergence {
  background: radial-gradient(ellipse at center, rgba(232,67,10,0.05) 0%, #0a0a0a 70%);
}

.th-convergence__outline {
  opacity: 0.6;
  -webkit-text-stroke: 2px rgba(255,255,255,0.5);
  margin-bottom: 0.5rem;
  display: block;
  text-align: center;
}

.th-convergence__solid {
  text-shadow: 0 0 60px rgba(232,67,10,0.4), 0 0 120px rgba(232,67,10,0.2);
}

/* --- POINT 8: Fix background color mismatch --- */
.th-act--manifesto {
  background: #0a0a0a;
}

.th-act--proof {
  background: #0a0a0a;
}

.th-act--invitation {
  background: #0a0a0a;
}

.th-act--exit {
  background: #0a0a0a;
}

/* Ensure all transitions between sections are seamless */
.th-act {
  background-color: #0a0a0a;
}

/* --- POINT 9: Style for metric context descriptions --- */
.th-proof__context {
  font-family: var(--th-font-mono);
  font-size: 0.75rem;
  color: var(--th-text-muted);
  letter-spacing: 0.03em;
  line-height: 1.5;
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* --- POINT 10: Executive Tech Coaching card --- */
.th-coaching {
  max-width: 700px;
  width: 100%;
  margin: 0 auto 4rem;
  padding: 2.5rem 3rem;
  border: 1px solid var(--th-border-subtle);
  border-left: 3px solid var(--th-vermillion);
  background: rgba(232, 67, 10, 0.03);
  text-align: left;
}

.th-coaching__label {
  font-family: var(--th-font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--th-vermillion);
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 600;
}

.th-coaching__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--th-text-light);
  margin-bottom: 1rem;
  font-family: var(--th-font-sans);
}

.th-coaching__desc {
  font-size: 0.95rem;
  color: var(--th-text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.th-coaching__stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.th-coaching__stat {
  font-family: var(--th-font-mono);
  font-size: 0.85rem;
  color: var(--th-text-light);
}

.th-coaching__stat strong {
  color: var(--th-vermillion);
  font-weight: 700;
}
