/* DIRT FEST V — DIY zine foundation */

:root {
  --paper:        #ece5d0;
  --paper-deep:   #ddd2b3;
  --ink:          #0a0a0a;
  --ink-soft:     #221f1a;
  --marker-yellow:#ffd23f;
  --marker-red:   #e63946;
  --marker-blue:  #0a4cff;
  --line:         #6b6357;
  --tape:         rgba(255, 220, 100, 0.55);
  --font-display: "Anton", "Archivo Black", Impact, sans-serif;
  --font-serif:   "DM Serif Display", "Times New Roman", serif;
  --font-mono:    "DM Mono", "Courier New", monospace;
  --font-marker:  "Permanent Marker", "Caveat", cursive;
  --font-hand:    "Caveat", cursive;
  --font-bubble:  "Bowlby One", "Lilita One", "Anton", sans-serif;
  --font-lcd:     "Silkscreen", "VT323", monospace;
}

/* OLIVE theme — poster palette (default) */
body.theme-olive {
  --paper:        #fbf6e6;
  --paper-deep:   #f1ead4;
  --ink:          #1f4d29;        /* dark forest green */
  --ink-soft:     #2a5f33;
  --marker-yellow:#deaa2a;        /* mustard/ochre */
  --marker-red:   #9eb53a;        /* olive green (primary type) */
  --marker-blue:  #2680a8;        /* mediterranean teal */
  --line:         #1f4d29;
  --tape:         rgba(222, 170, 42, 0.55);
  --font-display: "Bowlby One", "Anton", Impact, sans-serif;
}

/* MUD theme — earthy clay tones */
body.theme-mud {
  --paper:        #d8c4a0;
  --paper-deep:   #b39a72;
  --ink:          #2b1b0d;
  --ink-soft:     #4a3520;
  --marker-yellow:#d99033;
  --marker-red:   #a8351e;
  --marker-blue:  #3d4f2a;
  --line:         #6a523a;
  --tape:         rgba(217, 144, 51, 0.45);
}

/* RISO theme — two-color overprint */
body.theme-riso {
  --paper:        #f3ecd9;
  --paper-deep:   #e6dec5;
  --ink:          #141414;
  --ink-soft:     #2a2a2a;
  --marker-yellow:#ffd23f;
  --marker-red:   #ff3aaa;
  --marker-blue:  #0050ff;
  --line:         #4a4a4a;
  --tape:         rgba(255, 58, 170, 0.35);
}

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

body {
  font-family: var(--font-mono);
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Paper texture — gritty fibrous grain over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.55;
  z-index: 9999;
}

/* Subtle coffee-stain / paper darkening blobs */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background:
    radial-gradient(ellipse 600px 400px at 90% 10%, rgba(120,90,40,0.10), transparent 60%),
    radial-gradient(ellipse 800px 500px at 5% 60%, rgba(80,60,30,0.08), transparent 65%),
    radial-gradient(ellipse 500px 400px at 50% 100%, rgba(60,50,30,0.10), transparent 60%);
}

/* RISO theme — overprint cyan/magenta vignette */
body.theme-riso::after {
  background:
    radial-gradient(ellipse 700px 500px at 85% 15%, rgba(255,58,170,0.12), transparent 60%),
    radial-gradient(ellipse 800px 500px at 10% 70%, rgba(0,80,255,0.10), transparent 65%);
}

/* ===== TYPOGRAPHY ===== */

.h-display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.86;
  color: var(--ink);
}

.h-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.05;
}

.h-marker {
  font-family: var(--font-marker);
  color: var(--marker-red);
  transform: rotate(-2deg);
  display: inline-block;
}

.h-hand {
  font-family: var(--font-hand);
  font-weight: 700;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ===== INK / ZINE PRIMITIVES ===== */

/* Highlighter marker on inline text */
.highlight {
  background: linear-gradient(90deg, transparent 1%, var(--marker-yellow) 1%, var(--marker-yellow) 99%, transparent 99%);
  background-size: 100% 70%;
  background-position: 0 85%;
  background-repeat: no-repeat;
  padding: 0 4px;
}
.highlight-red {
  background: var(--marker-red);
  color: var(--paper);
  padding: 0 6px;
}

/* Hand-drawn pencil circle around text */
.circled {
  position: relative;
  display: inline-block;
  padding: 4px 10px;
}
.circled::before {
  content: "";
  position: absolute;
  inset: -4px -8px;
  border: 2px solid var(--marker-red);
  border-radius: 50%;
  transform: rotate(-3deg);
  pointer-events: none;
}

/* Strike-through marker */
.strike-red {
  position: relative;
  text-decoration: none;
}
.strike-red::after {
  content: "";
  position: absolute;
  left: -4%; right: -4%;
  top: 55%;
  height: 3px;
  background: var(--marker-red);
  transform: rotate(-2deg);
}

/* Rubber stamp */
.stamp {
  display: inline-block;
  padding: 8px 18px;
  border: 3px solid var(--marker-red);
  color: var(--marker-red);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 18px;
  transform: rotate(-4deg);
  background: transparent;
  position: relative;
  filter: contrast(1.1);
}
.stamp.stamp-blue { border-color: var(--marker-blue); color: var(--marker-blue); }
.stamp.stamp-ink  { border-color: var(--ink); color: var(--ink); }

/* Round wax/postal stamp */
.round-stamp {
  width: 130px; height: 130px;
  border: 3px solid var(--marker-red);
  border-radius: 50%;
  color: var(--marker-red);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1;
  padding: 12px;
  transform: rotate(-8deg);
}

/* Sticker / tape */
.tape {
  position: absolute;
  background: var(--tape);
  width: 90px; height: 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  transform: rotate(-6deg);
  border-left: 1px dashed rgba(0,0,0,0.1);
  border-right: 1px dashed rgba(0,0,0,0.1);
}

/* Torn paper edges */
.torn-bottom { --t: 12px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 0px),
  98% calc(100% - 4px), 95% 100%, 92% calc(100% - 6px), 88% calc(100% - 2px),
  84% calc(100% - 8px), 80% calc(100% - 3px), 76% calc(100% - 10px),
  72% calc(100% - 4px), 68% calc(100% - 7px), 64% calc(100% - 2px),
  60% calc(100% - 9px), 56% calc(100% - 4px), 52% calc(100% - 11px),
  48% calc(100% - 5px), 44% calc(100% - 8px), 40% calc(100% - 3px),
  36% calc(100% - 10px), 32% calc(100% - 5px), 28% calc(100% - 12px),
  24% calc(100% - 6px), 20% calc(100% - 4px), 16% calc(100% - 9px),
  12% calc(100% - 3px), 8% calc(100% - 7px), 4% calc(100% - 4px), 0 calc(100% - 8px));
}

/* Section dividers — perforated lines, type, asterisks */
.perf-line {
  border-top: 2px dashed var(--ink);
  height: 0;
  position: relative;
}
.perf-line::before, .perf-line::after {
  content: "✂";
  position: absolute;
  top: -10px;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  padding: 0 6px;
}
.perf-line::before { left: 30px; }
.perf-line::after { right: 30px; transform: scaleX(-1); }

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

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
}

section {
  padding: 100px 0;
  position: relative;
}

/* Section header — zine kicker */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  background: var(--ink);
  color: var(--paper);
  padding: 5px 14px;
  transform: rotate(-1deg);
}
.kicker .dot {
  width: 8px; height: 8px;
  background: var(--marker-yellow);
  border-radius: 50%;
}

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 2px solid var(--paper-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo .v {
  color: var(--marker-yellow);
  transform: skewX(-8deg);
  display: inline-block;
}
.nav-links {
  display: flex; gap: 22px;
}
.nav-links a {
  color: var(--paper);
  text-decoration: none;
  opacity: 0.78;
  transition: opacity 120ms;
  position: relative;
}
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--marker-yellow);
}
.nav-cta {
  font-family: var(--font-display);
  font-size: 14px;
  background: var(--marker-yellow);
  color: var(--ink);
  padding: 8px 16px;
  text-decoration: none;
  letter-spacing: 0.06em;
  border: 2px solid var(--paper);
  transition: transform 100ms;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--marker-red); }

/* CTA — chunky stamped button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: 18px 30px;
  border: 3px solid var(--ink);
  text-decoration: none;
  position: relative;
  cursor: pointer;
  transition: transform 100ms, box-shadow 100ms;
}
.btn::after {
  content: "→";
  font-size: 28px;
  transition: transform 150ms;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--marker-red); }
.btn:hover::after { transform: translateX(4px); }
.btn-yellow { background: var(--marker-yellow); color: var(--ink); }
.btn-yellow:hover { box-shadow: 6px 6px 0 var(--ink); }

/* === LINKS === */
a.ink-link { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* === FORM === */
.zine-input {
  font-family: var(--font-mono);
  font-size: 15px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  padding: 10px 0;
  color: var(--ink);
  width: 100%;
  outline: none;
}
.zine-input::placeholder { color: var(--line); }

/* === GALLERY === */
image-slot {
  background: var(--paper-deep);
  border: 2px solid var(--ink);
  display: block;
  position: relative;
}
image-slot::part(placeholder) {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

/* === Animations === */
@keyframes shake {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1deg); }
}
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}

.shake:hover { animation: shake 0.4s ease-in-out infinite; }
.float-stamp { animation: drift 6s ease-in-out infinite; }

/* Scrolltable */
html { scroll-behavior: smooth; }

/* RISO theme tweaks — duotone overprint headers */
body.theme-riso .h-display {
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--marker-blue), -3px 0 0 var(--marker-red);
}
body.theme-riso .nav { background: var(--marker-blue); }
body.theme-riso .nav-cta { background: var(--marker-red); color: #fff; border-color: var(--marker-yellow); }
body.theme-riso .btn { background: var(--marker-blue); color: #fff; border-color: var(--marker-blue); }
body.theme-riso .btn:hover { box-shadow: 6px 6px 0 var(--marker-red); }

/* MUD theme tweaks — warmer ink */
body.theme-mud .nav { background: var(--ink); }
body.theme-mud .stamp { filter: contrast(1.2) sepia(0.2); }

/* OLIVE theme — poster-perfect treatments */
body.theme-olive .h-display {
  color: #9eb53a;
  text-shadow:
    4px 4px 0 var(--ink),
    5px 5px 0 var(--ink),
    6px 6px 0 var(--ink);
  -webkit-text-stroke: 2px var(--ink);
  letter-spacing: 0.01em;
  line-height: 0.95;
}
body.theme-olive .h-display em,
body.theme-olive .h-display i {
  font-style: normal;
}
body.theme-olive .h-serif { color: var(--ink); }
body.theme-olive .nav { background: var(--ink); border-bottom: 4px solid var(--marker-yellow); }
body.theme-olive .nav-cta { background: var(--marker-yellow); color: var(--ink); border-color: var(--paper); }
body.theme-olive .btn {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
body.theme-olive .btn-yellow { background: var(--marker-yellow); color: var(--ink); border-color: var(--ink); }
body.theme-olive .stamp { border-color: var(--ink); color: var(--ink); }
body.theme-olive .stamp.stamp-blue { border-color: var(--marker-blue); color: var(--marker-blue); }
body.theme-olive .round-stamp { border-color: var(--ink); color: var(--ink); }
body.theme-olive .kicker { background: var(--ink); color: var(--paper); }
body.theme-olive .highlight {
  background: linear-gradient(90deg, transparent 1%, var(--marker-yellow) 1%, var(--marker-yellow) 99%, transparent 99%);
  background-size: 100% 70%;
  background-position: 0 85%;
  background-repeat: no-repeat;
  color: var(--ink);
}
body.theme-olive .highlight-red {
  background: var(--marker-blue);
  color: var(--paper);
}
body.theme-olive .circled::before { border-color: var(--ink); }

/* Checkered side rails — poster border motif */
.checker-rail {
  position: fixed;
  top: 0; bottom: 0;
  width: 26px;
  background-image:
    repeating-linear-gradient(
      to bottom,
      #1f4d29 0, #1f4d29 18px,
      #deaa2a 18px, #deaa2a 36px,
      #1f4d29 36px, #1f4d29 38px,
      #fbf6e6 38px, #fbf6e6 56px,
      #1f4d29 56px, #1f4d29 58px,
      #9eb53a 58px, #9eb53a 76px,
      #1f4d29 76px, #1f4d29 78px,
      #deaa2a 78px, #deaa2a 96px,
      #1f4d29 96px, #1f4d29 98px,
      #fbf6e6 98px, #fbf6e6 116px
    );
  z-index: 50;
  pointer-events: none;
  border-right: 3px solid #1f4d29;
}
.checker-rail.right { left: auto; right: 0; border-right: 0; border-left: 3px solid #1f4d29; }
.checker-rail.left { left: 0; }
body:not(.theme-olive) .checker-rail { display: none; }
@media (max-width: 880px) {
  .checker-rail { width: 14px; }
}

/* Blue/white checkered tablecloth band */
.tablecloth {
  background-image:
    linear-gradient(45deg, #2680a8 25%, transparent 25%),
    linear-gradient(-45deg, #2680a8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2680a8 75%),
    linear-gradient(-45deg, transparent 75%, #2680a8 75%);
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  background-color: #fbf6e6;
}

/* Yellow date band with LCD font */
.date-band {
  background: var(--marker-yellow);
  color: var(--ink);
  padding: 14px 22px;
  font-family: "Silkscreen", monospace;
  font-size: 22px;
  letter-spacing: 0.08em;
  font-weight: 700;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
body:not(.theme-olive) .date-band {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 14px;
}

/* Dog mascot mark */
.dog-mark {
  display: inline-block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1f4d29;
  color: #fbf6e6;
  flex-shrink: 0;
}
body:not(.theme-olive) .dog-mark { background: var(--ink); color: var(--paper); }

/* Responsive */
@media (max-width: 880px) {
  section { padding: 64px 0; }
  .wrap { padding: 0 18px; }
  .nav-links { display: none; }
}
