﻿/* Clean layout layer: Apple-like color blocks, fewer rules, quieter meta. */

:root {
  --band-1: #f7f2e8;
  --band-2: #eee6d8;
  --band-3: #e9f0ea;
  --band-dark: #0b1412;
  --band-surface: #fffdf8;
  --band-line: rgba(24, 33, 29, 0.10);
  --band-muted: rgba(24, 33, 29, 0.56);
}

html[data-theme="dark"] {
  --band-1: #080c0f;
  --band-2: #0d1515;
  --band-3: #111a17;
  --band-dark: #05090a;
  --band-surface: #10181c;
  --band-line: rgba(244, 239, 230, 0.10);
  --band-muted: rgba(244, 239, 230, 0.58);
}

body,
html[data-theme="dark"] body {
  background: var(--band-1);
  background-image: none;
}

.page-grain { display: none; }

/* Full-width color bands; content stays on the same max-width grid. */
.section[data-band] {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  padding: 96px max(28px, calc((100vw - var(--max)) / 2 + 28px));
  background: var(--band-1);
  box-sizing: border-box;
}
.section[data-band="2"] { background: var(--band-2); }
.section[data-band="3"] { background: var(--band-3); }
.section[data-band="dark"] {
  background: var(--band-dark);
  color: #f7f1e4;
}

/* One clean header rhythm instead of label-column + billboard title. */
.section-head,
.section-head.light {
  display: block;
  max-width: 1100px;
  padding: 0;
  border: 0;
}
.sec-no {
  display: block;
  padding: 0;
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
}
.sec-title,
.section-head.light .sec-title {
  max-width: 980px;
  font-size: clamp(2.2rem, 3.5vw, 3.35rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.sec-aside,
.section-head.light .sec-aside {
  max-width: 720px;
  margin-top: 16px;
  padding: 0;
  font-size: 14.5px;
  line-height: 1.85;
}

/* Remove scaffolding labels that add visual noise. */
.part-marker,
.reading-order,
.source-key,
.layer-note,
html[data-theme] .part-marker,
html[data-theme] .reading-order,
html[data-theme] .source-key,
html[data-theme] .layer-note { display: none; }

.thesis-index { border-top: 0; padding-top: 0; }

/* Softer cards on flat bands. */
.concept-card,
.foundation-card,
.evidence-card,
.perspective-card,
.global-card,
.gba-card,
.adv-card,
.briefing-card,
.toolbox-card {
  border-color: var(--band-line);
  background: var(--band-surface);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(8, 12, 15, 0.05);
}

html[data-theme="dark"] .concept-card,
html[data-theme="dark"] .foundation-card,
html[data-theme="dark"] .evidence-card,
html[data-theme="dark"] .perspective-card,
html[data-theme="dark"] .global-card,
html[data-theme="dark"] .gba-card,
html[data-theme="dark"] .adv-card,
html[data-theme="dark"] .briefing-card,
html[data-theme="dark"] .toolbox-card {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.20);
}

/* Section-specific leftovers. */
.section-map,
.section-dark,
.section-global,
.section-gba,
.section-perspectives,
.closing {
  border-top: 0;
}
.section-dark::before { display: none; }
.section-dark { padding: 96px max(28px, calc((100vw - var(--max)) / 2 + 28px)); }
.case-inner { max-width: var(--max); }

/* Hero and closing breathe without the old grid texture. */
.hero { background: var(--band-1); }
.closing { background: var(--band-dark); }

@media (max-width: 900px) {
  .section[data-band] {
    padding: 72px max(20px, calc((100vw - var(--max)) / 2 + 20px));
  }
  .section-dark {
    padding: 72px max(20px, calc((100vw - var(--max)) / 2 + 20px));
  }
  .sec-title,
  .section-head.light .sec-title {
    font-size: clamp(1.9rem, 6vw, 2.55rem);
  }
  .sec-aside,
  .section-head.light .sec-aside {
    font-size: 13.5px;
  }
}

@media (max-width: 640px) {
  .section[data-band] {
    padding: 60px 18px;
  }
  .section-dark { padding: 60px 18px; }
  .sec-title,
  .section-head.light .sec-title {
    font-size: clamp(1.8rem, 8vw, 2.25rem);
  }
}

/* Dark band must reset light-theme case overrides. */
.section[data-band="dark"] .sec-no { color: var(--gold-soft); }
.section[data-band="dark"] .sec-title,
.section[data-band="dark"] .case-title { color: #f7f1e4 !important; }
.section[data-band="dark"] .sec-aside { color: rgba(247, 241, 228, 0.62); }
.section[data-band="dark"] .case-panel {
  background: rgba(247, 241, 228, 0.04) !important;
  border-color: rgba(247, 241, 228, 0.15) !important;
  box-shadow: none;
  color: #f7f1e4 !important;
}
.section[data-band="dark"] .cp-name { color: #f7f1e4 !important; }
.section[data-band="dark"] .cp-nature span {
  color: rgba(247, 241, 228, 0.72);
  border-color: rgba(247, 241, 228, 0.16);
}
.section[data-band="dark"] .case-vs span {
  background: var(--band-dark) !important;
  color: var(--gold-soft);
  border-color: rgba(181, 138, 74, 0.45);
}
.section[data-band="dark"] .case-row { border-bottom-color: rgba(247, 241, 228, 0.12); }
.section[data-band="dark"] .case-row.head { color: rgba(247, 241, 228, 0.48); }
.section[data-band="dark"] .case-dim { color: var(--gold-soft); }
.section[data-band="dark"] .case-a,
.section[data-band="dark"] .case-b { color: rgba(247, 241, 228, 0.82); }
.section[data-band="dark"] .case-read { border-left-color: rgba(247, 241, 228, 0.12); }



/* Closing is a dark band in both themes. */
.closing {
  color: #f7f1e4;
}
.closing h2,
.closing .p-title { color: #f7f1e4; }
.closing .p-no { color: var(--gold-soft); }
.closing .p-text { color: rgba(247, 241, 228, 0.58); }
.closing .principles { border-top-color: rgba(247, 241, 228, 0.14); }
.closing .principle { border-bottom-color: rgba(247, 241, 228, 0.12); }
