/* ============================================================
   DerekSaenz.com — shared styles
   Colors and fonts live in :root. Change them here and every
   page updates. Colors are pulled from the Battle Bot Island cover.
   ============================================================ */

@font-face { font-family: "Bangers"; src: url("/fonts/bangers-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --paper: #fffaf0;        /* page background */
  --panel: #ffffff;        /* light panels */
  --ink: #141414;          /* outlines, text, dark sections */
  --ink-soft: #33302b;     /* body text */
  --muted: #6b665c;        /* small print */
  --magenta: #c42460;      /* hero + brand accent (cover sky) */
  --magenta-dot: #b01c55;  /* halftone dots on magenta */
  --yellow: #e8ec60;       /* title yellow from the cover */
  --red: #d93a2b;          /* robot red: buttons */
  --red-dark: #b42a1d;
  --teal: #3f9ea8;         /* big robot teal */

  --display: "Bangers", "Impact", "Arial Black", sans-serif;
  --body: "Nunito", "Trebuchet MS", Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --nav-h: 62px;
  --line: 3px solid var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { margin: 0; background: var(--paper); color: var(--ink-soft); font: 18px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--magenta); text-underline-offset: 3px; font-weight: 700; }
a:hover { color: var(--red); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

/* halftone dots (comic print look) */
.halftone {
  background-color: var(--magenta);
  background-image: radial-gradient(var(--magenta-dot) 22%, transparent 24%), radial-gradient(var(--magenta-dot) 22%, transparent 24%);
  background-size: 18px 18px; background-position: 0 0, 9px 9px;
}

/* ---------- sticky nav ---------- */
.nav-bar { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: var(--paper); border-bottom: var(--line); }
.nav-bar .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { font: 400 28px/1 var(--display); letter-spacing: .04em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--magenta); }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font: 400 21px/1 var(--display); letter-spacing: .06em; color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--magenta); border-bottom-color: var(--magenta); }
.menu-toggle { display: none; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer; padding: 10px; }
.menu-toggle span { display: block; height: 3px; background: var(--ink); margin: 4px 0; transition: transform .25s, opacity .25s; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: var(--line); padding: 8px 22px 18px;
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s;
  }
  .menu-open .nav-links { visibility: visible; opacity: 1; transform: none; }
  .nav-links a { display: block; padding: 14px 0; font-size: 26px; border-bottom: 1px solid #ddd5c4; }
  .nav-links li:last-child a { border-bottom: 0; }
}

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--ink); line-height: .95; margin: 0 0 .35em; letter-spacing: .02em; }
h2 { font-size: clamp(40px, 6vw, 60px); }
h3 { font-size: 30px; }
.kicker { font: 800 14px/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--magenta); margin: 0 0 12px; }
.lede { font-weight: 700; color: var(--ink); font-size: 19px; max-width: 560px; }
.pop { /* yellow comic lettering with black outline */
  color: var(--yellow); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 15px 26px 13px; cursor: pointer;
  background: var(--red); color: #fff; border: var(--line); border-radius: 6px;
  font: 400 26px/1 var(--display); letter-spacing: .06em; text-decoration: none;
  box-shadow: 5px 5px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.btn:hover { background: var(--red-dark); color: #fff; transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn.yellow { background: var(--yellow); color: var(--ink); }
.btn.yellow:hover { background: #f3f68a; color: var(--ink); }
.btn.teal { background: var(--teal); }
.btn.teal:hover { background: #33858d; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* ---------- hero (book page) ---------- */
.hero { padding: 56px 0 60px; text-align: center; border-bottom: var(--line); }
.hero.halftone, .hero.halftone .lede { color: #fff; }
.hero .series { font: 400 clamp(26px, 3.4vw, 36px)/1 var(--display); letter-spacing: .04em; color: #fff; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); margin: 0 0 10px; }
.hero h1 { font-size: clamp(60px, 9vw, 112px); margin: 0 0 18px; }
.hero h1 span { display: block; }
.hero .lede { margin: 0 auto; }
.hero .actions { justify-content: center; }
.badge {
  display: inline-block; background: var(--yellow); color: var(--ink); border: var(--line);
  font: 400 22px/1 var(--display); letter-spacing: .06em; padding: 8px 14px 6px;
  transform: rotate(-3deg); box-shadow: 4px 4px 0 var(--ink); margin: 0 0 18px;
}
.trust { font: 700 14px/1.4 var(--body); color: #fff; opacity: .95; margin: 18px 0 0; }
.trust span { white-space: nowrap; }

.cover-frame { border: var(--line); box-shadow: 10px 10px 0 var(--ink); background: var(--ink); }

.hero-desktop-cover { display: none; }
@media (min-width: 761px) {
  .hero-main { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; text-align: left; max-width: 1000px; margin: 0 auto; }
  .hero-main .lede { margin: 0; }
  .hero-main .actions { justify-content: flex-start; }
  .hero-main .trust { text-align: left; }
  .hero-desktop-cover { display: block; width: auto; max-width: none; height: clamp(360px, calc(100vh - var(--nav-h) - 160px), 580px); transform: rotate(2deg); }
}
.hero-mobile-cover { display: none; }
@media (max-width: 760px) {
  /* Sized so cover → button fits on the first screen of a phone */
  .hero-mobile-cover { display: block; width: auto; margin: 0 auto 18px; height: clamp(150px, calc(100svh - var(--nav-h) - 470px), 300px); box-shadow: 6px 6px 0 var(--ink); }
  .hero:has(.hero-mobile-cover) { padding: 20px 0 36px; }
  .hero:has(.hero-mobile-cover) .badge { font-size: 18px; margin-bottom: 12px; }
  .hero:has(.hero-mobile-cover) .series { font-size: 24px; margin-bottom: 4px; }
  .hero:has(.hero-mobile-cover) h1 { font-size: 50px; margin-bottom: 10px; }
  .hero:has(.hero-mobile-cover) .lede { font-size: 16px; line-height: 1.5; }
  .hero:has(.hero-mobile-cover) .actions { margin-top: 18px; }
}

/* ---------- trope reveal (scroll-linked) ---------- */
.reveal { position: relative; height: 320vh; }
.reveal-stage {
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h)); height: calc(100svh - var(--nav-h));
  display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto 1fr; align-items: center;
  gap: 8px 24px; max-width: var(--wrap); margin: 0 auto; padding: 24px 22px; overflow: hidden;
}
.reveal-heading { grid-column: 1 / -1; text-align: center; margin: 0; font-size: clamp(40px, 5vw, 64px); }
.reveal-cta { padding: 8px 0 72px; }
.reveal-cta .actions { justify-content: center; margin-top: 0; }
.reveal-cover {
  height: min(62vh, 560px); width: auto; max-width: none;
  border: var(--line); box-shadow: 10px 10px 0 var(--ink);
  opacity: calc(var(--c, 0));
  transform: translateY(calc((1 - var(--c, 0)) * 40px)) scale(calc(.9 + var(--c, 0) * .1));
  will-change: opacity, transform;
}
.tropes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-around; height: 80%; }
.tropes.left { align-items: flex-end; }
.tropes.right { align-items: flex-start; }
.trope { display: flex; align-items: center; gap: 10px; --t: 0; }
.tropes.right .trope { flex-direction: row-reverse; }
.trope-label { font: 400 clamp(26px, 3vw, 40px)/1 var(--display); letter-spacing: .03em; color: var(--ink); opacity: var(--t); transform: translateY(calc((1 - var(--t)) * 14px)); }
.tropes.left .trope-label { text-align: right; }
.trope:nth-child(2) .trope-label { color: var(--magenta); }
.trope-arrow { width: 96px; height: 48px; flex: none; overflow: visible; }
.tropes.right .trope-arrow { transform: scaleX(-1); }
.trope-arrow path { fill: none; stroke: var(--red); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--a, 0)); }
@media (max-width: 760px) {
  .reveal { height: 300vh; }
  .reveal-stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto 1fr; gap: 6px; padding: 12px 14px; }
  .reveal-heading { font-size: 40px; }
  .reveal-cover { height: min(42svh, 400px); justify-self: center; box-shadow: 6px 6px 0 var(--ink); }
  .reveal-cta { padding: 0 0 56px; }
  .tropes { flex-direction: row; height: auto; justify-content: space-between; align-items: flex-end !important; gap: 6px; }
  .tropes.left { align-self: end; }
  .tropes.right { align-self: start; align-items: flex-start !important; }
  .trope, .tropes.right .trope { flex: 1 1 0; flex-direction: column; gap: 4px; }
  .tropes.right .trope { flex-direction: column-reverse; }
  .trope-label, .tropes.left .trope-label { font-size: 22px; text-align: center; }
  .trope-arrow { width: 50px; height: 32px; transform: rotate(90deg); }
  .tropes.right .trope-arrow { transform: rotate(-90deg); }
  .tropes.left .trope:nth-child(1) .trope-arrow { transform: rotate(50deg); }
  .tropes.left .trope:nth-child(3) .trope-arrow { transform: rotate(130deg) scaleY(-1); }
  .tropes.right .trope:nth-child(1) .trope-arrow { transform: rotate(-50deg) scaleY(-1); }
  .tropes.right .trope:nth-child(3) .trope-arrow { transform: rotate(-130deg); }
}
.no-motion .reveal { height: auto; }
.no-motion .reveal-stage { position: static; height: auto; padding-top: 48px; padding-bottom: 48px; }
.no-motion .reveal-cover, .no-motion .trope { --c: 1; --t: 1; --a: 1; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.dark { background: var(--ink); color: #e9e5da; }
.dark h2, .dark h3 { color: #fff; }
.dark .kicker { color: var(--yellow); }
.prose { max-width: 700px; }
.prose p { margin: 0 0 1.1em; }

/* For fans of: full-width red band */
.fans { text-align: center; background: var(--red); color: #fff; padding: 64px 0; border-bottom: var(--line); }
.fans .kicker { color: var(--yellow); }
.fans .names { font: 400 clamp(38px, 5vw, 56px)/1 var(--display); letter-spacing: .03em; color: #fff; margin: 0 auto 18px; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.fans .names span { display: block; }
.fans .names .and { font: 800 14px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--yellow); -webkit-text-stroke: 0; text-shadow: none; margin: 10px 0; }
.fans p { max-width: 580px; margin: 0 auto; }
.fans .actions { justify-content: center; }
.btn.black { background: var(--ink); color: var(--yellow); box-shadow: 5px 5px 0 rgba(0,0,0,.35); }
.btn.black:hover { background: #2a2a2a; color: var(--yellow); }

/* Parent facts grid */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; list-style: none; padding: 0; }
.facts li { background: #222; border: 2px solid #3a3a3a; border-radius: 8px; padding: 18px; text-align: center; }
.facts b { display: block; font: 400 34px/1 var(--display); color: var(--yellow); letter-spacing: .03em; margin-bottom: 6px; }
.facts span { font-size: 15px; color: #cfcabe; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, 1fr); gap: 12px; } .facts li { padding: 14px 10px; } .facts b { font-size: 28px; white-space: nowrap; } }

/* ---------- signup ---------- */
.signup-section { background: var(--yellow); border-top: var(--line); border-bottom: var(--line); }
.signup { max-width: 640px; margin: 0 auto; text-align: center; }
.signup-card { background: var(--panel); border: var(--line); border-radius: 10px; box-shadow: 10px 10px 0 var(--ink); padding: 34px 28px 26px; }
.signup-card img { width: 120px; margin: -80px auto 14px; border: var(--line); box-shadow: 5px 5px 0 var(--ink); transform: rotate(-4deg); }
.signup form { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 18px; }
.signup input[type="email"] { flex: 1 1 220px; padding: 15px 16px; font: 17px var(--body); background: #fff; color: var(--ink); border: var(--line); border-radius: 6px; }
.signup input:focus { outline: 3px solid var(--magenta); outline-offset: 2px; }
.fineprint { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.signup-section .grownups { font-weight: 800; color: var(--ink); }

/* Kickstarter teaser */
.kickstarter { border-bottom: var(--line); background: var(--paper); }
.kickstarter .wrap { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; max-width: 920px; }
.ks-panel { width: 240px; aspect-ratio: 3/4; border: var(--line); box-shadow: 8px 8px 0 var(--ink); background: #fff; display: grid; place-items: center; text-align: center; padding: 18px; position: relative; overflow: hidden; }
.ks-panel::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#e5dfd0 22%, transparent 24%); background-size: 14px 14px; }
.ks-panel span { position: relative; font: 400 34px/1 var(--display); color: var(--ink); letter-spacing: .03em; }
.ks-panel small { position: relative; display: block; font: 800 12px/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--magenta); margin-top: 10px; }
@media (max-width: 760px) { .kickstarter .wrap { grid-template-columns: 1fr; gap: 30px; text-align: center; } .ks-panel { margin: 0 auto; width: 200px; } .kickstarter .actions { justify-content: center; } }

/* ---------- about ---------- */
.author { text-align: left; border-bottom: var(--line); }
.author .wrap { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 56px; align-items: center; }
.author h1 { font-size: clamp(60px, 9vw, 104px); }
.author-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border: var(--line); box-shadow: 12px 12px 0 var(--magenta); }
.photo-placeholder { display: grid; place-items: center; background: var(--teal); font: 400 120px/1 var(--display); color: var(--yellow); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--ink); }
.book-row { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center; max-width: 840px; }
.book-row img { border: 3px solid #000; box-shadow: 8px 8px 0 var(--magenta); }
@media (max-width: 760px) {
  .author .wrap, .book-row { grid-template-columns: 1fr; gap: 30px; }
  .author-photo { max-width: 290px; }
  .book-row img { width: 180px; }
}

/* ---------- inner page header ---------- */
.page-head { padding: 60px 0 8px; }
.page-head h1 { font-size: clamp(54px, 9vw, 96px); }

/* ---------- footer ---------- */
.site-footer { padding: 32px 0 44px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); font-weight: 400; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .section { padding: 60px 0; }
  .btn { font-size: 23px; }
}

/* ---------- signup success / error messages ---------- */
.form-success { margin-top: 18px; padding: 22px 24px; background: #fff; border: var(--line); border-radius: 8px; box-shadow: 6px 6px 0 var(--magenta); text-align: center; outline: none; }
.form-success p { margin: 0; }
.form-success-title { font: 400 34px/1 var(--display); letter-spacing: .03em; color: var(--ink); margin-bottom: 8px !important; }
.form-status { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }
.form-status.is-error { color: var(--red-dark); font-weight: 800; }

/* ---------- release date + countdown (hero) ---------- */
.release { font: 400 22px/1 var(--display); letter-spacing: .05em; color: var(--yellow); margin: 22px 0 0; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--ink); }
.countdown { display: flex; justify-content: center; align-items: flex-start; gap: 8px; margin-top: 10px; }
.countdown .unit { min-width: 62px; background: var(--ink); border-radius: 6px; padding: 8px 6px 6px; box-shadow: 3px 3px 0 rgba(0,0,0,.35); text-align: center; }
.countdown b { display: block; font: 400 38px/1 var(--display); color: var(--yellow); letter-spacing: .04em; }
.countdown small { font: 800 10px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.countdown .sep { font: 400 32px/1.4 var(--display); color: #fff; }
.countdown .done { font: 400 30px/1 var(--display); color: var(--yellow); margin: 0; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--ink); }
@media (min-width: 761px) { .hero-main .countdown { justify-content: flex-start; } }
@media (max-width: 760px) {
  .release { font-size: 19px; margin-top: 16px; }
  .countdown .unit { min-width: 54px; } .countdown b { font-size: 32px; }
}
