/* ============================================
   META.CSS — Aperture Cosmology shared styles
   Used by: core-framework.html, dimensional-architecture.html
            fractal-consciousness.html, aperture-partition.html, 
            lucid-knowledge.html, two-apertures.html
   ============================================ */

/* ===== BASE VARIABLES ===== */
:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #111116;
  --bg-tertiary: #18181f;
  --bg-card: #13131a;
  --text-primary: #e8e6e1;
  --text-secondary: #9e9a91;
  --text-tertiary: #6b6860;
  --accent-gold: #c9a84c;
  --accent-gold-dim: #8a7234;
  --accent-blue: #5b7fa6;
  --accent-blue-dim: #3a5470;
  --accent-violet: #8b6fa6;
  --accent-violet-dim: #5e4a73;
  --accent-teal: #5a9e8f;
  --accent-teal-dim: #3d6b60;
  --border-subtle: #222230;
  --border-faint: #1a1a24;
}

/* ===== RESET & BODY ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== COSMOS BACKGROUND ===== */
.cosmos-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}

/* ===== BACK NAV ===== */
.back-nav {
  position: relative; z-index: 2;
  max-width: 720px; margin: 0 auto;
  padding: 20px 24px 0;
}
.back-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-gold-dim); text-decoration: none;
  transition: color 0.3s ease;
}
.back-link:hover { color: var(--accent-gold); }
.back-link::before { content: '← '; }

/* ===== CONTAINER ===== */
.container {
  position: relative; z-index: 1;
  max-width: 720px; margin: 0 auto;
  padding: 60px 24px 100px;
}

/* ===== DEFINITION HEADER ===== */
.definition-header {
  margin-bottom: 48px; padding-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}
.term {
  font-family: 'Cormorant Garamond', serif; font-size: 2.6rem;
  font-weight: 300; letter-spacing: 0.01em;
  color: var(--text-primary); margin-bottom: 4px;
}
.phonetic {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem;
  font-weight: 300; color: var(--text-tertiary);
  letter-spacing: 0.03em; margin-bottom: 8px;
}
.pos-domain {
  font-size: 0.8rem; font-weight: 400; color: var(--text-secondary);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 20px;
}
.pos-domain span { color: var(--accent-gold-dim); }
.definition-body {
  font-size: 1rem; color: var(--text-secondary); line-height: 1.85;
}
.definition-body strong { color: var(--text-primary); font-weight: 500; }

/* ===== SECTIONS ===== */
.section { margin-bottom: 48px; }
.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-gold-dim); margin-bottom: 20px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border-faint);
}

/* ===== TENET CARDS ===== */
.tenet {
  margin-bottom: 24px; padding: 20px 24px;
  background: var(--bg-card);
  border-left: 2px solid var(--accent-gold-dim);
  border-radius: 0 4px 4px 0;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.tenet:hover {
  border-left-color: var(--accent-gold);
  background: var(--bg-tertiary);
}
.tenet-name {
  font-family: 'Cormorant Garamond', serif; font-size: 1.15rem;
  font-weight: 600; color: var(--text-primary);
  margin-bottom: 8px; letter-spacing: 0.01em;
}
.tenet-body {
  font-size: 0.92rem; color: var(--text-secondary); line-height: 1.8;
}
.tenet-body .key-term { color: var(--text-primary); font-weight: 400; }
.tenet-body em { font-style: italic; }

/* ===== SPECIAL BLOCKS ===== */
.special-block {
  margin-bottom: 24px; padding: 24px;
  border: 1px solid var(--border-subtle); border-radius: 4px;
}
.special-block .special-title {
  font-family: 'Cormorant Garamond', serif; font-size: 1.1rem;
  font-weight: 600; color: var(--text-primary); margin-bottom: 12px;
}
.special-block .special-body {
  font-size: 0.92rem; color: var(--text-secondary); line-height: 1.8;
}
.special-block .special-body .key-term {
  color: var(--text-primary); font-weight: 400;
}

/* ===== CONCLUSION BLOCK ===== */
.conclusion-block {
  margin: 40px 0 8px; padding: 32px 28px;
  border: 1px solid var(--border-subtle); border-radius: 4px;
  position: relative;
}
.conclusion-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem; font-weight: 400;
  letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 14px;
}
.conclusion-title {
  font-family: 'Cormorant Garamond', serif; font-size: 1.3rem;
  font-weight: 500; color: var(--text-primary);
  margin-bottom: 16px; letter-spacing: 0.01em;
}
.conclusion-body {
  font-size: 0.92rem; color: var(--text-secondary); line-height: 1.85;
}
.conclusion-body .key-term { color: var(--text-primary); font-weight: 400; }

/* ===== SEE ALSO ===== */
.see-also {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border-faint);
}
.see-also-label {
  font-size: 0.8rem; color: var(--text-tertiary);
  margin-bottom: 10px; font-style: italic;
}
.see-also-list {
  font-family: 'Cormorant Garamond', serif; font-size: 1rem;
  color: var(--text-secondary); font-style: italic; line-height: 1.9;
}

/* ===== ATTRIBUTION ===== */
.attribution {
  margin-top: 56px; padding-top: 20px;
  border-top: 1px solid var(--border-faint);
  font-size: 0.75rem; color: var(--text-tertiary);
  font-style: italic; line-height: 1.7;
}


/* ===== SECTION IMAGES ===== */
.section-hero {
  width: 100%; margin-bottom: 40px;
  border-radius: 4px; overflow: hidden;
}
.section-hero img {
  width: 100%; height: auto; display: block; border-radius: 4px;
}
.section-hero.portrait {
  display: flex; flex-direction: column; align-items: center;
}
.section-hero.portrait img {
  max-height: 600px; width: auto; max-width: 100%;
}
.img-caption {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem; font-weight: 300;
  color: var(--text-tertiary); letter-spacing: 0.04em;
  margin-top: 10px; line-height: 1.5;
}
.section-break-img {
  margin: 36px 0;
}
.section-break-img img {
  width: 100%; height: auto; display: block; border-radius: 4px;
}
.has-margin-img { position: relative; }
.tenet-thumb {
  float: right; width: 140px; height: 140px;
  margin: 0 0 12px 16px;
  border-radius: 4px; overflow: hidden;
}
.tenet-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; border-radius: 4px;
}
.tenet-thumb .img-caption { display: none; }
.tenet-thumb .dot-connector { display: none; }

/* Image accent borders */
.img-border-gold img { border: 1px solid var(--accent-gold-dim); }
.img-border-silver img { border: 1px solid var(--accent-silver-dim); }

@media (min-width: 1120px) {
  .tenet-thumb {
    float: none; position: absolute;
    left: calc(100% + 28px); top: 50%;
    transform: translateY(-50%);
    width: 180px; height: auto; margin: 0;
  }
  .tenet-thumb img {
    width: 100%; height: auto; object-fit: contain;
  }
  .tenet-thumb .img-caption { display: block; }
  .tenet-thumb .dot-connector {
    display: block; position: absolute;
    left: -16px; top: 50%; transform: translateY(-50%);
    font-size: 0.6rem; line-height: 1;
  }
  .dot-gold { color: var(--accent-gold-dim); }
  .dot-silver { color: var(--accent-silver-dim); }

  /* Force inline (no margin) on desktop */
  .tenet-thumb-inline {
    float: right; position: static;
    transform: none;
    width: 140px; height: 140px;
    margin: 0 0 12px 16px;
  }
  .tenet-thumb-inline img { height: 100%; object-fit: cover; }
  .tenet-thumb-inline .img-caption { display: none; }
  .tenet-thumb-inline .dot-connector { display: none; }
}

/* ===== ENTRANCE ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.definition-header { animation: fadeUp 0.8s ease both; }
.section:nth-of-type(1) { animation: fadeUp 0.8s ease 0.15s both; }
.section:nth-of-type(2) { animation: fadeUp 0.8s ease 0.3s both; }
.section:nth-of-type(3) { animation: fadeUp 0.8s ease 0.45s both; }
.section:nth-of-type(4) { animation: fadeUp 0.8s ease 0.6s both; }
.section:nth-of-type(5) { animation: fadeUp 0.8s ease 0.75s both; }
.see-also { animation: fadeUp 0.8s ease 0.9s both; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .container { padding: 40px 16px 80px; }
  .term { font-size: 2rem; }
  .tenet, .special-block { padding: 16px 18px; }
}

/* ===== COLORED SECTION LABELS ===== */
.section-label.speculative { color: var(--accent-blue-dim); }
.section-label.structural { color: var(--accent-violet-dim); }
.section-label.scaling { color: var(--accent-teal-dim); }

/* ===== COLORED TENET VARIANTS ===== */
.tenet.speculative { border-left-color: var(--accent-blue-dim); }
.tenet.speculative:hover { border-left-color: var(--accent-blue); }
.tenet.structural { border-left-color: var(--accent-violet-dim); }
.tenet.structural:hover { border-left-color: var(--accent-violet); }
.tenet.scaling { border-left-color: var(--accent-teal-dim); }
.tenet.scaling:hover { border-left-color: var(--accent-teal); }

/* ===== SCHISM BLOCK (AC) ===== */
.schism-block {
  margin-bottom: 24px; padding: 24px;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.04) 0%, rgba(91, 127, 166, 0.04) 100%);
  border: 1px solid var(--border-subtle); border-radius: 4px;
}
.schism-title {
  font-family: 'Cormorant Garamond', serif; font-size: 1.1rem;
  font-weight: 600; color: var(--text-primary); margin-bottom: 12px;
}
.schism-body { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.8; }
.school { margin-top: 14px; padding-left: 16px; border-left: 1px solid var(--border-subtle); }
.school-name { font-weight: 500; color: var(--text-primary); font-size: 0.88rem; margin-bottom: 3px; }
.school-desc { font-size: 0.85rem; color: var(--text-tertiary); line-height: 1.7; }

/* ===== DIMENSIONAL LEVEL CARDS (DA) ===== */
.dim-level {
  margin-bottom: 20px; padding: 18px 22px; background: var(--bg-card);
  border-left: 2px solid var(--accent-violet-dim); border-radius: 0 4px 4px 0;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.dim-level:hover { border-left-color: var(--accent-violet); background: var(--bg-tertiary); }
.dim-level-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.dim-level-name {
  font-family: 'Cormorant Garamond', serif; font-size: 1.1rem;
  font-weight: 600; color: var(--text-primary); letter-spacing: 0.01em;
}
.dim-level-tag {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem;
  font-weight: 400; color: var(--accent-violet-dim); letter-spacing: 0.05em;
}
.dim-level-body { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.8; }
.dim-level-body .key-term { color: var(--text-primary); font-weight: 400; }
.dim-freedom {
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-faint);
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem;
  color: var(--text-tertiary); letter-spacing: 0.03em; line-height: 1.6;
}
.dim-freedom strong { color: var(--accent-violet-dim); font-weight: 400; }

/* ===== ORIGIN BLOCK (DA) ===== */
.origin-block {
  margin-bottom: 24px; padding: 24px;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.04) 0%, rgba(139, 111, 166, 0.04) 100%);
  border: 1px solid var(--border-subtle); border-radius: 4px;
}
.origin-title {
  font-family: 'Cormorant Garamond', serif; font-size: 1.1rem;
  font-weight: 600; color: var(--text-primary); margin-bottom: 12px;
}
.origin-body { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.8; }
.origin-body .key-term { color: var(--text-primary); font-weight: 400; }

/* ===== THRESHOLD DIVIDER (DA) ===== */
.threshold {
  margin: 28px 0; padding: 12px 20px;
  border-left: 2px solid var(--accent-gold-dim); border-right: 2px solid var(--accent-gold-dim);
  text-align: center; font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem;
  font-weight: 400; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent-gold-dim);
}

/* ===== DUAL BLOCK (FC) ===== */
.dual-block {
  margin-bottom: 24px; padding: 24px;
  background: linear-gradient(135deg, rgba(90, 158, 143, 0.04) 0%, rgba(201, 168, 76, 0.04) 100%);
  border: 1px solid var(--border-subtle); border-radius: 4px;
}
.dual-title {
  font-family: 'Cormorant Garamond', serif; font-size: 1.1rem;
  font-weight: 600; color: var(--text-primary); margin-bottom: 12px;
}
.dual-body { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.8; }
.dual-body .key-term { color: var(--text-primary); font-weight: 400; }
.dual-block.frontier {
  background: linear-gradient(135deg, rgba(90, 158, 143, 0.04) 0%, rgba(90, 158, 143, 0.02) 100%);
  border: 1px solid #2a4a42;
}
.dual-block.frontier .dual-title { color: var(--text-primary); }

/* ===== ADDITIONAL IMAGE ACCENT BORDERS ===== */
.img-border-blue img { border: 1px solid var(--accent-blue-dim); }
.img-border-violet img { border: 1px solid var(--accent-violet-dim); }
.img-border-teal img { border: 1px solid var(--accent-teal-dim); }

@media (min-width: 1120px) {
  .dot-blue { color: var(--accent-blue-dim); }
  .dot-violet { color: var(--accent-violet-dim); }
  .dot-teal { color: var(--accent-teal-dim); }
}
