/* ============================================================
   AetherEngine Labs — Public Showcase Site
   Two-level nav: top bar (show selector) + left sidebar (show pages)
   ============================================================ */

/* --- Design tokens (from AetherEngine Labs brand art) --- */
:root {
  /* Studio register — extracted from ael-logo.png / ael-banner.png */
  --studio-bg: #000010;
  --studio-surface: #0a0a1e;
  --studio-text: #f0f0f0;
  --studio-muted: #6a7a8a;
  --studio-accent: #06dfe7;
  --studio-accent-dim: #0a9aa0;
  --studio-border: #101830;

  /* Hunter Tapes register */
  --tape-bg: #0c0a08;
  --tape-surface: #1a1612;
  --tape-surface-2: #241d15;
  --tape-text: #d8c9b0;
  --tape-muted: #8a7d66;
  --tape-accent: #c47b3a;
  --tape-rule: #3a2f22;
  --tape-cream: #e8dcc4;

  /* Shared */
  --topbar-height: 56px;
  --sidebar-width: 200px;
  --footer-height: 44px;
}

/* --- Reset / base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--studio-bg);
  color: var(--studio-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--studio-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ============================================================
   TOP BAR — studio-level show selector (always visible)
   ============================================================ */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: #000008;
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 200;
  gap: 1.5rem;
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.topbar-logo img {
  height: 32px;
  width: auto;
  border-radius: 4px;
}
.topbar-logo .tb-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--studio-text);
  line-height: 1.1;
}
.topbar-logo .tb-name span { color: var(--studio-accent); }

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.topbar-link {
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--studio-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.topbar-link:hover { background: var(--sidebar-hover, #0a1228); color: var(--studio-text); text-decoration: none; }
.topbar-link.active { color: var(--studio-accent); }
.topbar-link.disabled { color: #3a4858; cursor: default; }
.topbar-link.disabled:hover { background: none; color: #3a4858; }

.topbar-spacer { flex: 1; }

/* ============================================================
   PAGE SHELL — below topbar
   ============================================================ */

.page-shell {
  display: flex;
  min-height: calc(100vh - var(--topbar-height) - var(--footer-height));
  margin-top: var(--topbar-height);
  margin-bottom: var(--footer-height);
}

/* ============================================================
   LEFT SIDEBAR — contextual show navigation (show pages only)
   ============================================================ */

.left-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: #000008;
  border-right: 1px solid var(--studio-border);
  padding: 2rem 1rem;
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: var(--footer-height);
  overflow-y: auto;
  z-index: 100;
}

/* When inside Hunter Tapes themed pages, sidebar gets themed */
.hunter-tapes-page .left-sidebar {
  background: var(--tape-bg);
  border-right-color: var(--tape-rule);
}

.sidebar-section-label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3a4858;
  margin: 0 0 0.6rem;
  padding-left: 0.75rem;
}
.sidebar-section-label:not(:first-child) { margin-top: 1.5rem; }
.sidebar-divider {
  height: 1px;
  background: var(--studio-border);
  margin: 1.5rem 0.5rem;
}
.hunter-tapes-page .sidebar-divider { background: var(--tape-rule); }
.hunter-tapes-page .sidebar-section-label { color: var(--tape-muted); }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.88rem;
  color: var(--studio-muted);
  text-decoration: none;
  margin-bottom: 0.15rem;
  transition: background 0.15s, color 0.15s;
}
.sidebar-item:hover { background: #0a1228; color: var(--studio-text); text-decoration: none; }
.sidebar-item.active { color: var(--studio-accent); background: #0a1228; border-left: 2px solid var(--studio-accent); padding-left: calc(0.75rem - 2px); }

.hunter-tapes-page .sidebar-item { color: var(--tape-muted); font-family: Georgia, serif; }
.hunter-tapes-page .sidebar-item:hover { background: var(--tape-surface); color: var(--tape-cream); }
.hunter-tapes-page .sidebar-item.active { color: var(--tape-accent); background: var(--tape-surface); }

/* Sidebar social links (bottom of sidebar) */
.sidebar-social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--studio-muted);
  text-decoration: none;
  margin-bottom: 0.15rem;
  transition: background 0.15s, color 0.15s;
}
.sidebar-social-link:hover { background: #0a1228; color: var(--studio-text); text-decoration: none; }
.sidebar-social-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.hunter-tapes-page .sidebar-social-link { color: var(--tape-muted); }
.hunter-tapes-page .sidebar-social-link:hover { background: var(--tape-surface); color: var(--tape-cream); }

/* ============================================================
   FOOTER — fixed permanent bar, always visible at bottom
   ============================================================ */

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  background: #000008;
  border-top: 1px solid var(--studio-border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--studio-muted);
  z-index: 200;
}
.site-footer .footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.site-footer .footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--studio-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer .footer-links a:hover { color: var(--studio-text); }
.site-footer .footer-links svg { width: 16px; height: 16px; flex-shrink: 0; }
.site-footer .footer-copy {
  color: #2a3848;
  font-size: 0.7rem;
  white-space: nowrap;
}

/* Themed footer on Hunter Tapes pages */
.hunter-tapes-page .site-footer {
  background: #060503;
  border-top-color: var(--tape-rule);
}
.hunter-tapes-page .site-footer .footer-links a { color: var(--tape-muted); }
.hunter-tapes-page .site-footer .footer-links a:hover { color: var(--tape-cream); }
.hunter-tapes-page .site-footer .footer-copy { color: #4a3d30; }

/* ============================================================
   CONTENT AREA
   ============================================================ */

.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
  animation: fade-in 0.4s ease-out;
}

/* --- Studio register content --- */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.studio-content {
  background: var(--studio-bg);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(6, 223, 231, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(6, 223, 231, 0.025) 0%, transparent 50%);
  color: var(--studio-text);
}

.studio-main {
  max-width: 820px;
  padding: 3rem 3rem 2rem;
  margin: 0 auto;
}
.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--studio-text);
  letter-spacing: -0.02em;
}
.page-title-underline {
  width: 48px;
  height: 3px;
  background: var(--studio-accent);
  border-radius: 2px;
  margin-bottom: 2rem;
}
.prose p { margin: 0 0 1rem; max-width: 42rem; }
.prose h2 {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--studio-accent);
  margin: 2.5rem 0 1rem;
}
.prose h2:first-child { margin-top: 0; }
.studio-banner {
  width: 100%;
  max-width: 720px;
  border-radius: 10px;
  margin-bottom: 3rem;
  border: 1px solid var(--studio-border);
}
.studio-tagline {
  font-size: 1.35rem;
  color: var(--studio-muted);
  max-width: 32rem;
  margin: 0 0 3.5rem;
  line-height: 1.5;
}
.studio-section-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--studio-muted);
  margin: 0 0 1.25rem;
}

/* Project grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.project-card {
  display: block;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  overflow: hidden;
  color: var(--studio-text);
  transition: border-color 0.2s, transform 0.2s;
}
.project-card:hover { text-decoration: none; border-color: var(--studio-accent); transform: translateY(-3px); box-shadow: 0 0 24px rgba(6, 223, 231, 0.08); }
.project-card .pc-body { padding: 1.5rem; }
.project-card .pc-label { font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--studio-accent); margin-bottom: 0.5rem; }
.project-card .pc-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem; }
.project-card .pc-hook { font-size: 0.85rem; color: var(--studio-muted); }
.project-card.placeholder { border-style: dashed; background: transparent; cursor: default; }
.project-card.placeholder .pc-title { color: var(--studio-muted); font-weight: 500; }
.project-card.placeholder:hover { border-color: var(--studio-border); transform: none; }

/* Studio social row */
.studio-social-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}
.social-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  color: var(--studio-text);
  transition: border-color 0.2s, transform 0.2s;
}
.social-card:hover { text-decoration: none; border-color: var(--studio-accent); transform: translateY(-3px); box-shadow: 0 0 20px rgba(6, 223, 231, 0.06); }
.social-card svg { width: 24px; height: 24px; flex-shrink: 0; }
.social-card .sc-label { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--studio-muted); }
.social-card .sc-name { font-size: 0.95rem; font-weight: 600; }

/* ============================================================
   HUNTER TAPES REGISTER (themed content)
   ============================================================ */

.hunter-tapes-content {
  background: var(--tape-bg);
  color: var(--tape-text);
  font-family: Georgia, "Times New Roman", serif;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(184, 92, 58, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(58, 47, 34, 0.15) 0%, transparent 60%);
  min-height: calc(100vh - var(--topbar-height));
}
.hunter-tapes-content a { color: var(--tape-accent); }
.hunter-tapes-content { animation: fade-in 0.4s ease-out; }

.tape-main {
  flex: 1;
  max-width: 780px;
  padding: 3rem 3rem 2rem;
  width: 100%;
}

/* Show logo */
.ht-logo {
  max-width: 320px;
  margin-bottom: 1.5rem;
}

/* Hero */
.tape-hero {
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--tape-rule);
}
.tape-hero h1 {
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.04em;
  color: var(--tape-cream);
  margin: 0 0 1rem;
  line-height: 1.05;
}
.tape-logline {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--tape-muted);
  max-width: 30rem;
  border-left: 3px solid var(--tape-accent);
  padding-left: 1rem;
  margin: 0;
}

/* Section headings */
.tape-section { margin-bottom: 3.5rem; }
.tape-section h2 {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tape-accent);
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--tape-rule);
}
.tape-section p { margin: 0 0 1rem; max-width: 38rem; }

/* CTA buttons */
.tape-cta-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.tape-cta {
  display: inline-block;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.65rem 1.3rem;
  border: 1px solid var(--tape-accent);
  color: var(--tape-cream);
  background: transparent;
  border-radius: 2px;
  transition: background 0.2s;
}
.tape-cta:hover { background: var(--tape-accent); color: var(--tape-bg); text-decoration: none; }
.tape-cta.secondary { border-color: var(--tape-rule); color: var(--tape-muted); }
.tape-cta.secondary:hover { border-color: var(--tape-cream); color: var(--tape-cream); background: transparent; }

/* ============================================================
   FILE CARDS (episodes + bestiary)
   ============================================================ */

.file-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.file-card {
  background: var(--tape-surface);
  border: 1px solid var(--tape-rule);
  border-left: 3px solid var(--tape-accent);
  border-radius: 2px;
  overflow: hidden;
}
.file-card-body { padding: 1.5rem; }
.file-card .fc-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-bottom: 1px solid var(--tape-rule);
  transition: transform 0.3s ease;
  display: block;
}
.file-card:hover .fc-thumb { transform: scale(1.03); }
.file-card > a {
  overflow: hidden;
  display: block;
  line-height: 0;
}
.file-card .fc-meta {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tape-muted);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.file-card .fc-name {
  font-family: "Courier New", Courier, monospace;
  font-size: 1.4rem;
  color: var(--tape-cream);
  margin: 0 0 0.4rem;
  letter-spacing: 0.03em;
}
.file-card .fc-aka { font-style: italic; color: var(--tape-muted); font-size: 0.88rem; margin-bottom: 0.75rem; }
.file-card .fc-hook { color: var(--tape-text); margin: 0 0 1rem; }
.file-card .fc-blurb { color: var(--tape-muted); font-size: 0.92rem; margin: 0 0 1.25rem; max-width: 42rem; }
.file-card .fc-region { font-family: "Courier New", Courier, monospace; font-size: 0.7rem; color: var(--tape-muted); margin-bottom: 0.75rem; }
.file-card .fc-watch {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.73rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tape-accent);
}
.file-card .fc-watch:hover { color: var(--tape-cream); }
.file-card.bestiary .file-card-body { padding: 1.25rem 1.5rem; }
.file-card.bestiary .fc-name { font-size: 1.2rem; }

.bestiary-note {
  font-style: italic;
  color: var(--tape-muted);
  text-align: center;
  margin-top: 3rem;
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.05em;
}

/* ============================================================
   FIELD NOTES
   ============================================================ */

.field-note {
  background: var(--tape-surface);
  border: 1px solid var(--tape-rule);
  border-radius: 2px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
}
.field-note::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 27px,
    rgba(200, 180, 140, 0.04) 27px,
    rgba(200, 180, 140, 0.04) 28px
  );
  pointer-events: none;
  border-radius: 2px;
}
.field-note .fn-date {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tape-accent);
  margin-bottom: 0.5rem;
}
.field-note h3 {
  font-family: "Courier New", Courier, monospace;
  font-size: 1.2rem;
  color: var(--tape-cream);
  margin: 0 0 1rem;
}
.field-note p { margin: 0 0 1rem; }
.field-note p:last-child { margin-bottom: 0; }

.about-block { max-width: 42rem; }
.about-block p { margin-bottom: 1rem; }

/* Creator cards (About Us) */
.creators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.creator-card {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
}
.creator-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--studio-accent), var(--studio-accent-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--studio-bg);
}
.creator-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--studio-text);
  margin: 0 0 0.3rem;
}
.creator-role {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--studio-accent);
  margin: 0 0 1rem;
}
.creator-bio {
  font-size: 0.9rem;
  color: var(--studio-muted);
  margin: 0;
  line-height: 1.5;
}

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

@media (max-width: 900px) {
  .topbar { padding: 0 1rem; gap: 0.75rem; overflow-x: auto; }
  .topbar-logo .tb-name { display: none; }
  .topbar-social { display: none; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .left-sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--studio-border);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    overflow: visible;
  }
  .hunter-tapes-page .left-sidebar { border-bottom-color: var(--tape-rule); }
  .sidebar-section-label { display: none; }
  .sidebar-item { display: inline-block; padding: 0.3rem 0.6rem; font-size: 0.82rem; }
  .sidebar-item.active { border-left: none; padding-left: 0.6rem; }
  .content { margin-left: 0; }
  .studio-main, .tape-main { padding: 2rem 1.25rem 2rem; }
  .site-footer { padding: 0 1rem; font-size: 0.7rem; }
  .site-footer .footer-links { gap: 1rem; }
  .site-footer .footer-copy { display: none; }
}

@media (max-width: 480px) {
  .topbar-nav { gap: 0; }
  .topbar-link { padding: 0.35rem 0.5rem; font-size: 0.78rem; }
}
