/* The Safety Book — Retro Comic Print theme */
:root {
  --paper: #f7eeda;
  --ink: #222222;
  --blue: #1c4587;
  --red: #d84026;
  --yellow: #ffd60a;
  --teal: #2a9d8f;
  --grey: #5c5648;
  --night: #1b1b2e;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', Verdana, sans-serif;
  color: var(--ink);
  background: var(--paper);
  background-image: radial-gradient(#d8402611 18%, transparent 19%);
  background-size: 14px 14px;
  line-height: 1.6;
}
h1, h2, h3 { line-height: 1.05; }
h1, h2 { font-family: 'Bangers', cursive; letter-spacing: 1px; color: var(--blue); }
h1 { font-size: clamp(40px, 6vw, 72px); text-shadow: 3px 3px 0 var(--red); }
h2 { font-size: clamp(30px, 4.5vw, 44px); margin-bottom: 18px; text-shadow: 2px 2px 0 var(--yellow); }
h3 { font-size: 20px; margin-bottom: 8px; font-weight: 900; color: var(--blue); }
p { margin-bottom: 12px; }
img { max-width: 100%; height: auto; }
section { padding: 64px 24px; position: relative; }
.wrap { max-width: 1040px; margin: 0 auto; }
.center { text-align: center; }

/* Nav */
nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; flex-wrap: wrap; gap: 8px;
  border-bottom: 4px solid var(--red);
}
nav .brand { font-family: 'Bangers', cursive; font-size: 26px; letter-spacing: 1px; color: #fff; text-decoration: none; }
nav .brand span { color: var(--yellow); }
nav .links { display: flex; gap: 18px; flex-wrap: wrap; }
nav .links a { color: #fff; text-decoration: none; font-size: 15px; font-weight: 700; opacity: .92; }
nav .links a:hover { color: var(--yellow); }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 26px;
  font-family: 'Bangers', cursive; letter-spacing: 1.5px; font-size: 19px;
  text-decoration: none; border-radius: 8px; cursor: pointer;
  border: 3px solid var(--ink); box-shadow: 5px 5px 0 rgba(34,34,34,.28);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(34,34,34,.28); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--ink); }

/* Issue badge */
.issue {
  display: inline-block; background: var(--red); color: #fff;
  font-family: 'Bangers', cursive; font-size: 20px; letter-spacing: 1px;
  padding: 10px 18px; transform: rotate(-4deg);
  border: 3px solid var(--ink); box-shadow: 4px 4px 0 rgba(34,34,34,.25);
  margin-bottom: 20px;
}

/* Hero */
.hero { padding: 64px 24px; overflow: hidden; }
.hero .wrap { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.hero .copy { flex: 1 1 380px; }
.hero .pic { flex: 0 1 330px; text-align: center; }
.hero .pic .frame {
  display: inline-block; background: #fff; padding: 14px;
  border: 4px solid var(--ink); box-shadow: 8px 8px 0 rgba(34,34,34,.18);
  transform: rotate(1.5deg);
}
.hero .pic img { max-height: 340px; display: block; }
.tagline { font-size: 19px; font-weight: 700; color: var(--grey); margin: 14px 0 26px; max-width: 460px; }

/* Panels (cards) */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.panel {
  background: #fff; padding: 26px;
  border: 4px solid var(--ink); box-shadow: 7px 7px 0 rgba(34,34,34,.18);
}
.panel .emoji { font-size: 38px; margin-bottom: 10px; }
.panel.tilt-l { transform: rotate(-1deg); }
.panel.tilt-r { transform: rotate(1deg); }
.kicker {
  display: inline-block; font-family: 'Bangers', cursive; letter-spacing: 1px;
  background: var(--yellow); border: 3px solid var(--ink); padding: 4px 14px;
  font-size: 17px; transform: rotate(-2deg); margin-bottom: 14px; color: var(--ink);
}

/* Speech bubble */
.bubble {
  position: relative; background: #fff; border: 4px solid var(--ink);
  border-radius: 24px; padding: 20px 26px; font-weight: 900; font-size: 19px;
  box-shadow: 6px 6px 0 rgba(34,34,34,.18);
}
.bubble::after {
  content: ''; position: absolute; bottom: -22px; left: 48px;
  border: 12px solid transparent; border-top-color: var(--ink);
}
.watson-says { display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.watson-says img { width: 130px; }

/* Ink section (dark strip) */
.ink-section { background: var(--ink); color: #fff; border-top: 4px solid var(--red); border-bottom: 4px solid var(--red); }
.ink-section h2 { color: #fff; text-shadow: 2px 2px 0 var(--red); }
.ink-section .accent { color: var(--yellow); }
.stats { display: flex; gap: 36px; justify-content: center; flex-wrap: wrap; text-align: center; }
.stats .stat { font-weight: 700; }
.stats .stat b { display: block; font-family: 'Bangers', cursive; font-size: 44px; color: var(--yellow); letter-spacing: 1px; }

/* Coming next strip */
.next-issues { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.next-issues .next {
  background: var(--paper); border: 3px dashed var(--ink); padding: 14px 20px;
  font-weight: 900; transform: rotate(-1deg); color: var(--grey);
}
.next-issues .next b { display: block; font-family: 'Bangers', cursive; color: var(--blue); font-size: 18px; letter-spacing: 1px; }

/* Form */
form.contact { max-width: 560px; margin: 0 auto; background: #fff; border: 4px solid var(--ink); box-shadow: 8px 8px 0 rgba(34,34,34,.18); padding: 28px; }
form.contact label { font-weight: 900; display: block; margin: 16px 0 6px; }
form.contact input, form.contact select, form.contact textarea {
  width: 100%; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 6px;
  font: inherit; background: var(--paper);
}
form.contact input:focus, form.contact select:focus, form.contact textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
form.contact .hp { position: absolute; left: -5000px; }
form.contact button { margin-top: 20px; }

/* Footer */
footer { background: var(--ink); color: #cfc9bb; padding: 32px 24px; text-align: center; font-size: 14px; border-top: 4px solid var(--red); }
footer a { color: var(--yellow); text-decoration: none; margin: 0 10px; }

/* Gateway */
.gateway { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; }
.gateway h1 { text-align: center; }
.gateway .sub { color: var(--grey); font-size: 19px; font-weight: 700; margin: 10px 0 40px; text-align: center; }
.gateway .choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 32px; max-width: 780px; width: 100%; }
.gateway .choice {
  background: #fff; border: 4px solid var(--ink); box-shadow: 8px 8px 0 rgba(34,34,34,.18);
  padding: 30px; text-align: center; text-decoration: none; color: var(--ink);
  transition: transform .15s ease;
}
.gateway .choice:hover { transform: translate(-3px, -3px); }
.gateway .choice img { max-height: 220px; margin-bottom: 14px; }
.gateway .choice h2 { text-shadow: 2px 2px 0 var(--yellow); }
.gateway .choice .age { color: var(--grey); font-weight: 900; margin-bottom: 16px; }
.gateway .choice:first-child { transform: rotate(-1deg); }
.gateway .choice:last-child { transform: rotate(1deg); }
.gateway .choice:first-child:hover, .gateway .choice:last-child:hover { transform: rotate(0deg) translate(-3px, -3px); }

/* Secondary: midnight edition */
body.midnight {
  background: var(--night);
  background-image: radial-gradient(#ffd60a0d 18%, transparent 19%);
  background-size: 14px 14px;
  color: #e8e6f2;
}
body.midnight h1 { color: #fff; text-shadow: 3px 3px 0 var(--red); }
body.midnight h2 { color: #fff; text-shadow: 2px 2px 0 var(--red); }
body.midnight h3 { color: var(--yellow); }
body.midnight .tagline { color: #b9b4d0; }
body.midnight .panel { background: #26243d; border-color: #000; color: #e8e6f2; box-shadow: 7px 7px 0 rgba(0,0,0,.45); }
body.midnight .issue { box-shadow: 4px 4px 0 rgba(0,0,0,.5); }
body.midnight .hero .pic .frame { background: #26243d; border-color: #000; box-shadow: 8px 8px 0 rgba(0,0,0,.45); }
body.midnight .kicker { background: var(--yellow); }
body.midnight .ink-section { background: #000; }
body.midnight form.contact { background: #26243d; border-color: #000; box-shadow: 8px 8px 0 rgba(0,0,0,.45); }
body.midnight form.contact input, body.midnight form.contact select, body.midnight form.contact textarea { background: #1b1b2e; border-color: #000; color: #e8e6f2; }
body.midnight form.contact input:focus, body.midnight form.contact select:focus, body.midnight form.contact textarea:focus { border-color: var(--yellow); }
body.midnight .next-issues .next { background: #1b1b2e; border-color: #555; color: #b9b4d0; }
body.midnight .next-issues .next b { color: var(--yellow); }

@media (max-width: 600px) {
  section { padding: 44px 16px; }
  .hero { padding: 44px 16px; }
  h1 { text-shadow: 2px 2px 0 var(--red); }
}
