@import url("https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,400;0,500;1,400&family=Fraunces:ital,wght@0,300;0,600;1,300&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #1a1a1a;
  --paper: #f5f0e8;
  --cream: #ede7d4;
  --accent: #c0392b;
  --green: #2c7a4b;
  --blue: #1a5276;
  --muted: #7a7165;
  --border: #c8bfa8;
  --green-bg: #eaf5ee;
  --yellow-bg: #fef9e7;
  --red-bg: #fdecea;
}

/* ─────────────────────────────────────────
   BASE
───────────────────────────────────────── */
body {
  font-family: "DM Mono", monospace;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─────────────────────────────────────────
   HEADER
───────────────────────────────────────── */
header {
  background: linear-gradient(135deg, var(--ink) 0%, #2a2a2a 100%);
  color: var(--paper);
  padding: 1rem 3rem 1rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(232, 200, 154, 0.2);
}
header::before {
  /* watermark — each page overrides content: "…" */
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Fraunces", serif;
  font-size: 9rem;
  font-weight: 600;
  color: rgba(232, 200, 154, 0.06);
  pointer-events: none;
  line-height: 1;
  white-space: nowrap;
}
header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e8c89a, transparent);
}
header h1 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  position: relative;
}
header h1 span {
  color: #e8c89a;
}
header > p {
  color: #999;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  padding-left: 1.5rem;
}
header > p::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #e8c89a;
}

.hero-tagline {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #e8c89a;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-top: 1px solid rgba(232, 200, 154, 0.2);
  padding-top: 1rem;
  flex-wrap: wrap;
}
.hero-tagline span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-tagline span::before {
  content: "▶";
  font-size: 0.6rem;
  opacity: 0.6;
}

/* ─────────────────────────────────────────
   CONTAINER
───────────────────────────────────────── */
.container {
  max-width: 900px;
  width: 95%;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  flex: 1;
}

/* ─────────────────────────────────────────
   CTAC INTRO BOX  (dark card at top of page)
───────────────────────────────────────── */
.ctac-box {
  background: linear-gradient(135deg, var(--ink) 0%, #2d2d2d 100%);
  color: var(--paper);
  border-radius: 16px;
  padding: 2.5rem 2.5rem 2rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}
.ctac-box::before {
  /* watermark inside box — each page overrides content: "…" */
  position: absolute;
  right: -1rem;
  bottom: -1.5rem;
  font-family: "Fraunces", serif;
  font-size: 7rem;
  font-weight: 600;
  color: rgba(232, 200, 154, 0.05);
  pointer-events: none;
  line-height: 1;
}
.ctac-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e8c89a;
  margin-bottom: 0.5rem;
}
.ctac-box h2 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}
.ctac-box h2 em {
  font-style: italic;
  color: #e8c89a;
}
.ctac-pills {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.ctac-pill {
  background: rgba(232, 200, 154, 0.1);
  border: 1px solid rgba(232, 200, 154, 0.22);
  border-radius: 8px;
  padding: 1rem 1.4rem;
  font-size: 0.8rem;
  line-height: 1.7;
  flex: 1;
  min-width: 180px;
}
.ctac-pill strong {
  display: block;
  color: #e8c89a;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

/* ─────────────────────────────────────────
   SECTION HEADINGS
───────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  margin-top: 3rem;
}
.section-label .num {
  background: var(--ink);
  color: var(--paper);
  font-size: 0.65rem;
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  letter-spacing: 0.08em;
}
.section-label h3 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
}
.section-label h3 em {
  font-style: italic;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ─────────────────────────────────────────
   ACCORDION
───────────────────────────────────────── */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.acc-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.acc-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}
.acc-item.open {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.acc-trigger {
  width: 100%;
  background: var(--cream);
  border: none;
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  font-family: "DM Mono", monospace;
  font-size: 0.85rem;
  text-align: left;
  transition: background 0.2s;
}
.acc-trigger:hover {
  background: #e5dfc9;
}
.acc-item.open .acc-trigger {
  background: var(--ink);
  color: var(--paper);
}

.acc-badge {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 30px;
  flex-shrink: 0;
}
.badge-raw {
  background: var(--yellow-bg);
  color: #7a5c00;
  border: 1px solid #e6c96e;
}
.badge-factory {
  background: var(--red-bg);
  color: var(--accent);
  border: 1px solid #e8bbb8;
}
.badge-loss {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid #a8d8b8;
}

.acc-item.open .badge-raw {
  background: rgba(254, 249, 231, 0.15);
  color: #e8c89a;
  border-color: rgba(232, 200, 154, 0.3);
}
.acc-item.open .badge-factory {
  background: rgba(192, 57, 43, 0.2);
  color: #e8a8a0;
  border-color: rgba(192, 57, 43, 0.3);
}
.acc-item.open .badge-loss {
  background: rgba(44, 122, 75, 0.2);
  color: #80d4a0;
  border-color: rgba(44, 122, 75, 0.3);
}

.acc-title {
  flex: 1;
  font-weight: 500;
}
.acc-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s;
  opacity: 0.5;
  margin-left: auto;
}
.acc-item.open .acc-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.acc-body {
  display: none;
  padding: 1.4rem;
  background: #fff;
  border-top: 1px solid var(--border);
  animation: slideDown 0.25s ease;
}
.acc-item.open .acc-body {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────
   CONDITION LIST (inside accordion body)
───────────────────────────────────────── */
.condition-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.condition-item {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0ebe0;
}
.condition-item:last-child {
  border-bottom: none;
}

.condition-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.dot-raw {
  background: #c9a227;
}
.dot-factory {
  background: var(--accent);
}
.dot-loss {
  background: var(--green);
}

/* ─────────────────────────────────────────
   CLUE BOX  (grey aside inside accordion)
───────────────────────────────────────── */
.clue-box {
  background: var(--cream);
  border-left: 3px solid var(--border);
  border-radius: 0 6px 6px 0;
  padding: 0.7rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.8rem;
  line-height: 1.6;
}
.clue-box strong {
  color: var(--ink);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.3rem;
}

/* ─────────────────────────────────────────
   CTAC CALLOUT  (dark inline banner)
───────────────────────────────────────── */
.ctac-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: linear-gradient(135deg, var(--ink) 0%, #2d2d2d 100%);
  color: var(--paper);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  font-size: 0.78rem;
  line-height: 1.6;
  margin-top: 0.8rem;
}
.ctac-callout::before {
  content: "CTAC";
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  background: #e8c89a;
  color: var(--ink);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  flex-shrink: 0;
  font-weight: 500;
  margin-top: 2px;
}

/* ─────────────────────────────────────────
   SUMMARY SECTION  (dark card at page end)
───────────────────────────────────────── */
.summary-section {
  margin-top: 3rem;
  background: linear-gradient(135deg, var(--ink) 0%, #2a2a2a 100%);
  border-radius: 16px;
  padding: 2.5rem;
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.summary-section::before {
  content: "∑";
  position: absolute;
  right: 2rem;
  bottom: -1rem;
  font-family: "Fraunces", serif;
  font-size: 10rem;
  font-weight: 600;
  color: rgba(232, 200, 154, 0.05);
  pointer-events: none;
  line-height: 1;
}
.summary-section h3 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  color: #e8c89a;
}
.summary-section > p {
  color: #999;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.summary-col {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(232, 200, 154, 0.12);
  border-radius: 10px;
  padding: 1.2rem;
}
.summary-col h4 {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.summary-col h4.raw {
  color: #e8c89a;
}
.summary-col h4.factory {
  color: #e8a0a0;
}
.summary-col h4.loss {
  color: #80d4a0;
}
.summary-col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.summary-col li {
  font-size: 0.75rem;
  color: #bbb;
  line-height: 1.5;
  padding-left: 0.8rem;
  position: relative;
}
.summary-col li::before {
  content: "—";
  position: absolute;
  left: 0;
  opacity: 0.4;
}

.summary-question {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(232, 200, 154, 0.15);
  padding-top: 1.2rem;
  font-size: 0.8rem;
  color: #999;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.summary-question strong {
  color: #e8c89a;
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
footer {
  background: linear-gradient(135deg, var(--ink) 0%, #2a2a2a 100%);
  color: var(--paper);
  padding: 2.5rem 3rem 2rem;
  width: 100%;
  margin-top: auto;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(232, 200, 154, 0.2);
}
footer::after {
  position: absolute;
  left: 2rem;
  bottom: 0.5rem;
  font-family: "Fraunces", serif;
  font-size: 4rem;
  font-weight: 600;
  color: rgba(232, 200, 154, 0.03);
  pointer-events: none;
  line-height: 1;
}
footer p {
  color: #999;
  font-size: 0.8rem;
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
footer p:first-child {
  margin-bottom: 0.5rem;
  color: #e8c89a;
}

/* ─────────────────────────────────────────
   FLOATING HOME BUTTON
───────────────────────────────────────── */
.home-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  background: linear-gradient(135deg, var(--ink) 0%, #2d2d2d 100%);
  color: var(--paper);
  text-decoration: none;
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.75rem 1.2rem;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  border: 1px solid rgba(232, 200, 154, 0.15);
}
.home-btn::before {
  content: "←";
  color: #e8c89a;
  font-size: 0.8rem;
}
.home-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
}
.home-btn:active {
  transform: translateY(0);
}

@media (max-width: 700px) {
  .home-btn {
    bottom: 1.2rem;
    right: 1.2rem;
    padding: 0.65rem 1rem;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 700px) {
  header {
    padding: 1rem 1.5rem;
  }
  header h1 {
    font-size: 2.2rem;
  }
  .hero-tagline {
    gap: 1rem;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .ctac-pills {
    flex-direction: column;
  }
}
