/* Guyisms — firestoneone.com. The jank is intentional. Every "mistake" is a feature. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  color: #f0eefc;
  background-color: #05051e;
  /* Tiled starfield, drawn in pure CSS so nothing external is ever loaded */
  background-image:
    radial-gradient(1.5px 1.5px at 25px 40px, #fff 100%, transparent),
    radial-gradient(1px 1px at 110px 90px, #ffe9a8 100%, transparent),
    radial-gradient(2px 2px at 170px 30px, #9fd8ff 100%, transparent),
    radial-gradient(1px 1px at 60px 140px, #fff 100%, transparent),
    radial-gradient(1.5px 1.5px at 150px 160px, #ffb3e6 100%, transparent);
  background-size: 200px 200px;
  /* clip (not hidden) so drifting content can never create a phantom horizontal
     scroll area — iOS recalculates scroll extents per frame otherwise, which
     reads as page jitter even when idle */
  overflow-x: hidden;
  overflow-x: clip;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  text-align: center;
}

.site-header marquee {
  background: #000;
  color: #ff0;
  font-weight: bold;
  padding: 5px 0;
  border-bottom: 4px ridge #32cd32;
  font-size: 15px;
}

.wordart {
  margin: 24px 10px 4px;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  letter-spacing: 4px;
  transform: skewY(-3deg) scaleY(1.15);
  background: linear-gradient(90deg, #ff2400, #ff8c00, #ffe600, #3cff00, #00e5ff, #ff00e5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(4px 4px 0 #7a0d8f) drop-shadow(1px 1px 0 #000);
}

.subtitle {
  color: #7cfc00;
  font-weight: bold;
  font-size: 1.05rem;
  letter-spacing: 2px;
  margin: 10px 0 0;
}

.blink {
  animation: blinker 1.1s step-start infinite;
}

@keyframes blinker {
  50% { opacity: 0; }
}

/* ── Photo + floating Guyisms ───────────────────────────────────────── */

#scatter-zone {
  position: relative;
  min-height: 1500px;
  /* fully contain the drifting notes: their bob/rotation overflow must never
     change the document's scrollable size */
  overflow: hidden;
  overflow: clip;
}

#photo-block {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 10;
}

.photo-frame {
  position: relative;
  margin: 0;
  padding: 10px 10px 6px;
  background: #fff;
  border: 10px ridge goldenrod;
  box-shadow: 0 0 0 5px #ff00cc, 0 0 40px rgba(255, 90, 0, 0.75);
}

#photo-stack {
  position: relative;
  width: min(460px, 70vw);
}

#photo-stack img {
  display: block;
  width: 100%;
  height: auto;
}

#guy-dirty {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 1.2s;
}

#guy-dirty.washed {
  opacity: 0;
  pointer-events: none;
}

#wash-banner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-6deg);
  z-index: 6;
  background: #ffe600;
  color: #7a0000;
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 1px;
  padding: 8px 12px;
  border: 3px double #7a0000;
  box-shadow: 4px 4px 0 #000;
  white-space: nowrap;
}

#hose {
  position: absolute;
  left: -30px;
  bottom: -34px;
  z-index: 40;
  font-size: 2.4rem;
  line-height: 1;
  text-align: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  filter: drop-shadow(3px 3px 2px rgba(0, 0, 0, 0.6));
}

#hose.dragging {
  cursor: grabbing;
}

#hose.dragging::after {
  content: "💦";
  position: absolute;
  left: 60%;
  top: -14px;
  font-size: 1.4rem;
}

.hose-label {
  display: block;
  font-family: Verdana, sans-serif;
  font-size: 8px;
  font-weight: bold;
  color: #7a0000;
  background: #ff0;
  border: 1px solid #f00;
  padding: 1px 3px;
  transform: rotate(-6deg);
  margin-top: 2px;
}

#rewash {
  display: block;
  margin: 8px auto 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  color: #7a0000;
  background: #ffd9a8;
  border: 3px outset #ffa500;
  padding: 4px 10px;
  cursor: pointer;
}

#rewash:active {
  border-style: inset;
}

/* display:block above would otherwise defeat the hidden attribute —
   the button must not exist until the wash reveal finishes */
#rewash[hidden] {
  display: none;
}

.droplet {
  position: absolute;
  pointer-events: none;
  z-index: 9998;
  font-size: 16px;
  animation: dropfly 0.7s forwards;
}

@keyframes dropfly {
  to {
    opacity: 0;
    transform: translate(var(--dx, 0px), var(--dy, 50px)) scale(0.5);
  }
}

.photo-frame figcaption {
  color: #111;
  text-align: center;
  font-size: 14px;
  padding-top: 5px;
}

.caption-list {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
}

.caption-list li {
  padding: 1px 0;
  font-weight: bold;
}

.caption-list li::before {
  content: "★ ";
  color: #b8860b;
}

#gotd {
  margin-top: 8px;
  border: 3px double #b8860b;
  background: #fff3c4;
  padding: 6px 10px;
  max-width: 440px;
}

.gotd-title {
  font-weight: bold;
  font-size: 11px;
  letter-spacing: 1px;
  color: #7a5200;
  margin-bottom: 3px;
}

#gotd-text {
  font-size: 13px;
  font-style: italic;
}

.photo-frame.wobble {
  animation: wobble 0.7s;
}

@keyframes wobble {
  0%   { transform: rotate(0); }
  25%  { transform: rotate(-3deg) scale(1.02); }
  50%  { transform: rotate(3deg); }
  75%  { transform: rotate(-2deg); }
  100% { transform: rotate(0); }
}

.flame {
  font-size: 3.2rem;
  animation: flicker 0.6s ease-in-out infinite alternate;
}

@keyframes flicker {
  from { transform: scale(1) rotate(-4deg); }
  to   { transform: scale(1.25) rotate(5deg); }
}

#floating-layer {
  position: absolute;
  inset: 0;
  /* the layer itself must never eat taps meant for the photo/caption underneath */
  pointer-events: none;
}

.note-pos {
  position: absolute;
  left: 0;
  top: 0;
  /* positioned entirely via transform (set inline by JS) — cheaper than left/top,
     no layout pass per animation frame */
  will-change: transform;
  width: 220px;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.note-pos.dragging {
  cursor: grabbing;
}

.note-pos:hover .note {
  animation-play-state: paused;
}

.note {
  position: relative;
  border: 3px outset #999;
  padding: 10px 12px;
  color: #111;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
  transform: rotate(var(--rot, 0deg));
  animation: bob var(--dur, 8s) ease-in-out var(--delay, 0s) infinite alternate;
}

@keyframes bob {
  from { transform: rotate(var(--rot, 0deg)) translateY(-6px); }
  to   { transform: rotate(var(--rot, 0deg)) translateY(6px); }
}

.note-header {
  font-weight: bold;
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.note-content {
  margin: 0;
  font-size: 14px;
  overflow-wrap: break-word;
}

.note-quote .note-content {
  font-style: italic;
  font-size: 15px;
}

.note-author {
  text-align: right;
  font-size: 12px;
  font-weight: bold;
  margin-top: 6px;
}

.note-new .note {
  outline: 4px dashed #ff0044;
  outline-offset: 3px;
}

.new-badge {
  position: absolute;
  top: -13px;
  right: -10px;
  background: #f00;
  color: #ff0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 2px 7px;
  transform: rotate(12deg);
  border: 2px solid #ff0;
  box-shadow: 2px 2px 0 #000;
}

/* ── Dividers & section titles ──────────────────────────────────────── */

.flame-divider {
  text-align: center;
  letter-spacing: 6px;
  margin: 26px 0;
  white-space: nowrap;
  overflow: hidden;
}

.section-title {
  text-align: center;
  color: #00ffff;
  font-size: 1.7rem;
  letter-spacing: 2px;
  text-shadow: 3px 3px 0 #ff00e5, 5px 5px 0 #000;
  margin: 10px 0;
}

/* ── Guybook form ───────────────────────────────────────────────────── */

#guybook {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 14px;
}

.guybook-hint {
  text-align: center;
  color: #ffd9a8;
  font-size: 14px;
}

#guybook-form fieldset {
  border: 4px ridge #32cd32;
  background: #c0c0c0;
  color: #111;
  padding: 16px;
  box-shadow: 8px 8px 0 #000;
}

#guybook-form legend {
  background: #000080;
  color: #fff;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 4px 14px;
  border: 2px outset #aaa;
}

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

.form-row label {
  font-weight: bold;
  font-size: 14px;
}

.type-row {
  display: flex;
  gap: 26px;
  justify-content: center;
  font-size: 15px;
}

#guybook-form textarea,
#guybook-form input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 7px;
  font-family: inherit;
  font-size: 14px;
  border: 2px inset #888;
  background: #fffef0;
}

#guybook-form textarea {
  resize: vertical;
}

.char-left {
  text-align: right;
  font-size: 12px;
  color: #333;
}

/* Honeypot: parked far off-screen; humans never see or fill it */
.hp-field {
  position: absolute;
  left: -5000px;
  top: 0;
}

.submit-row {
  text-align: center;
  margin-top: 18px;
}

.kindness-note {
  font-size: 13px;
  font-weight: bold;
  color: #5a3d00;
  margin: 0 0 10px;
}

#submit-btn {
  background: #ff2400;
  color: #ff0;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 12px 26px;
  border: 5px outset #ffa500;
  cursor: pointer;
  text-shadow: 2px 2px 0 #7a0000;
}

#submit-btn:hover {
  transform: rotate(-2deg) scale(1.06);
}

#submit-btn:active {
  border-style: inset;
}

#submit-btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

#form-msg {
  text-align: center;
  font-weight: bold;
  padding: 8px;
  margin: 12px 0 0;
}

#form-msg:empty {
  display: none;
}

#form-msg.success {
  color: #004d00;
  background: #b6ffb6;
  border: 2px dashed #008000;
}

#form-msg.error {
  color: #7a0000;
  background: #ffb6b6;
  border: 2px dashed #f00;
  animation: blinker 0.8s step-start 4;
}

#turnstile-slot {
  display: flex;
  justify-content: center;
}

/* ── Archive ────────────────────────────────────────────────────────── */

#archive {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 14px 20px;
}

.archive-blurb {
  text-align: center;
  color: #9f9fff;
  font-size: 14px;
}

.archive-row {
  background: #14143a;
  border-left: 6px solid #ff8c00;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.archive-row:nth-child(odd) {
  background: #1b1b4d;
}

.archive-content {
  font-size: 15px;
  overflow-wrap: break-word;
}

.archive-meta {
  font-size: 12px;
  color: #9f9fff;
  margin-top: 5px;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 10px 14px 40px;
}

.construction {
  max-width: 520px;
  margin: 18px auto;
  padding: 10px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 2px 2px 3px #000;
  background: repeating-linear-gradient(45deg, #111 0 22px, #fd0 22px 44px);
  border: 4px double #fff;
}

.counter-row {
  font-size: 14px;
  margin: 18px 0;
}

.hit-counter {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
  background: #000;
  border: 3px inset #666;
  padding: 3px 5px;
}

.hit-counter .digit {
  background: #111;
  color: #0f0;
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  font-size: 16px;
  padding: 1px 5px;
  border: 1px solid #030;
}

.counter-fineprint {
  font-size: 10px;
  color: #777;
  margin-top: 4px;
}

.badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0;
}

.badge {
  width: 88px;
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: Verdana, sans-serif;
  font-size: 8.5px;
  font-weight: bold;
  line-height: 1.15;
  border: 1px solid #fff;
}

.badge-netscape { background: #003; color: #9fd8ff; }
.badge-notepad  { background: #350035; color: #ffb3e6; }
.badge-y2k      { background: #013301; color: #7cfc00; }
.badge-res      { background: #331f00; color: #ffd9a8; }

.footer-fineprint {
  font-size: 11px;
  color: #666;
}

/* ── Cursor sparkle trail ───────────────────────────────────────────── */

.spark {
  position: absolute;
  pointer-events: none;
  z-index: 9999;
  font-size: 14px;
  animation: sparkfade 0.8s forwards;
}

@keyframes sparkfade {
  to {
    opacity: 0;
    transform: translateY(-26px) scale(0.4);
  }
}

/* ── Mobile: same drifting scatter, tuned for small screens ─────────── */

@media (max-width: 700px) {
  #scatter-zone {
    min-height: 1150px;
  }

  #photo-block {
    position: static;
    transform: none;
    justify-content: center;
    margin: 14px auto 0;
  }

  #photo-stack {
    width: min(460px, 60vw);
  }

  .flame {
    font-size: 2rem;
  }

  .note-pos {
    width: 150px;
  }

  .note-content {
    font-size: 12px;
  }

  .note-quote .note-content {
    font-size: 13px;
  }

  #hose {
    left: -26px;
    bottom: -30px;
    font-size: 2rem;
  }
}

/* ── Accessibility: the jank stands still on request ────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
  }
}
