:root {
  --bg: #fbdbbe;
  --text: #333230;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Fraunces", system-ui, -apple-system, "Segoe UI", serif;
  font-size: 20px;
  line-height: 1.7;
}

/* Generic elements */

img {
  display: block;
  width: 50%;
  margin: 0 auto;
  height: auto;
}

a {
  color: inherit;
}

/* ===== NAVBAR (shared) ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(251, 219, 190, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: padding 0.25s ease;
}

.nav-brand {
  font-family: "Caprasimo", system-ui, sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  transition: max-height 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
  max-height: 200px;
}

.nav-links a {
  font-family: "Caprasimo", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.6);
}

/* ===== LAYOUT ===== */

/* slightly reduced top padding so hero image is higher */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.6rem 1.5rem 3.5rem;
  position: relative;
  z-index: 1;
}

/* tighter default section spacing */
.section {
  margin: 2.4rem 0;
}

/* FIRST section: pulled up closer to header on ALL viewports */
.section:first-of-type {
  margin-top: 1.2rem;
}

.interactive-frame {
  position: relative;
  width: 100%;
  margin-top: 0;          /* no extra vertical offset above image */
  margin-bottom: 2rem;
  overflow: visible;
}

/* Typography */

h1, h2, h3 {
  font-family: "Caprasimo", system-ui, sans-serif;
  letter-spacing: 0.03em;
  text-align: center;
  margin: 0 0 1rem;
}

h1 {
  font-size: 3.4rem;
  line-height: 1.05;
}

h2 {
  font-size: 2.4rem;
  line-height: 1.15;
}

.eyebrow {
  font-family: "Caprasimo", system-ui, sans-serif;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  margin-bottom: 0.5rem;
  text-align: center;
}

p {
  max-width: 780px;
  margin: 0.25rem auto 1.1rem;
}

/* Definition on home */

.definition-term {
  text-align: center;
  margin: 0.5rem auto 0.25rem;
  font-size: 1.15rem;
}

.definition-term .term {
  font-weight: 700;
  text-transform: lowercase;
}

.definition-term .ipa {
  opacity: 0.8;
  margin-left: 0.25rem;
}

.definition-term .pos {
  font-style: italic;
  opacity: 0.75;
  margin-left: 0.4rem;
}

.definition-body {
  max-width: 760px;
  margin: 0.4rem auto 1.6rem;
  text-align: center;
}

/* Mapping grid with aligned arrows */

.mapping-table {
  max-width: 780px;
  margin: 2rem auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  row-gap: 1.1rem;
  column-gap: 0.4rem;
  align-items: center;
  font-size: 1.15rem;
}

.mapping-table .from {
  text-align: right;
  opacity: 0.85;
  padding-right: 0.2rem;
}

.mapping-table .arrow {
  text-align: center;
  font-size: 1.2rem;
  width: 1.5rem;
}

.mapping-table .to {
  text-align: left;
  font-weight: 700;
  padding-left: 0.2rem;
}

/* CTAs */

.cta-row {
  max-width: 780px;
  margin: 2rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.cta-row a {
  font-family: "Caprasimo", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.25);
  background: rgba(255,255,255,0.7);
  color: var(--text);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.cta-row a:hover {
  background: rgba(255,255,255,0.95);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

/* Manifesto & predictions specifics */

.lead-paragraph {
  font-size: 1.05em;
}

.subtle-eyebrow {
  font-family: "Caprasimo", system-ui, sans-serif;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  margin: 0 0 0.4rem;
}

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

/* Jung closing quote */

.closing-quote {
  max-width: 820px;
  margin: 2rem auto 1.5rem;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 800;
  text-align: center;
}

/* Overlay canvas */

#overlay-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 10;
}

/* ===== MOBILE ===== */

@media (max-width: 640px) {

  /* slightly smaller padding on mobile */
  main {
    padding: 1.2rem 1.25rem 2.8rem;
  }

  /* keep sections tighter on mobile too */
  .section {
    margin: 2.2rem 0;
  }

  .section:first-of-type {
    margin-top: 1rem;   /* matches side padding feel */
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.7rem 1.25rem;
  }

  .nav-links {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    overflow: hidden;
    gap: 0.35rem;
    font-size: 0.78rem;
  }

  .nav-links a {
    padding: 0.18rem 0.5rem;
  }

  /* When header has nav-open, reveal menu */
  .site-header.nav-open .nav-links {
    max-height: 48px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .interactive-frame {
    margin-top: 0;
    margin-bottom: 1.6rem;
  }

  .interactive-frame img {
    width: 100%;
    margin: 0;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .mapping-table {
    font-size: 1.02rem;
  }

  .cta-row a {
    font-size: 0.8rem;
    padding: 0.4rem 1.1rem;
  }
}