/* =========================================================
   Posterity Log — "Inevitable Archive" Theme
   Calm. Institutional. Durable.
========================================================= */

/* ===========================
   FONTS
=========================== */
@import url("https://fonts.googleapis.com/css2?family=Spectral:wght@300;400;600;700&family=Special+Elite&display=swap");

/* ===========================
   DESIGN TOKENS
=========================== */
:root {
  --paper: #f2efe6;
  --paper-2: #ece7dc;
  --ink: #0c0c0c;
  --ink-2: #2a2a2a;
  --muted: #4a4a4a;

  --red: #820510;
  --red-soft: rgba(130, 5, 16, 0.65);
  --red-hover: #9a0713;

  --blue: #1a1f4f;
  --blue-hover: #232a66;

  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.88);

  --border: rgba(12, 12, 12, 0.14);
  --border-strong: rgba(12, 12, 12, 0.22);

  --shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
  --shadow-strong: 0 14px 40px rgba(0, 0, 0, 0.18);

  --radius: 10px;
  --radius-sm: 8px;
  --maxw: 1100px;

  --font-body: "Spectral", serif;
  --font-stamp: "Special Elite", cursive;
}

/* ===========================
   BASE
=========================== */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  -webkit-text-size-adjust: none;
}

p, li {
  margin: 0 0 1em 0;
  color: var(--ink-2);
}

ul, ol {
  margin: 0 0 1em 1.25rem;
}
ul { list-style: disc; }
ol { list-style: decimal; }

a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--blue-hover);
  text-decoration-thickness: 2px;
}

/* ===========================
   HEADINGS
=========================== */
h1, h2, h3 {
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 0.6em 0;
}

h1 { font-size: 2.4rem; font-weight: 700; }
h2 { font-size: 1.65rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }

/* ===========================
   BLOCKQUOTE / STAMP
=========================== */
blockquote {
  text-align: center;
  font-family: var(--font-stamp);
  font-size: 1.35rem;
  line-height: 1.35;
  margin: 1.2em 0 1.4em 0;
  color: var(--ink);
  opacity: 0.95;
}

/* ===========================
   LAYOUT
=========================== */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

#page-wrapper { width: 100%; }
#content { padding: 42px 0 80px 0; }

.text-center { text-align: center; }
.text-left { text-align: left; }

/* ===========================
   PANELS
=========================== */
.panel {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1.25em 0;
  padding: 2rem 2.25rem 1.6rem;
  backdrop-filter: blur(2px);
}

.hero-panel.panel {
  background: var(--panel-strong);
  margin-top: 0;
}

/* ===========================
   BANNER IMAGE
=========================== */
.bordered-feature-image {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  background: var(--paper-2);
}

.bordered-feature-image img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(92%) sepia(6%) contrast(0.98) brightness(1.02);
}

/* ===========================
   BUTTONS
=========================== */
.btn,
.btn-dk,
.btn-primary {
  border-radius: 999px;
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.78em 1.05em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.15s ease;
}

.btn, .btn-primary {
  background: var(--red);
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(130,5,16,0.18);
}
.btn:hover { background: var(--red-hover); }

.btn-dk {
  background: var(--blue);
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(26,31,79,0.18);
}
.btn-dk:hover { background: var(--blue-hover); }

/* ===========================
   HOW-IT-WORKS GRID
=========================== */
.how-icons--flow {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: 34px;
  align-items: stretch;
  margin: 0 0 22px 0;
}

.flow-col { display: flex; }

.flow-col--1 { justify-content: flex-start; align-items: center; }
.flow-col--2 { justify-content: center; align-items: center; }
.flow-col--3 { flex-direction: column; align-items: flex-end; row-gap: 18px; }

.icon-wrapper {
  position: relative;
  margin-bottom: 1.6rem;
  z-index: 2;
}

.icon-image {
  width: 270px;
  max-width: 100%;
  filter: grayscale(88%) sepia(8%) contrast(0.97) brightness(1.05);
}

/* Manila-style tags */
.icon-tag {
  position: absolute;
  top: -28px;
  left: 16px;
  z-index: 3;
  padding: 6px 12px;
  background: #e7d7ad;
  border: 1px solid rgba(60, 40, 15, 0.22);
  border-radius: 4px;
  font-family: var(--font-stamp);
  font-size: 0.78rem;
  color: #2c2416;
  box-shadow: 0 6px 14px rgba(0,0,0,0.14);
  transform: rotate(-1.5deg);
}

/* ===========================
   ARROWS — NOW CSS-CONTROLLED
=========================== */
.flow-arrows {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  pointer-events: none;
  z-index: 1;
  overflow: visible;

  /* THIS controls arrow colour */
  color: var(--red-soft);
}

/* ===========================
   FORMS
=========================== */
input, textarea, select {
  font-family: var(--font-body);
  font-size: 1rem;
}

textarea {
  width: 100%;
  padding: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.92);
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: rgba(130,5,16,0.45);
  box-shadow: 0 0 0 4px rgba(130,5,16,0.10);
}

/* ===========================
   MODAL
=========================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12,12,12,0.58);
  z-index: 999;
}

.review-panel {
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, calc(100vw - 2rem));
  max-height: 82vh;
  overflow: auto;
  background: rgba(255,255,255,0.95);
  border-radius: 14px;
  box-shadow: var(--shadow-strong);
  padding: 1.4rem;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .how-icons--flow {
    grid-template-columns: 1fr;
    row-gap: 34px;
  }

  .icon-image { width: 220px; }
}

fieldset label {
  display: block;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ===========================
   BUTTONS — no underlines
=========================== */
.btn, .btn-dk, .btn-primary {
  text-decoration: none;
}
.btn:hover, .btn-dk:hover, .btn-primary:hover {
  text-decoration: none;
}

/* ===========================
   CONSENTS — remove fieldset border + improve spacing
=========================== */
fieldset.consents {
  border: 0;
  padding: 0;
  margin: 1.25rem 0 0;
  min-inline-size: auto; /* avoid weird default min-width behaviour */
}

fieldset.consents .consent-list {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.85rem;
}

fieldset.consents label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  line-height: 1.5;
  margin: 0;
}

fieldset.consents input[type="checkbox"] {
  margin-top: 0.25rem;
}

.wrap-right {
  float: right;
  margin: 0 0 1.5rem 2rem;
  max-width: 340px;
  width: 100%;
  border-radius: var(--radius);
}

/* ===========================
   BANNER TITLE OVERLAY
=========================== */
.banner-title {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  margin: 0;
  font-family: Spectral;
  font-size: 2.8rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  color: #2c2416;
  text-shadow: 0 2px 12px rgba(0,0,0,0.55);
  pointer-events: none;
}