/* =========================================================
   Beyond the Walls — Attack on Titan fan tribute
   Dark, somber, faintly militaristic editorial page.
   No JS, no external assets. System fonts only.
   ========================================================= */

:root {
  --bg:            #16171a;   /* deep charcoal */
  --bg-raised:     #1d1f23;
  --bg-card:       #1f2126;
  --ink:           #d9d2c3;   /* bone / parchment */
  --ink-soft:      #a8a294;
  --ink-faint:     #7d786c;
  --rust:          #8d3b31;   /* blood-rust red */
  --rust-bright:   #b3543f;
  --green:         #5c6b52;   /* survey-corps muted green */
  --green-soft:    #7d8a6f;
  --brown:         #6b5540;   /* worn leather */
  --line:          #34363c;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", "Palatino Linotype", serif;
  --display: "Arial Narrow", "Helvetica Neue Condensed", "Liberation Sans Narrow",
             "Franklin Gothic Medium", Impact, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  /* subtle worn-canvas texture, pure CSS */
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(92, 107, 82, 0.10), transparent 55%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.012) 0px,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 6px
    );
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--rust); color: #f2ead7; }

a { color: var(--green-soft); text-decoration-color: rgba(125, 138, 111, 0.4); }
a:hover { color: var(--ink); text-decoration-color: var(--rust-bright); }

em { color: inherit; }

/* ---------- Shared SVG defs ---------- */

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 7rem;
  background:
    linear-gradient(180deg, rgba(22, 23, 26, 0.2) 0%, rgba(22, 23, 26, 0.9) 85%),
    radial-gradient(ellipse at 50% 20%, rgba(141, 59, 49, 0.16), transparent 60%),
    radial-gradient(ellipse at 15% 90%, rgba(92, 107, 82, 0.12), transparent 55%),
    linear-gradient(160deg, #1b1d21 0%, #141518 60%, #101114 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* faint wall-brick suggestion along the hero bottom */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 90px;
  opacity: 0.35;
  background:
    repeating-linear-gradient(90deg, transparent 0 88px, rgba(0,0,0,0.5) 88px 90px),
    repeating-linear-gradient(0deg,  transparent 0 28px, rgba(0,0,0,0.5) 28px 30px),
    linear-gradient(180deg, transparent, rgba(50, 46, 40, 0.5));
  pointer-events: none;
}

/* cinematic scene layer behind the hero text */
.hero-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-scene svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* scrim keeping the hero text legible over the scene */
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(22, 23, 26, 0.62), transparent 68%),
    linear-gradient(180deg, rgba(22, 23, 26, 0.55) 0%, rgba(22, 23, 26, 0.15) 45%, rgba(22, 23, 26, 0.75) 100%);
}

.hero-inner { max-width: 46rem; position: relative; z-index: 1; }

.hero-kicker {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.75rem;
}

.hero-title {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(3rem, 10vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(0,0,0,0.6), 0 0 60px rgba(141, 59, 49, 0.25);
}

.hero-title .hero-break {
  display: block;
  font-size: 0.32em;
  letter-spacing: 0.6em;
  color: var(--rust-bright);
  margin: 0.6em 0;
  font-weight: 400;
}

.hero-sub {
  margin: 2.25rem auto 0;
  max-width: 38rem;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.hero-nav {
  margin-top: 3rem;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  align-items: center;
}

.hero-nav a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 2px; }
.hero-nav a:hover { color: var(--ink); border-bottom-color: var(--rust-bright); }
.nav-dot { color: var(--rust); font-size: 0.7rem; }

.hero-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 30vh;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

/* ---------- Sections ---------- */

.section { padding: 5.5rem 1.5rem; }

.section-inner { max-width: 62rem; margin: 0 auto; }
.section-inner.narrow { max-width: 44rem; }

.section-kicker {
  font-family: var(--display);
  color: var(--rust-bright);
  letter-spacing: 0.4em;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1.75rem;
  padding-bottom: 0.85rem;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 72px; height: 3px;
  background: linear-gradient(90deg, var(--rust), transparent);
}

.section p + p { margin-top: 1.25rem; }

.lede {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--green-soft);
  max-width: 44rem;
  margin-bottom: 1.5rem;
}

#throughline p:not(.lede):not(.section-kicker) { max-width: 44rem; }

.pull {
  margin: 2.75rem 0 0;
  padding: 1.4rem 1.75rem;
  max-width: 40rem;
  border-left: 3px solid var(--rust);
  background: linear-gradient(90deg, rgba(141, 59, 49, 0.10), transparent 80%);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* ---------- Dividers ---------- */

.divider {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  color: var(--brown);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.divider span { font-size: 0.95rem; opacity: 0.8; }

.divider-emblem {
  width: 72px;
  height: auto;
  flex: none;
  opacity: 0.75;
}

/* full-bleed cinematic scene before the dedication */
.scene-divider {
  margin-top: 2rem;
  border-bottom: 1px solid var(--line);
}

.scene-divider svg {
  display: block;
  width: 100%;
  height: clamp(150px, 24vw, 280px);
}

/* ---------- Character cards ---------- */

.card-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.5rem;
}

.card {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.02), transparent 40%),
    var(--bg-card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  padding: 1.75rem 1.6rem 1.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.card:nth-child(even) { border-top-color: var(--rust); }

/* abstract character vignette at the top of each card */
.card-vignette {
  margin: -1.75rem -1.6rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.card-vignette svg {
  display: block;
  width: 100%;
  height: 96px;
}

.card h3 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1.25rem;
  color: var(--ink);
}

.card-tag {
  font-style: italic;
  color: var(--rust-bright);
  font-size: 0.95rem;
  margin: 0.3rem 0 1rem;
}

.card:nth-child(even) .card-tag { color: var(--green-soft); }

.card p:last-child {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* ---------- Closing ---------- */

.section-closing {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(92, 107, 82, 0.12), transparent 60%),
    var(--bg-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.section-closing h2 { text-align: center; }
.section-closing h2::after { left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--rust), transparent); }
.section-closing .section-kicker { text-align: center; }
.section-closing p { text-align: left; }

.closing-line {
  margin-top: 2.25rem !important;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 1.05rem;
  color: var(--green-soft);
  text-align: center !important;
}

.salute {
  margin-top: 1rem !important;
  font-style: italic;
  color: var(--ink-faint);
  font-size: 0.9rem;
  text-align: center !important;
}

/* ---------- Footer ---------- */

.footer {
  padding: 3rem 1.5rem 3.5rem;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
  max-width: 44rem;
  margin: 0 auto;
}

.footer p + p { margin-top: 1rem; }

/* ---------- Responsive tweaks ---------- */

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero { min-height: 72vh; padding-bottom: 5rem; }
  .section { padding: 3.75rem 1.25rem; }
  .card { padding: 1.4rem 1.25rem 1.6rem; }
  .card-vignette { margin: -1.4rem -1.25rem 1.25rem; }
  .pull { padding: 1.1rem 1.25rem; }
}

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