/* Echoes of Knossos | Classical Epigraphic Design System */
:root {
  /* Obsidian Basalt Layering */
  --bg-deep: #08090b;
  --bg-primary: #0d0f13;
  --bg-surface: #13161c;
  --bg-surface-raised: #181d26;
  --bg-surface-sunken: #07080a;

  /* Hairline Chiseled Borders */
  --border-stone: #212632;
  --border-stone-light: #2c3343;
  --border-gold: rgba(196, 154, 69, 0.32);
  --border-gold-focus: #dfb557;

  /* Epigraphic Gold & Bronze */
  --gold-bright: #dfb557;
  --gold-antique: #c49a45;
  --gold-deep: #8f6e2b;
  --gold-subtle: rgba(196, 154, 69, 0.08);

  /* Limestone & Parchment Typography */
  --text-pure: #ffffff;
  --text-parchment: #f4efe4;
  --text-stone: #c6beaf;
  --text-muted: #7d7568;

  /* Typography Stacks */
  --font-heading: 'Cinzel', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-parchment);
  font-family: var(--font-body);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Header Masthead */
.site-header {
  background: rgba(13, 15, 19, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-stone);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-antique) 50%, transparent 100%);
  opacity: 0.5;
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.brand-crest {
  width: 44px;
  height: 44px;
  background: #11141a;
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-antique);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  display: block;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  display: block;
  margin-top: 0.2rem;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-btn {
  background: transparent;
  color: var(--text-stone);
  border: 1px solid transparent;
  padding: 0.55rem 1.15rem;
  font-size: 0.86rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold-deep);
  font-weight: 600;
}

.nav-btn:hover {
  color: var(--gold-bright);
  border-color: var(--border-stone-light);
  background: var(--bg-surface);
}

.nav-btn.active {
  color: var(--gold-bright);
  border-color: var(--border-gold);
  background: var(--gold-subtle);
}

.nav-btn.active .nav-idx {
  color: var(--gold-bright);
}

/* Main Container */
.main-container {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 2.75rem 1.5rem;
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: paneIn 0.2s ease-out;
}

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

/* Dossier Banner (Tab 1) */
.dossier-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-stone);
  border-radius: 6px;
  padding: 2.75rem 2.5rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.dossier-meta-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--gold-antique);
  background: var(--gold-subtle);
  border: 1px solid var(--border-gold);
  padding: 0.3rem 0.75rem;
  border-radius: 3px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-pure);
  margin-bottom: 0.85rem;
  line-height: 1.2;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--text-stone);
  max-width: 820px;
  margin-bottom: 2rem;
}

/* Epigraphic Tablet (Quote) */
.epigraphic-tablet {
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-stone);
  border-left: 3px solid var(--gold-antique);
  border-radius: 0 4px 4px 0;
  padding: 1.75rem 2rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.tablet-body p {
  color: var(--text-parchment);
  font-size: 0.96rem;
  line-height: 1.7;
}

.tablet-footer {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-antique);
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-stone);
}

/* Physical Evidence Card */
.evidence-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-stone);
  border-radius: 6px;
  padding: 1.6rem 1.85rem;
}

.evidence-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.evidence-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-antique);
}

.evidence-tag {
  display: block;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--gold-deep);
  font-weight: 600;
}

.evidence-filename {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-pure);
}

.evidence-desc {
  font-size: 0.92rem;
  color: var(--text-stone);
  margin-bottom: 1.25rem;
  max-width: 760px;
}

.evidence-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 1.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(180deg, #c49a45 0%, #9e7529 100%);
  color: #0b0c0e;
  border: 1px solid var(--gold-bright);
  box-shadow: 0 2px 8px rgba(196, 154, 69, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #d8ab4f 0%, #b38531 100%);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-parchment);
  border: 1px solid var(--border-stone);
}

.btn-secondary:hover {
  background: var(--bg-surface-raised);
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

/* Section Headings */
.section-heading {
  margin-bottom: 2rem;
}

.heading-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold-antique);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-pure);
  margin-bottom: 0.5rem;
}

.section-heading p {
  color: var(--text-stone);
  max-width: 820px;
  font-size: 0.98rem;
}

/* Scribe Tabs */
.profiles-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.scribe-card-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border-stone);
  border-radius: 5px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.scribe-card-tab:hover {
  border-color: var(--border-gold);
  background: var(--bg-surface-raised);
}

.scribe-card-tab.active {
  border-color: var(--border-gold-focus);
  background: var(--gold-subtle);
  box-shadow: inset 0 0 0 1px var(--border-gold);
}

.scribe-avatar-box {
  width: 44px;
  height: 44px;
  background: var(--bg-primary);
  border: 1px solid var(--border-stone);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-antique);
  flex-shrink: 0;
}

.scribe-card-tab.active .scribe-avatar-box {
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

.scribe-tab-name {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text-pure);
}

.scribe-tab-handle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Scribe Dossier Card */
.dossier-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-stone);
  border-radius: 6px;
  padding: 2.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.dossier-header {
  border-bottom: 1px solid var(--border-stone);
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
}

.dossier-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.dossier-name {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
}

.dossier-official-title {
  color: var(--text-stone);
  font-size: 0.94rem;
  margin-top: 0.25rem;
}

.dossier-meta-strip {
  display: flex;
  gap: 1.25rem;
  margin: 1.1rem 0 1.25rem;
  flex-wrap: wrap;
}

.meta-chip {
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-stone);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  font-size: 0.78rem;
  color: var(--text-stone);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.meta-chip strong {
  color: var(--gold-antique);
  font-weight: 600;
}

.dossier-bio {
  color: var(--text-parchment);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

/* Archival Container Box */
.cid-vault-box {
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-stone);
  border-radius: 5px;
  padding: 1.4rem;
  margin-bottom: 2.25rem;
}

.cid-vault-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--gold-antique);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.cid-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-deep);
  border: 1px solid var(--border-stone);
  border-radius: 4px;
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  gap: 1rem;
}

.cid-text {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  color: var(--gold-bright);
  word-break: break-all;
}

.btn-copy-sm {
  background: var(--bg-surface);
  border: 1px solid var(--border-stone);
  color: var(--text-stone);
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-copy-sm:hover {
  background: var(--bg-surface-raised);
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

.cid-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Chronological Depositions */
.depositions-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.depositions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.deposition-item {
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-stone);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
}

.deposition-meta-bar {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold-deep);
  margin-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-stone);
  padding-bottom: 0.45rem;
}

.deposition-content {
  color: var(--text-parchment);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Terminal Panel (Tab 3) */
.terminal-panel {
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-stone);
  border-radius: 6px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.terminal-bar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-stone);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-stone-light);
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.terminal-code {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--gold-bright);
}

.prompt {
  color: var(--gold-deep);
  margin-right: 0.5rem;
  user-select: none;
}

/* Downloads Packages Grid */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.package-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-stone);
  border-radius: 6px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.pkg-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.pkg-icon {
  width: 46px;
  height: 46px;
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-antique);
  flex-shrink: 0;
}

.pkg-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--gold-deep);
  font-weight: 600;
  display: block;
}

.pkg-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-top: 0.2rem;
}

.pkg-desc {
  font-size: 0.92rem;
  color: var(--text-stone);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.pkg-meta {
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-stone);
  border-radius: 4px;
  padding: 0.6rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.package-card .btn {
  margin-top: auto;
}

/* Footer */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-stone);
  padding: 1.75rem 1.5rem;
  margin-top: 3.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--gold-deep);
  letter-spacing: 0.06em;
}

.footer-sep {
  margin: 0 0.5rem;
  color: var(--border-stone);
}

/* Responsiveness */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    width: 100%;
    justify-content: space-between;
  }
  .dossier-banner {
    padding: 1.75rem 1.25rem;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .epigraphic-tablet {
    padding: 1.25rem;
  }
  .dossier-card {
    padding: 1.5rem;
  }
  .cid-code-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
