/* =========================================================
   ERPdaily.com — Wyatt Erp and the Great Vowel Movement
   site.css
   Theme: manga western comedy, clean mobile-first layout
   ========================================================= */

:root {
  --ink: #1e1510;
  --ink-soft: #3b2a20;
  --paper: #fff6df;
  --paper-2: #f6e3b8;
  --paper-3: #ead09a;
  --sun: #f6a21a;
  --sun-hot: #ffcf4a;
  --rust: #a83e1f;
  --rust-dark: #6f2517;
  --cactus: #2f6d4f;
  --cactus-dark: #1e4937;
  --sky: #77b7ca;
  --night: #23182d;
  --cream: #fffaf0;
  --white: #ffffff;
  --danger: #c9211e;
  --shadow: rgba(30, 21, 16, 0.22);
  --shadow-hard: rgba(30, 21, 16, 0.38);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --max: 1180px;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  background:
    radial-gradient(circle at 18% 4%, rgba(255, 207, 74, 0.45), transparent 28rem),
    radial-gradient(circle at 82% 2%, rgba(119, 183, 202, 0.30), transparent 26rem),
    linear-gradient(180deg, #ffeab5 0%, var(--paper) 32%, #f3dca6 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(30, 21, 16, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 21, 16, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--rust-dark);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--danger);
}

p {
  margin: 0 0 1rem;
}

strong,
b {
  font-weight: 800;
}

.wrap,
.container {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.section {
  padding: clamp(44px, 7vw, 92px) 0;
}

.section-tight {
  padding: clamp(30px, 5vw, 58px) 0;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.center {
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--sun-hot);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kicker {
  color: var(--rust-dark);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.lede {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.58;
  color: var(--ink-soft);
  max-width: 760px;
}

.center .lede,
.lede.center {
  margin-inline: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.7rem;
  color: var(--ink);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h1,
.hero-title,
.logo-text {
  font-family: var(--serif);
}

h1,
.hero-title {
  font-size: clamp(3.2rem, 10vw, 8.6rem);
  font-weight: 900;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  font-weight: 950;
  text-wrap: balance;
}

h3 {
  font-size: clamp(1.35rem, 2.7vw, 2.1rem);
  font-weight: 950;
}

h4 {
  font-size: 1.1rem;
  font-weight: 950;
}

.title-pop {
  display: inline;
  background: linear-gradient(180deg, transparent 58%, rgba(255, 207, 74, 0.78) 58%);
}

.big-quote {
  margin: 26px 0;
  padding: clamp(20px, 4vw, 34px);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--cream);
  box-shadow: 8px 8px 0 var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.8vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--ink);
  background: rgba(255, 246, 223, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(30, 21, 16, 0.14);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max), calc(100% - 28px));
  margin: 0 auto;
  padding: 12px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  min-width: max-content;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--sun-hot);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 950;
  letter-spacing: -0.08em;
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 42px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--sun-hot);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 99px;
}

.nav-check {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(48px, 7vw, 98px) 0 clamp(38px, 7vw, 86px);
  border-bottom: 4px solid var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 207, 74, 0.50), rgba(255, 246, 223, 0.88)),
    radial-gradient(circle at 82% 26%, rgba(168, 62, 31, 0.18), transparent 24rem);
}

.hero::before {
  content: "ERP";
  position: absolute;
  z-index: -1;
  right: -0.08em;
  bottom: -0.35em;
  color: rgba(30, 21, 16, 0.06);
  font-family: var(--serif);
  font-size: clamp(12rem, 28vw, 34rem);
  font-weight: 950;
  letter-spacing: -0.12em;
  line-height: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(310px, 0.78fr);
  align-items: center;
  gap: clamp(28px, 5vw, 58px);
}

.hero-copy {
  max-width: 780px;
}

.hero-subtitle {
  max-width: 680px;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 2.1vw, 1.45rem);
  font-weight: 700;
}

.hero-card {
  position: relative;
  border: 4px solid var(--ink);
  border-radius: var(--radius-xl);
  background: var(--cream);
  box-shadow: 14px 14px 0 var(--ink);
  overflow: hidden;
}

.hero-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-card-caption {
  padding: 16px 18px 18px;
  border-top: 4px solid var(--ink);
  background: var(--sun-hot);
  font-weight: 900;
}

.hero-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 9px 12px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--danger);
  color: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--sun-hot);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover,
button.btn:hover {
  color: var(--ink);
  background: var(--sun);
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 5px 5px 0 var(--rust);
}

.btn-dark:hover {
  background: var(--rust-dark);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

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

.card {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--cream);
  box-shadow: 8px 8px 0 var(--ink);
  overflow: hidden;
}

.card-pad {
  padding: clamp(20px, 3vw, 30px);
}

.card img,
.episode-card img,
.character-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 3px solid var(--ink);
}

.card h3,
.episode-card h3,
.character-card h3 {
  margin-bottom: 0.4rem;
}

.card-tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.episode-card,
.character-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--cream);
  box-shadow: 8px 8px 0 var(--ink);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.episode-card:hover,
.character-card:hover {
  color: var(--ink);
  transform: translate(3px, 3px);
  box-shadow: 5px 5px 0 var(--ink);
}

.episode-card-body,
.character-card-body {
  padding: 18px;
}

.episode-number {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--danger);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.crisis-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.crisis-item {
  min-height: 180px;
  padding: 20px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--sun-hot);
  box-shadow: 7px 7px 0 var(--ink);
}

.crisis-word {
  display: block;
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.crisis-item:nth-child(even) {
  background: var(--paper-2);
}

.episode-reader {
  margin-top: 28px;
  border: 4px solid var(--ink);
  border-radius: var(--radius-xl);
  background: var(--cream);
  box-shadow: 12px 12px 0 var(--ink);
  overflow: hidden;
}

.reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 4px solid var(--ink);
  background: var(--night);
  color: var(--paper);
  font-weight: 900;
}

.reader-progress {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 2px solid var(--paper);
  border-radius: 999px;
  color: var(--paper);
  font-size: 0.82rem;
}

.swipe-gallery,
.gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  background: var(--ink);
}

.gallery-panel,
.manga-panel {
  position: relative;
  min-width: 0;
  scroll-snap-align: start;
  background: var(--cream);
}

.gallery-panel img,
.manga-panel img {
  display: block;
  width: 100%;
  max-height: min(78vh, 820px);
  object-fit: contain;
  background: var(--ink);
}

.panel-caption {
  padding: 16px clamp(16px, 4vw, 28px) 18px;
  border-top: 4px solid var(--ink);
  background: var(--paper);
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 750;
}

.panel-dialogue {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 12px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 950;
}

.reader-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 16px;
  border-top: 4px solid var(--ink);
  background: var(--sun-hot);
}

.reader-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 42px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 1.3rem;
  font-weight: 950;
  text-decoration: none;
}

.reader-arrow:hover {
  background: var(--ink);
  color: var(--paper);
}

.gallery-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto;
}

.gallery-dots a,
.gallery-dot {
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--cream);
  text-indent: -999px;
  overflow: hidden;
}

.gallery-dots a:hover,
.gallery-dot.active {
  background: var(--danger);
}

.episode-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}

.episode-nav .btn {
  max-width: 48%;
}

.transcript {
  margin-top: 34px;
  padding: clamp(20px, 4vw, 34px);
  border: 3px dashed var(--ink);
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 240, 0.78);
}

.transcript ol {
  margin: 1rem 0 0;
  padding-left: 1.4rem;
}

.transcript li + li {
  margin-top: 0.55rem;
}

.speech {
  position: relative;
  margin: 20px 0;
  padding: 18px 20px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 6px 6px 0 var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 850;
}

.speech::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: -17px;
  width: 28px;
  height: 28px;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: var(--white);
  transform: rotate(45deg);
}

.speech-right::after {
  right: 34px;
  left: auto;
}

.wanted-poster {
  padding: clamp(22px, 4vw, 36px);
  border: 5px double var(--ink);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(rgba(255, 246, 223, 0.88), rgba(255, 246, 223, 0.88)),
    repeating-linear-gradient(45deg, rgba(30, 21, 16, 0.08) 0 7px, transparent 7px 14px);
  box-shadow: 10px 10px 0 var(--ink);
  text-align: center;
}

.wanted-poster .wanted {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  font-weight: 950;
  line-height: 0.85;
  letter-spacing: -0.08em;
}

.wanted-poster .reward {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 12px;
  border: 3px solid var(--ink);
  background: var(--sun-hot);
  font-weight: 950;
}

.form-card {
  padding: clamp(22px, 4vw, 34px);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--cream);
  box-shadow: 8px 8px 0 var(--ink);
}

label {
  display: block;
  margin-bottom: 7px;
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.form-row {
  margin-bottom: 16px;
}

.site-footer {
  margin-top: clamp(44px, 7vw, 88px);
  border-top: 4px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 0.7fr));
  gap: 28px;
  padding: clamp(34px, 6vw, 70px) 0;
}

.site-footer a {
  color: var(--sun-hot);
}

.footer-title {
  margin-bottom: 10px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list li + li {
  margin-top: 7px;
}

.footer-bottom {
  padding: 16px 0 22px;
  border-top: 1px solid rgba(255, 246, 223, 0.22);
  color: rgba(255, 246, 223, 0.78);
  font-size: 0.92rem;
}

.bg-paper { background: var(--paper); }
.bg-cream { background: var(--cream); }
.bg-sun { background: var(--sun-hot); }
.bg-rust { background: var(--rust); color: var(--white); }
.bg-night { background: var(--night); color: var(--paper); }
.bg-cactus { background: var(--cactus); color: var(--white); }

.text-rust { color: var(--rust-dark); }
.text-cactus { color: var(--cactus-dark); }
.text-muted { color: var(--ink-soft); }

@media (max-width: 980px) {
  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .crisis-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card {
    max-width: 560px;
  }
}

@media (max-width: 820px) {
  .navbar {
    align-items: center;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 0 4px;
  }

  .nav-links a {
    justify-content: flex-start;
    border: 2px solid var(--ink);
    background: var(--cream);
    border-radius: var(--radius-sm);
  }

  .nav-check:checked ~ .nav-links,
  .navbar.is-open .nav-links {
    display: flex;
  }

  .reader-topbar,
  .reader-controls,
  .episode-nav {
    flex-wrap: wrap;
  }

  .episode-nav .btn {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .wrap,
  .container,
  .navbar {
    width: min(100% - 22px, var(--max));
  }

  h1,
  .hero-title {
    font-size: clamp(3rem, 16vw, 4.7rem);
  }

  .hero {
    padding-top: 34px;
  }

  .hero-card,
  .card,
  .episode-card,
  .character-card,
  .episode-reader,
  .wanted-poster {
    box-shadow: 5px 5px 0 var(--ink);
  }

  .cta-row .btn,
  .btn {
    width: 100%;
  }

  .crisis-list {
    grid-template-columns: 1fr;
  }

  .reader-controls {
    justify-content: center;
  }

  .reader-arrow {
    width: 42px;
    height: 40px;
  }

  .panel-caption {
    font-size: 1rem;
  }
}

:focus-visible {
  outline: 4px solid var(--danger);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .site-header,
  .reader-controls,
  .gallery-dots,
  .cta-row,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  .episode-reader,
  .wanted-poster {
    box-shadow: none;
  }
}
