:root {
  --ink: #111315;
  --paper: #f4eddb;
  --acid: #d8ff35;
  --red: #ff3d2e;
  --blue: #2458ff;
  --shadow: rgba(17, 19, 21, .16);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: #cfc8b5; }

body {
  color: var(--ink);
  font-family: "Arial Black", Impact, system-ui, sans-serif;
  overflow-x: hidden;
}

button, a { font: inherit; }

.sheet {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  background: var(--paper) url("assets/doodle-bg.webp") center / cover no-repeat;
}

.paper-noise {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .24;
  mix-blend-mode: multiply;
  background-image: repeating-linear-gradient(3deg, transparent 0 8px, rgba(10,10,10,.028) 9px 10px);
}

.topbar {
  height: 11vh;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.5vw;
  border-bottom: 4px solid var(--ink);
  background: rgba(244, 237, 219, .94);
  transform: rotate(-.08deg);
}

.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; font-size: clamp(18px, 1.5vw, 29px); letter-spacing: .06em; }
.brand-mark { display: grid; place-items: center; width: 50px; aspect-ratio: 1; border: 4px solid; border-radius: 46% 54% 39% 61%; transform: rotate(-8deg); background: var(--acid); }
nav { display: flex; gap: clamp(18px, 3vw, 56px); }
.scribble-link { position: relative; display: inline-block; padding: 10px 15px 8px; border: 3px solid var(--ink); color: #fff; background: var(--blue); box-shadow: 4px 4px 0 var(--ink); text-decoration: none; font-size: clamp(13px, 1vw, 19px); transform: rotate(-1deg); transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.scribble-link + .scribble-link { color: var(--ink); background: var(--acid); transform: rotate(1.5deg); }
.scribble-link:hover, .scribble-link:focus-visible { color: #fff; background: var(--red); box-shadow: 1px 1px 0 var(--ink); transform: translate(3px, 3px) rotate(1deg); outline: 3px dashed var(--ink); outline-offset: 4px; }

.hero {
  min-height: calc(100svh - 17vh);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 2vw;
  padding: 3.5vh 5vw 6vh;
}

.copy-block { position: relative; max-width: 900px; z-index: 2; padding: clamp(22px, 2.2vw, 42px); background: rgba(255, 252, 240, .94); border: 4px solid var(--ink); box-shadow: 11px 11px 0 rgba(17, 19, 21, .94); transform: rotate(-.25deg); }
.copy-block::before { content: ""; position: absolute; inset: 8px -9px -10px 7px; z-index: -1; border: 2px dashed rgba(17, 19, 21, .55); transform: rotate(.8deg); pointer-events: none; }
.eyebrow { display: inline-block; margin: 0 0 1.5vh; padding: 7px 12px 5px; color: #fff; background: var(--ink); font-size: clamp(11px, .85vw, 16px); letter-spacing: .08em; transform: rotate(-1.2deg); }
h1 { margin: 0; font-size: clamp(78px, 9.5vw, 182px); line-height: .72; letter-spacing: -.075em; text-transform: uppercase; transform: rotate(-1deg); }
h1 span { display: block; }
h1 .jak { color: var(--red); margin-left: 12vw; -webkit-text-stroke: 3px var(--ink); text-shadow: 7px 7px 0 var(--ink); transform: rotate(2deg); }
.tagline { margin: 3.5vh 0 1.8vh; font-size: clamp(21px, 2vw, 38px); line-height: .95; letter-spacing: -.03em; }
.lore { max-width: 750px; margin: 0; padding: 12px 15px; border-left: 7px solid var(--blue); color: #08090a; background: rgba(216, 255, 53, .3); font-family: "Comic Sans MS", "Segoe Print", cursive; font-weight: 700; font-size: clamp(14px, 1.05vw, 20px); line-height: 1.32; transform: rotate(.3deg); }
.actions { margin-top: 2.7vh; display: flex; align-items: center; gap: 20px; }
.ca-button { position: relative; min-width: 270px; padding: 13px 27px 10px; border: 4px solid var(--ink); color: var(--ink); background: var(--acid); cursor: pointer; box-shadow: 7px 7px 0 var(--ink); transform: rotate(-1deg); transition: transform .16s ease, box-shadow .16s ease; }
.ca-button:hover { transform: translate(3px, 3px) rotate(1deg); box-shadow: 3px 3px 0 var(--ink); }
.ca-button:active { transform: translate(7px, 7px); box-shadow: 0 0 0 var(--ink); }
.button-label { display: block; font-size: clamp(22px, 1.55vw, 30px); }
.button-hint { display: block; font-size: 9px; letter-spacing: .16em; margin-top: 3px; }
.tiny-note { font: 700 13px/1.1 "Comic Sans MS", cursive; transform: rotate(4deg); }

.character-zone { position: relative; display: grid; place-items: center; align-self: stretch; min-width: 0; }
.character-wrap { position: relative; width: min(38vw, 70vh); aspect-ratio: 1; display: grid; place-items: center; animation: nervous-float 4s ease-in-out infinite; transform-style: preserve-3d; will-change: transform; }
.character { width: 100%; height: 100%; object-fit: contain; border-radius: 44% 56% 50% 47%; mix-blend-mode: multiply; filter: contrast(1.24); clip-path: ellipse(47% 49% at 50% 50%); }
.blink { position: absolute; left: 31%; top: 37%; width: 33%; height: 3px; opacity: 0; background: var(--ink); transform: rotate(3deg); animation: blink 5.2s infinite; }
.aura { position: absolute; z-index: -1; border: 5px solid var(--blue); border-radius: 44% 56% 50% 47%; inset: 8%; animation: aura 6s linear infinite; }
.aura-two { inset: 1%; border-color: var(--red); animation-direction: reverse; animation-duration: 9s; }
.arrow-note { position: absolute; z-index: 2; top: 9%; left: 0; margin: 0; font: 700 clamp(13px, 1vw, 18px)/1.1 "Comic Sans MS", cursive; transform: rotate(-9deg); }
.arrow-note span { display: block; text-align: right; font-size: 45px; }
.status-card { position: absolute; right: 0; bottom: 7%; padding: 10px 15px; border: 3px solid; background: var(--paper); font-size: clamp(10px, .75vw, 14px); transform: rotate(2deg); }
.pulse-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse .9s steps(2) infinite; }

footer { position: absolute; bottom: 0; left: 0; right: 0; min-height: 5vh; display: flex; align-items: center; justify-content: space-between; padding: 0 4.5vw; color: #fff; background: rgba(17, 19, 21, .94); font-size: clamp(9px, .7vw, 13px); letter-spacing: .06em; }
.sound-toggle { border: 0; border-bottom: 3px solid; color: inherit; background: transparent; cursor: pointer; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 7%; padding: 15px 22px; color: #fff; background: var(--ink); transform: translate(-50%, 150px) rotate(-2deg); opacity: 0; transition: .3s cubic-bezier(.2,.8,.2,1); }
.toast.show { transform: translate(-50%, 0) rotate(1deg); opacity: 1; }
.cursor-dot { position: fixed; z-index: 30; width: 18px; height: 18px; border: 3px solid var(--red); border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); opacity: 0; }

@keyframes nervous-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 35% { transform: translateY(-10px) rotate(1.5deg); } 70% { transform: translateY(5px) rotate(-.3deg); } }
@keyframes blink { 0%,45%,48%,100% { opacity: 0; transform: scaleY(1); } 46%,47% { opacity: 1; transform: scaleY(2); } }
@keyframes aura { to { transform: rotate(360deg) scale(1.035); } }
@keyframes pulse { 50% { opacity: .2; transform: scale(.7); } }

@media (min-width: 1500px) and (min-height: 800px) { .hero { max-width: 1920px; margin: 0 auto; } }
@media (max-width: 900px) {
  .topbar { height: auto; min-height: 70px; padding: 12px 20px; }
  .brand-mark { width: 38px; }
  nav { gap: 14px; }
  .hero { grid-template-columns: 1fr; padding: 45px 22px 100px; }
  .copy-block { padding: 25px 20px; }
  h1 { font-size: clamp(72px, 21vw, 130px); }
  h1 .jak { margin-left: 20vw; }
  .character-zone { min-height: 520px; }
  .character-wrap { width: min(90vw, 520px); }
  footer { position: absolute; }
}
@media (max-width: 540px) {
  .brand { font-size: 15px; }
  nav a { font-size: 10px; }
  .lore { font-size: 15px; }
  .actions { align-items: flex-start; flex-direction: column; }
  .ca-button { width: 100%; }
  .status-card { right: 2%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } .cursor-dot { display: none; } }
