@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: block;
  src: url(https://fonts.gstatic.com/s/archivo/v25/k3kQo8UDI-1M0wlSfdnoLmvDIaI.woff2) format('woff2');
}

/* ==========================================================================
   LOCKJAW LABS DESIGN TOKENS (FROM DOSSIER 001 / WEBSITE_HANDOVER.md)
   ========================================================================== */
:root {
  --black: #0A0A09;      /* grounds, dark sections */
  --bone: #EBE8E1;       /* light grounds, type on dark */
  --oxide: #A4471F;      /* accent on light grounds */
  --oxide-l: #D0693E;    /* accent on dark grounds */
  --grey: #55534D;       /* muted text on light */
  --grey-l: #A29F96;     /* muted text on dark */
  --graphite: #2B2B28;   /* ghost letters (back-cover treatment) */
  --rule-light: rgba(10, 10, 9, 0.35);
  --rule-dark: rgba(235, 232, 225, 0.28);
  --rule: #1c1c1b;
  --display: 'Archivo LJ Condensed', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Helvetica Neue World', 'Helvetica Neue', Helvetica, 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(--black);
  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(--black);
  min-height: 100vh;
}

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

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

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

/* ==========================================================================
   MINIMAL LANDING VIEW (COVER RE-CREATION: SKULL + SLICED WORDMARK + PASS)
   ========================================================================== */
#gate-view {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: var(--black);
  cursor: default;
}

/* Background Skull Video + Vignette */
.skull-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.skull-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  display: block;
  mix-blend-mode: lighten;
  opacity: 0.85;
  transform: translate3d(var(--sx, 0px), var(--sy, 0px), 0) scale(1.03);
  transition: transform 0.12s ease-out;
}

.skull-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 9, 0.6) 0%,
    rgba(10, 10, 9, 0.05) 18%,
    rgba(10, 10, 9, 0.05) 55%,
    rgba(10, 10, 9, 0.82) 85%,
    #0A0A09 100%
  );
  pointer-events: none;
}

.paper-grain {
  position: absolute;
  inset: 0;
  background-image: url('media/paper.webp');
  background-size: 256px;
  mix-blend-mode: soft-light;
  opacity: 0.5;
  pointer-events: none;
}

/* Hairline Header */
.gate-top {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--g);
  color: var(--grey-l);
  border-bottom: 1px solid rgba(235, 232, 225, 0.12);
}

.gate-top .brand {
  color: var(--bone);
  font-weight: 500;
}

.gate-top .brand span {
  color: var(--oxide-l);
}

.gate-top .slice-ro {
  color: var(--grey-l);
}

.gate-top .slice-ro b {
  color: var(--bone);
}

/* Center Stage: Sliced Wordmark + Minimal Pass Dock */
.gate-center-stage {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px var(--g);
  margin: auto 0;
  width: 100%;
}

/* Sliced Wordmark Generator Container */
.wordmark-container {
  position: relative;
  width: min(92vw, 760px);
  margin: 0 auto 36px;
  mix-blend-mode: difference;
}

.sliced-block {
  position: relative;
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: -0.025em;
  user-select: none;
}

/* Keyframe drift for vertebral bands */
@keyframes ljdrift {
  from { transform: translateX(calc(var(--a) + var(--user-x, 0px))); }
  to { transform: translateX(calc(var(--a) * -1 + var(--user-x, 0px))); }
}

.band {
  animation: ljdrift var(--d) ease-in-out var(--dl) infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  .band { animation: none !important; }
}

/* Minimalist Password Dock */
.minimal-pass-dock {
  width: min(88vw, 380px);
  margin: 0 auto;
  text-align: center;
}

.dock-form {
  display: flex;
  background: rgba(10, 10, 9, 0.85);
  border: 1px solid var(--graphite);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.2s var(--ease);
}

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

.dock-input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 12px 16px;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  outline: none;
}

.dock-input::placeholder {
  color: var(--grey-l);
  opacity: 0.6;
}

.dock-btn {
  background: transparent;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 14px;
  padding: 0 16px;
  border-left: 1px solid var(--graphite);
  transition: all 0.2s var(--ease);
}

.dock-btn:hover {
  background: var(--bone);
  color: var(--black);
}

.dock-msg {
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--grey-l);
  min-height: 16px;
  letter-spacing: 0.06em;
}

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

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

/* Gate Footer */
.gate-bottom {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 24px var(--g);
  border-top: 1px solid rgba(235, 232, 225, 0.12);
  color: var(--grey-l);
  flex-wrap: wrap;
  gap: 12px;
}

.gate-bottom a {
  color: var(--grey-l);
  text-decoration: none;
  transition: color 0.2s;
}

.gate-bottom a:hover {
  color: var(--bone);
}

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

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

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

.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(--grey-l);
  transition: all 0.2s var(--ease);
  font-size: 11px;
}

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

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

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

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

.portal-main {
  padding: 40px 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(--graphite);
  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(--grey-l);
  max-width: 80ch;
  line-height: 1.6;
}

.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(--bone);
  text-decoration: none;
  background: #000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s var(--ease);
}

.ext-link-pill:hover {
  border-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(--grey-l);
  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: #000;
  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(10, 10, 9, 0.85);
  border: 1px solid var(--bone);
  color: var(--bone);
  font-size: 10px;
  z-index: 2;
}

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

.card-meta {
  padding: 14px 16px;
  border-top: 1px solid var(--graphite);
  background: var(--black);
}

.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(--grey-l);
}

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

.card-desc {
  color: var(--grey-l);
  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: var(--black);
  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(--grey-l);
}

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

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

.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(--grey-l);
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.doc-meta-table {
  border-top: 1px solid var(--graphite);
  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(--bone);
}

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

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

.btn-doc {
  padding: 9px 15px;
  border: 1px solid var(--bone);
  background: var(--bone);
  color: var(--black);
  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-l);
  border-color: var(--oxide-l);
  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(--grey-l);
  font-family: var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.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-l); }

/* Theater Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.94);
  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: var(--black);
  border: 1px solid var(--grey-l);
  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: var(--black);
  border-top: 1px solid var(--graphite);
}

.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);
}
