/* ==========================================================================
   The Salten Papers — satirical single-page site.
   Dark forest palette + cream paper textures (CSS gradients only).
   All visuals are original inline SVG or CSS shapes. No third-party assets.
   ========================================================================== */

:root {
  --forest-950: #0b1a12;
  --forest-900: #12241a;
  --forest-800: #1a3324;
  --forest-700: #234430;
  --forest-600: #2f573c;
  --moss-400: #9dbf8b;
  --moss-300: #b7d4a6;
  --cream-50: #f7f1e3;
  --cream-100: #f2ead8;
  --cream-200: #e4d9c0;
  --paper-shadow: rgba(4, 10, 7, 0.55);
  --red-string: #d0836b;
  --red-string-paper: #8f3f26;
  --gold: #d8b25c;
  --ink: #1c1408;
  --max-width: 72rem;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background-color: var(--forest-950);
  color: var(--cream-100);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Antler cursor on precise pointers (desktop). Graceful fallback to default. */
@media (pointer: fine) {
  body,
  a,
  button,
  input,
  [role="button"] {
    cursor:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke='%23f2ead8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M14 26 L14 14'/%3E%3Cpath d='M14 18 C10 16 8 12 8 8 M8 12 L5 10 M9.5 14.5 L7 15'/%3E%3Cpath d='M14 18 C18 16 20 12 20 8 M20 12 L23 10 M18.5 14.5 L21 15'/%3E%3C/g%3E%3C/svg%3E")
        14 26,
      auto;
  }
}

/* ---- Fog layers: drifting, disabled under prefers-reduced-motion -------- */
.fog {
  position: fixed;
  inset: -20vmax;
  pointer-events: none;
  z-index: 0;
}

.fog-layer {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

.fog-layer-a {
  background:
    radial-gradient(
      ellipse 60% 40% at 20% 30%,
      rgba(226, 236, 222, 0.10),
      transparent 70%
    ),
    radial-gradient(
      ellipse 50% 35% at 75% 65%,
      rgba(226, 236, 222, 0.08),
      transparent 70%
    );
  animation: fog-drift-a 90s ease-in-out infinite alternate;
}

.fog-layer-b {
  background:
    radial-gradient(
      ellipse 45% 30% at 60% 20%,
      rgba(226, 236, 222, 0.07),
      transparent 70%
    ),
    radial-gradient(
      ellipse 55% 40% at 30% 80%,
      rgba(226, 236, 222, 0.09),
      transparent 70%
    );
  animation: fog-drift-b 120s ease-in-out infinite alternate;
}

@keyframes fog-drift-a {
  from {
    transform: translate3d(-4%, -2%, 0) scale(1);
  }
  to {
    transform: translate3d(5%, 3%, 0) scale(1.08);
  }
}

@keyframes fog-drift-b {
  from {
    transform: translate3d(3%, 2%, 0) scale(1.05);
  }
  to {
    transform: translate3d(-5%, -3%, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fog-layer-a,
  .fog-layer-b {
    animation: none;
  }
}

/* ---- Layout ------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 26, 18, 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(242, 234, 216, 0.12);
}

.site-nav ul {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}

.site-nav a {
  color: var(--moss-300);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.1rem;
}

.site-nav a:hover {
  color: var(--cream-50);
  text-decoration: underline;
}

.site-nav .brand {
  color: var(--cream-50);
  font-family: var(--serif);
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: auto;
}

section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.kicker {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moss-400);
  margin: 0 0 0.5rem;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.15;
  color: var(--cream-50);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin: 0.25rem 0 1rem;
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin: 0.25rem 0 1.25rem;
}

h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
  max-width: 62ch;
}

a {
  color: var(--gold);
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  /* full-bleed: break out of the section max-width */
  max-width: none;
  padding-left: max(1.25rem, calc((100vw - var(--max-width)) / 2 + 1.25rem));
  padding-right: max(1.25rem, calc((100vw - var(--max-width)) / 2 + 1.25rem));
}

/* AI-generated backdrop: full-bleed moonlit forest, darkened left for text. */
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("/img/hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(7, 15, 11, 0.92) 0%,
      rgba(7, 15, 11, 0.78) 45%,
      rgba(7, 15, 11, 0.55) 100%
    ),
    linear-gradient(0deg, var(--forest-950) 0%, transparent 28%);
}

.hero > *:not(.hero-backdrop) {
  position: relative;
  z-index: 1;
}

.hero-sub {
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  color: var(--cream-200);
  font-family: var(--serif);
  font-style: italic;
  max-width: 34ch;
}

.hero-tag {
  display: inline-block;
  border: 1px solid var(--red-string);
  color: var(--red-string);
  border-radius: 999px;
  padding: 0.2rem 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--forest-950);
  background: var(--cream-100);
  border: 2px solid var(--cream-100);
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  margin-top: 1.25rem;
  transition: background-color 150ms ease, color 150ms ease;
}

.btn:hover {
  background: transparent;
  color: var(--cream-100);
}

.btn-ghost {
  background: transparent;
  color: var(--cream-100);
}

.btn-ghost:hover {
  background: var(--cream-100);
  color: var(--forest-950);
}

.hero-antler {
  position: absolute;
  right: clamp(0rem, 6vw, 5rem);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.16;
  width: clamp(180px, 30vw, 420px);
  pointer-events: none;
}

@media (max-width: 720px) {
  .hero-antler {
    opacity: 0.08;
  }
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 1.25rem;
  color: var(--moss-400);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

/* ---- Cream paper panels (manifesto, stories, action) -------------------- */
.paper {
  position: relative;
  background:
    radial-gradient(
      ellipse 120% 90% at 15% 0%,
      rgba(255, 255, 255, 0.5),
      transparent 55%
    ),
    linear-gradient(
      160deg,
      var(--cream-50) 0%,
      var(--cream-100) 55%,
      var(--cream-200) 100%
    );
  color: var(--ink);
  border-radius: 4px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow:
    0 2px 4px var(--paper-shadow),
    0 18px 48px rgba(4, 10, 7, 0.45);
}

.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 30px,
    rgba(28, 20, 8, 0.035) 30px 31px
  );
}

.paper h2,
.paper h3 {
  color: var(--forest-900);
}

.paper .kicker {
  color: #6d5a2f;
}

.dateline {
  font-family: var(--serif);
  font-style: italic;
  color: #5b4b26;
  border-bottom: 1px solid rgba(28, 20, 8, 0.25);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.paper p {
  font-family: var(--serif);
  font-size: 1.1rem;
}

/* ---- AI illustration layer (engraving figures, witness portraits) -------- */
.paper-figure {
  margin: 1.5rem 0 1.75rem;
  padding: 0.55rem;
  background: linear-gradient(160deg, #efe6cf, #e0d3b4);
  border: 1px solid rgba(28, 20, 8, 0.35);
  box-shadow: 0 8px 24px rgba(4, 10, 7, 0.35);
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(28, 20, 8, 0.4);
}

.story-portrait {
  align-self: center;
  width: 100%;
  max-width: 220px;
  height: auto;
  padding: 0.35rem;
  background: linear-gradient(160deg, #efe6cf, #e0d3b4);
  border: 1px solid rgba(28, 20, 8, 0.35);
  box-shadow: 0 8px 22px rgba(4, 10, 7, 0.3);
}

/* ---- Evidence board (red-string cards) ---------------------------------- */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.evidence-card {
  perspective: 900px;
  min-height: 16rem;
}

.evidence-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 16rem;
  transition: transform 550ms cubic-bezier(0.2, 0.7, 0.3, 1);
  transform-style: preserve-3d;
}

/* Reset the <button> wrapper without disturbing the 3D flip styles above. */
button.evidence-card-inner {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .evidence-card-inner {
    transition: none;
  }
}

.evidence-card:hover .evidence-card-inner,
.evidence-card:focus-within .evidence-card-inner,
.evidence-card.flipped .evidence-card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 6px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-front {
  background:
    linear-gradient(150deg, var(--forest-800), var(--forest-900));
  border: 1px solid rgba(242, 234, 216, 0.18);
  box-shadow: 0 10px 26px rgba(4, 10, 7, 0.5);
}

.card-front .case-no {
  color: var(--red-string);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.card-front h3 {
  font-size: 1.45rem;
}

.card-front .hint {
  color: var(--moss-300);
  font-size: 0.85rem;
  font-style: italic;
}

.card-front::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 84px;
  height: 22px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(242, 234, 216, 0.28);
  border-left: 1px dashed rgba(28, 20, 8, 0.4);
  border-right: 1px dashed rgba(28, 20, 8, 0.4);
}

.card-back {
  background:
    linear-gradient(
      155deg,
      var(--cream-50),
      var(--cream-100) 60%,
      var(--cream-200)
    );
  color: var(--ink);
  transform: rotateY(180deg);
  font-family: var(--serif);
  font-size: 1.05rem;
}

.card-back p {
  margin: auto 0;
}

.card-back .stamp {
  align-self: flex-end;
  color: var(--red-string-paper);
  border: 2px solid var(--red-string-paper);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: rotate(-6deg);
}

/* Red-string decoration across the board header */
.evidence-header {
  position: relative;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Survivor stories ---------------------------------------------------- */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.story {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.story blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.55;
}

.story figcaption {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: #4d3f1f;
}

.story .fictional-tag {
  align-self: flex-start;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest-700);
  border: 1px solid var(--forest-600);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
}

/* ---- Timeline ------------------------------------------------------------ */
.timeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--forest-600);
}

.timeline li {
  position: relative;
  padding: 0 0 2.2rem 1.4rem;
  max-width: 56ch;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -1.94rem;
  top: 0.35rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--forest-950);
}

.timeline .year {
  font-family: var(--serif);
  font-weight: bold;
  font-size: 1.3rem;
  color: var(--gold);
  display: block;
}

.timeline p {
  margin: 0.25rem 0 0;
  color: var(--cream-200);
}

/* ---- Take action ---------------------------------------------------------- */
.action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 820px) {
  .action-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.newsletter label {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.newsletter input[type="email"] {
  width: 100%;
  max-width: 26rem;
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--forest-700);
  border-radius: 6px;
  background: #fffdf7;
  color: var(--ink);
}

.newsletter input[type="email"]:focus-visible {
  outline-color: var(--forest-800);
}

.form-note {
  font-size: 0.85rem;
  color: #5b4b26;
  margin-top: 0.6rem;
}

.confirmation {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--forest-700);
  background: rgba(47, 87, 60, 0.12);
  font-family: var(--serif);
  font-style: italic;
}

.copy-slogan blockquote {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.4;
}

.copy-status {
  margin-top: 0.8rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--forest-700);
  min-height: 1.4em;
}

/* ---- Hoofprint stamps ------------------------------------------------------ */
.hoofprint-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.hoofprint {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  opacity: 0.85;
  animation: hoof-fade 2.4s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .hoofprint {
    animation: none;
    opacity: 0.7;
  }
}

@keyframes hoof-fade {
  0% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(0.6);
  }
  20% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

/* ---- Footer ------------------------------------------------------------------ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(242, 234, 216, 0.12);
  background: var(--forest-900);
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
}

.site-footer p {
  margin: 0 auto 0.4rem;
  max-width: 60ch;
  font-size: 0.95rem;
  color: var(--cream-200);
}

.site-footer .fine {
  font-size: 0.85rem;
  color: var(--moss-400);
}
