@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,100..900&family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

@font-face {
  font-family: 'Archivo LJ Condensed';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62%;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/archivo/v25/k3kQo8UDI-1M0wlSfdnoLmvDIaI.woff2) format('woff2');
}

:root {
  --film: #0a0a09;
  --ink: #050505;
  --graphite: #2b2b29;
  --rule: #1c1c1b;
  --lead: #8d8f8b;
  --silver: #b9bbb7;
  --bone: #ebe8e1;
  --oxide: #a4471f;
  --oxide-bright: #d0693e;
  --display: 'Archivo LJ Condensed', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --g: clamp(16px, 3.5vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: var(--graphite) var(--ink);
  min-height: 100vh;
}

::selection {
  background: var(--oxide);
  color: var(--bone);
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* ==========================================================================
   POSTER GATE VIEW (SLICE STORY AESTHETIC - MOUSE REACTIVE)
   ========================================================================== */
#gate-view {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: #000;
  padding: 0;
  cursor: crosshair;
}

/* Background CT Video with Scanline & Vignette */
.poster-bg-wrap {
  position: absolute;
  inset: -30px;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.poster-bg-video {
  width: calc(100% + 60px);
  height: calc(100% + 60px);
  object-fit: cover;
  opacity: 0.55;
  filter: contrast(1.2) brightness(0.92);
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.04);
  transition: transform 0.08s ease-out;
}

.poster-crt-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: 
    linear-gradient(rgba(5,5,5,0.3) 50%, rgba(0,0,0,0.65) 50%),
    radial-gradient(ellipse at center, rgba(0,0,0,0.1) 20%, rgba(5,5,5,0.92) 90%);
  background-size: 100% 3px, cover;
}

/* Hairline Header Bar */
.poster-top-bar {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--g) 18px;
  border-bottom: 1px solid rgba(235, 232, 225, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.poster-top-bar .studio-tag {
  color: var(--bone);
  font-weight: 500;
}

.poster-top-bar .status-center {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--oxide-bright);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--oxide-bright);
  box-shadow: 0 0 8px var(--oxide);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.25); }
}

.poster-top-bar .readout-right {
  text-align: right;
  color: var(--lead);
}

.poster-top-bar .readout-right b {
  color: var(--bone);
}

/* Center Type Stage (Massive Stacked LOCK / JAW) */
.poster-center {
  position: relative;
  z-index: 10;
  padding: 20px var(--g);
  margin: auto 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.type-block-wrap {
  position: relative;
  display: inline-block;
  user-select: none;
  margin-bottom: 24px;
}

.massive-wordmark {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(5.4rem, 18.5vw, 15.5rem);
  line-height: 0.77;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--bone);
  text-shadow: 0 8px 32px rgba(0,0,0,0.9);
  transition: transform 0.1s ease-out;
}

.wordmark-line {
  display: block;
}

.wordmark-line.jaw {
  position: relative;
  transform: translateX(var(--shear, 0px));
  transition: transform 0.08s ease-out;
}

.wordmark-line .sliced-bar {
  color: var(--oxide-bright);
}

/* Clinical Status Notice */
.clinical-notice {
  font-family: var(--mono);
  color: var(--silver);
  font-size: clamp(11px, 1.2vw, 13px);
  line-height: 1.6;
  letter-spacing: 0.06em;
  max-width: 60ch;
  margin-bottom: 28px;
  border-left: 2px solid var(--oxide);
  padding-left: 14px;
}

.clinical-notice b {
  color: var(--bone);
  font-weight: 500;
}

/* Terminal Password Dock */
.poster-pass-dock {
  background: rgba(10, 10, 9, 0.92);
  border: 1px solid var(--graphite);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 18px 22px;
  max-width: 460px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.8);
}

.dock-header {
  display: flex;
  justify-content: space-between;
  color: var(--lead);
  margin-bottom: 10px;
}

.dock-form {
  display: flex;
  gap: 8px;
}

.dock-input {
  flex: 1;
  background: #000;
  border: 1px solid var(--graphite);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  padding: 10px 14px;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s var(--ease);
}

.dock-input:focus {
  border-color: var(--bone);
}

.dock-btn {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 600;
  padding: 10px 18px;
  border: 1px solid var(--bone);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.dock-btn:hover {
  background: var(--oxide-bright);
  border-color: var(--oxide-bright);
  color: var(--bone);
}

.dock-feedback {
  margin-top: 8px;
  min-height: 16px;
  color: var(--lead);
  font-size: 10.5px;
}

.dock-feedback.error {
  color: #ff5555;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Poster Bottom Manifesto Lockup */
.poster-bottom-bar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 22px var(--g);
  border-top: 1px solid rgba(235, 232, 225, 0.15);
  flex-wrap: wrap;
  gap: 16px;
}

.manifesto-lockup {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 62%;
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.manifesto-lockup .oxide {
  color: var(--oxide-bright);
}

.poster-meta-sub {
  color: var(--lead);
  line-height: 1.6;
  text-align: right;
}

.poster-meta-sub b {
  color: var(--bone);
}

/* ==========================================================================
   UNLOCKED TUTOR PORTAL VIEW
   ========================================================================== */
#portal-view {
  display: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

#portal-view.active {
  display: block;
  opacity: 1;
}

/* Sticky Navigation */
.portal-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px var(--g);
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.nav-brand-title {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 62%;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 6px 12px;
  border: 1px solid var(--graphite);
  color: var(--lead);
  transition: all 0.2s var(--ease);
  font-size: 11px;
}

.tab-btn:hover {
  color: var(--bone);
  border-color: var(--silver);
}

.tab-btn.active {
  background: var(--bone);
  color: var(--ink);
  border-color: var(--bone);
  font-weight: 600;
}

.lock-btn {
  padding: 6px 12px;
  border: 1px solid var(--oxide);
  color: var(--oxide-bright);
  font-size: 11px;
  transition: all 0.2s var(--ease);
}

.lock-btn:hover {
  background: var(--oxide);
  color: var(--bone);
}

/* Main Content Area */
.portal-main {
  padding: 36px var(--g) 80px;
  max-width: 1560px;
  margin: 0 auto;
}

.portal-section {
  display: none;
  animation: fadeIn 0.35s var(--ease);
}

.portal-section.active {
  display: block;
}

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

.section-head {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 16px;
}

.section-title {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.9;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--lead);
  max-width: 80ch;
  line-height: 1.6;
}

/* External Link Bar */
.external-links-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.ext-link-pill {
  padding: 8px 14px;
  border: 1px solid var(--graphite);
  color: var(--silver);
  text-decoration: none;
  background: #0a0a09;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s var(--ease);
}

.ext-link-pill:hover {
  border-color: var(--bone);
  color: var(--bone);
  background: #111;
}

/* Motion Reel Grid & Filters */
.reel-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 5px 12px;
  border: 1px solid var(--graphite);
  color: var(--lead);
  font-size: 11px;
}

.filter-btn.active {
  border-color: var(--oxide);
  color: var(--bone);
  background: rgba(164, 71, 31, 0.15);
}

.reel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.reel-card {
  background: #000;
  border: 1px solid var(--graphite);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
  cursor: pointer;
}

.reel-card:hover {
  border-color: var(--bone);
  transform: translateY(-2px);
}

.card-media-wrap {
  position: relative;
  aspect-ratio: 4/5;
  background: #080808;
  overflow: hidden;
}

.card-media-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 7px;
  background: rgba(5,5,5,0.8);
  border: 1px solid var(--bone);
  color: var(--bone);
  font-size: 10px;
  z-index: 2;
}

.card-badge.new {
  border-color: var(--oxide-bright);
  color: var(--oxide-bright);
}

.card-meta {
  padding: 14px 16px;
  border-top: 1px solid var(--rule);
  background: #0a0a09;
}

.card-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.card-code {
  color: var(--bone);
  font-weight: 600;
}

.card-type {
  color: var(--lead);
}

.card-title {
  color: var(--silver);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-desc {
  color: var(--lead);
  font-size: 11px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Document & Workbook Cards */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.doc-card {
  background: #0a0a09;
  border: 1px solid var(--graphite);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s var(--ease);
}

.doc-card:hover {
  border-color: var(--silver);
}

.doc-badge {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--oxide);
  color: var(--oxide-bright);
  margin-bottom: 12px;
}

.doc-badge.status-dev {
  border-color: var(--lead);
  color: var(--lead);
}

.doc-card-title {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 62%;
  font-size: 2.1rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 0.95;
  margin-bottom: 10px;
}

.doc-card-desc {
  color: var(--lead);
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.doc-meta-table {
  border-top: 1px solid var(--rule);
  margin-bottom: 20px;
  padding-top: 10px;
  font-size: 11px;
}

.doc-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--silver);
}

.doc-meta-row span {
  color: var(--lead);
}

.doc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-doc {
  padding: 9px 15px;
  border: 1px solid var(--bone);
  background: var(--bone);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 600;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s var(--ease);
}

.btn-doc:hover {
  background: var(--oxide-bright);
  border-color: var(--oxide-bright);
  color: var(--bone);
}

.btn-doc.outline {
  background: none;
  color: var(--bone);
  border-color: var(--graphite);
}

.btn-doc.outline:hover {
  border-color: var(--bone);
  color: var(--bone);
}

/* Assumptions Table */
.assumptions-wrap {
  background: #000;
  border: 1px solid var(--graphite);
  overflow-x: auto;
}

.assumptions-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.assumptions-table th {
  background: #0e0e0d;
  padding: 12px 16px;
  border-bottom: 1px solid var(--graphite);
  color: var(--lead);
  font-family: var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.assumptions-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--silver);
  vertical-align: top;
}

.assumptions-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.status-tag {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  border: 1px solid currentColor;
}

.status-tag.established { color: #5cb85c; }
.status-tag.to-test { color: #f0ad4e; }
.status-tag.to-verify { color: var(--oxide-bright); }

/* Theater Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  place-items: center;
  padding: var(--g);
}

.modal-overlay.open {
  display: grid;
}

.modal-box {
  background: #050505;
  border: 1px solid var(--silver);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.9);
}

.modal-media {
  position: relative;
  background: #000;
  max-height: 65vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.modal-media video {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  display: block;
}

.modal-info {
  padding: 16px 20px;
  background: #0a0a09;
  border-top: 1px solid var(--rule);
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 10;
  padding: 5px 9px;
  border: 1px solid var(--graphite);
  background: rgba(0,0,0,0.8);
  color: var(--bone);
  font-size: 11px;
}

.modal-close-btn:hover {
  background: var(--oxide);
  border-color: var(--oxide);
}
