/* BIODOM ARCHITECT ATELIER — Tablet App & Trojan Horse Partner System */
:root {
  --ink: #0d0f10;
  --void: #070809;
  --surface: #121619;
  --surface-elev: #181d21;
  --surface-glass: rgba(18, 22, 25, 0.86);
  --paper: #f6f4f1;
  --muted: #9aa4ad;
  --green: #39b54a;
  --blue: #1b75bb;
  --hydro: #8ec9ff;
  --amber: #d4a359;
  --hairline: rgba(246, 244, 241, 0.1);
  --hairline-strong: rgba(246, 244, 241, 0.22);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  font-family: "Golos Text", -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.serif-italic {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

/* ---------- Top Navigation (Desktop & Landscape Tablet Only) ---------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(13, 15, 16, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  height: 26px;
  width: auto;
  filter: brightness(0) invert(1);
}

.vip-studio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(57, 181, 74, 0.1);
  border: 1px solid rgba(57, 181, 74, 0.35);
  border-radius: 3px;
  font-size: 11px;
  color: var(--paper);
  white-space: nowrap;
}

.led-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
}

.nav-tabs-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab-btn:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab-btn.active {
  color: var(--paper);
  background: rgba(142, 201, 255, 0.1);
  border-color: rgba(142, 201, 255, 0.38);
}

.nav-tab-btn .idx {
  color: var(--hydro);
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Mobile Bottom Dock (Strictly Exclusive to Small Portrait Screens) ---------- */
.mobile-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(13, 15, 16, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--hairline);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}

.mobile-dock-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 46px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.mobile-dock-btn.active {
  color: var(--hydro);
}

@media (max-width: 960px) {
  .nav-tabs-desktop {
    display: none !important;
  }
  .mobile-dock {
    display: flex !important;
  }
  body {
    padding-bottom: 68px;
  }
}

/* ---------- Main Container & Views ---------- */
.atelier-main {
  max-width: 1560px;
  margin: 0 auto;
  padding: 24px;
}

.view-panel {
  display: none;
  animation: fadeIn 0.28s ease;
}

.view-panel.active {
  display: block;
}

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

/* ---------- Hero Banner with Trojan Horse Studio Bar ---------- */
.hero-strip {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(24, 29, 33, 0.92), rgba(13, 15, 16, 0.96));
  border: 1px solid var(--hairline);
  border-radius: 4px;
  margin-bottom: 22px;
  position: relative;
}

.hero-eyebrow {
  font-size: 11px;
  color: var(--hydro);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-title {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 640px;
}

.studio-switcher-box {
  background: rgba(13, 15, 16, 0.78);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.studio-switcher-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.atelier-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: #0a0c0d;
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  color: var(--paper);
  font-family: "Golos Text", sans-serif;
  font-size: 14px;
}

.atelier-input:focus {
  outline: none;
  border-color: var(--hydro);
}

/* ---------- 4 Interactive Tablet Cards (Bento Grid) ---------- */
.bento-hub {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 860px) {
  .hero-strip {
    grid-template-columns: 1fr;
  }
  .bento-hub {
    grid-template-columns: 1fr;
  }
}

.hub-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 330px;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.hub-card:hover {
  transform: translateY(-3px);
  border-color: var(--hydro);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}

.hub-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.34;
  transition: transform 0.5s ease, opacity 0.35s ease;
}

.hub-card:hover .hub-card-bg {
  transform: scale(1.04);
  opacity: 0.46;
}

.hub-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 15, 16, 0.45) 0%, rgba(13, 15, 16, 0.94) 75%, #0d0f10 100%);
}

.hub-card-top,
.hub-card-body {
  position: relative;
  z-index: 2;
  padding: 22px 24px;
}

.hub-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-index-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  background: rgba(13, 15, 16, 0.82);
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  font-size: 11px;
  color: var(--hydro);
}

.card-status-tag {
  font-size: 10.5px;
  padding: 5px 10px;
  border-radius: 3px;
  background: rgba(57, 181, 74, 0.14);
  border: 1px solid rgba(57, 181, 74, 0.4);
  color: #79e689;
}

.hub-card-title {
  font-size: clamp(20px, 2.1vw, 26px);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 10px;
}

.hub-card-desc {
  font-size: 14px;
  color: #c7cfd6;
  line-height: 1.55;
  margin-bottom: 18px;
}

.hub-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 18px;
  background: var(--green);
  color: #061108;
  border: none;
  border-radius: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--paper);
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover,
.btn-secondary.active {
  background: rgba(142, 201, 255, 0.14);
  border-color: var(--hydro);
}

/* ---------- View 01: Interactive Presentation Frame ---------- */
.pres-frame-wrap {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 16px;
  height: calc(100vh - 110px);
  min-height: 620px;
}

@media (max-width: 1024px) {
  .pres-frame-wrap {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.stops-sidebar {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stops-sidebar-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-elev);
}

.stops-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stop-jump-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--paper);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stop-jump-item:hover,
.stop-jump-item.active {
  background: rgba(142, 201, 255, 0.1);
  border-color: rgba(142, 201, 255, 0.35);
}

.stop-jump-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--hydro);
  padding: 3px 6px;
  background: rgba(142, 201, 255, 0.1);
  border-radius: 2px;
}

.pres-stage {
  position: relative;
  background: #000;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pres-vip-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #0b0d0e;
  border-bottom: 1px solid var(--hairline);
}

.pres-iframe-holder {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #060708;
  min-height: 540px;
}

.pres-iframe {
  width: 100%;
  height: 100%;
  border: none;
  transition: width 0.3s ease;
}

.pres-iframe.portrait-mode {
  max-width: 430px;
  border-left: 1px solid var(--hairline-strong);
  border-right: 1px solid var(--hairline-strong);
}

/* ---------- View 02: Cinema Auto-Player ---------- */
.cinema-shell {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}

.cinema-viewport {
  position: relative;
  width: 100%;
  height: 64vh;
  min-height: 420px;
  max-height: 680px;
  background: #050607;
  overflow: hidden;
}

#cinemaCanvas,
#cinemaCustomVideo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cinema-vip-watermark {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.cinema-watermark-pill {
  padding: 7px 14px;
  background: rgba(13, 15, 16, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  font-size: 11px;
}

.cinema-stop-overlay {
  position: absolute;
  left: 24px;
  bottom: 24px;
  max-width: 520px;
  padding: 20px 22px;
  background: rgba(13, 15, 16, 0.86);
  backdrop-filter: blur(18px);
  border: 1px solid var(--hairline-strong);
  border-left: 3px solid var(--green);
  border-radius: 4px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

.cinema-stop-overlay.visible {
  opacity: 1;
  transform: translateY(0);
}

.cinema-spec-tag {
  display: inline-block;
  padding: 4px 9px;
  margin-right: 6px;
  margin-top: 8px;
  background: rgba(142, 201, 255, 0.12);
  border: 1px solid rgba(142, 201, 255, 0.3);
  border-radius: 2px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--hydro);
}

.cinema-var-pill {
  display: inline-block;
  padding: 4px 8px;
  margin-right: 6px;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  font-size: 11px;
  color: var(--muted);
}

.cinema-var-pill.active {
  background: rgba(57, 181, 74, 0.2);
  border-color: var(--green);
  color: #fff;
}

.cinema-controls-bar {
  padding: 14px 20px;
  background: var(--surface-elev);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cinema-timeline {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.cinema-timeline-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--hydro));
}

.cinema-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cinema-chapter-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cinema-chapter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.cinema-chapter-btn.active {
  background: rgba(57, 181, 74, 0.16);
  border-color: var(--green);
  color: var(--paper);
}

.cinema-chapter-btn .ch-num {
  font-family: "JetBrains Mono", monospace;
  color: var(--hydro);
  font-weight: 700;
}

/* ---------- View 03: Trojan Horse Configurator & VIP Invite Generator ---------- */
.trojan-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .trojan-grid {
    grid-template-columns: 1fr;
  }
}

.spec-stops-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 4px;
}

@media (max-width: 680px) {
  .spec-stops-grid {
    grid-template-columns: 1fr;
  }
}

.spec-stop-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease;
}

.spec-stop-card.selected {
  border-color: var(--green);
  background: rgba(57, 181, 74, 0.06);
}

.spec-output-box {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.script-textarea {
  width: 100%;
  min-height: 128px;
  padding: 12px;
  background: #090b0c;
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  color: var(--paper);
  font-family: "Golos Text", sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
}

/* ---------- View 04: 3D NFC Card Atelier ---------- */
.nfc-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .nfc-grid {
    grid-template-columns: 1fr;
  }
}

.nfc-stage-panel {
  background: radial-gradient(circle at 50% 40%, #1c242b 0%, #0b0d0f 75%);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 540px;
}

#nfcThreeViewport {
  width: 100%;
  height: 410px;
  cursor: grab;
}

#nfcThreeViewport:active {
  cursor: grabbing;
}

/* ---------- VIP Lock Gate Modal (Preview of Competitor Protection) ---------- */
.gate-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7, 8, 9, 0.94);
  backdrop-filter: blur(24px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gate-modal-backdrop.open {
  display: flex;
}

.gate-modal-card {
  max-width: 500px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-top: 3px solid var(--green);
  border-radius: 4px;
  padding: 32px 28px;
  text-align: center;
}

/* Allow tablet navigation and grid children to fit without clipping. */
.top-nav, .brand-cluster, .top-actions, .nav-tabs-desktop { flex-wrap: wrap; }
.top-nav > *, .nfc-grid > *, .trojan-grid > *, .hub-hero > * { min-width: 0; }
.nfc-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.trojan-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .95fr); }
input, select, textarea { min-width: 0; max-width: 100%; }
@media (max-width: 1024px) {
  .nfc-grid, .trojan-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .top-nav { padding: 10px 12px; }
  .brand-cluster { gap: 8px; }
  .atelier-main { padding: 12px; }
}

/* Keep the product inspector usable during a portrait tablet demonstration. */
@media (max-width: 860px) {
  #presStopInspector > div > div[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  #inspStopImg { height: 220px !important; }
}
