/* =========================================================
   hey — immersive interactive collage
   ========================================================= */

:root {
  --ginger: #e87a2a;
  --ginger-deep: #c45a12;
  --cream: #f7efe3;
  --cream-dark: #ebe0d0;
  --white: #ffffff;
  --charcoal: #1a1612;
  --ink: #2a2218;
  --win-blue: #000080;
  --win-blue-light: #1084d0;
  --win-face: #c0c0c0;
  --win-face-light: #dfdfdf;
  --sticky-yellow: #ffe566;
  --sticky-cream: #fff4c2;
  --grass: #5a9e3a;
  --brown: #8b5e3c;
  --outline: #111;
  --shadow: rgba(26, 22, 18, 0.28);
  --radius-sm: 4px;
  --font-display: "Trebuchet MS", "Segoe UI", "Comic Sans MS", "Arial Rounded MT Bold", sans-serif;
  --font-ui: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-pixel: "Courier New", Courier, monospace;
  --font-hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --z-trail: 9000;
  --z-header: 8000;

  /* Fluid scale: phones → 1080p → ultrawide (prefer vw for landscape) */
  --ui: clamp(1, 100vw / 1280, 1.55);
  --space-page: clamp(1rem, 2.4vw, 3rem);
  --space-section: clamp(2.75rem, 7vh, 6rem);
  --hero-cat: clamp(300px, min(30vw, 52vh), 580px);
  --hero-center: clamp(340px, 38vw, 700px);
  --desk-win-w: clamp(300px, 22vw, 460px);
  --deco-sticker: clamp(130px, 12vw, 260px);
  --deco-sticky: clamp(160px, 12vw, 260px);
  --deco-frame: clamp(140px, 11vw, 240px);
  --deco-browser: clamp(200px, 14vw, 300px);
  --win98-w: clamp(280px, 17vw, 400px);
  --brand-logo: clamp(44px, 3.6vw, 72px);
  --section-max: min(1400px, 94vw);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: clamp(16px, 0.75vw + 12px, 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--charcoal);
  background:
    radial-gradient(ellipse 120% 80% at 10% 0%, rgba(232, 122, 42, 0.18), transparent 50%),
    radial-gradient(ellipse 80% 60% at 90% 20%, rgba(255, 229, 102, 0.22), transparent 45%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(90, 158, 58, 0.12), transparent 50%),
    linear-gradient(165deg, #f3e8d8 0%, var(--cream) 40%, #efe4d4 100%);
  overflow-x: hidden;
  line-height: 1.45;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

button,
a.btn {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--ginger);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--safe-top);
  z-index: 10000;
  background: var(--charcoal);
  color: var(--white);
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  left: 1rem;
}

/* ---------- Trail layer ---------- */
.hey-trail-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-trail);
  overflow: hidden;
}

.hey-particle {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  will-change: transform, opacity;
  user-select: none;
  white-space: nowrap;
  animation: hey-float var(--dur, 0.9s) ease-out forwards;
  font-weight: 800;
  line-height: 1;
}

.hey-particle--bubble {
  color: var(--white);
  -webkit-text-stroke: 3px var(--outline);
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--outline);
  font-family: var(--font-display);
}

.hey-particle--orange {
  color: var(--ginger);
  font-family: var(--font-display);
  text-shadow: 1px 1px 0 var(--outline);
}

.hey-particle--sticker {
  color: var(--charcoal);
  background: var(--sticky-yellow);
  padding: 0.15em 0.35em;
  border: 2px solid var(--outline);
  box-shadow: 2px 2px 0 var(--outline);
  font-family: var(--font-hand);
  transform: rotate(var(--rot, 0deg));
}

.hey-particle--pixel {
  font-family: var(--font-pixel);
  font-size: 0.75em;
  color: var(--win-blue);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hey-particle--hand {
  font-family: var(--font-hand);
  color: var(--brown);
  font-weight: 700;
}

.hey-particle--burst {
  font-size: clamp(1.6rem, 3.5vw, 3.4rem);
  color: var(--white);
  -webkit-text-stroke: 4px var(--outline);
  paint-order: stroke fill;
  font-family: var(--font-display);
}

@keyframes hey-float {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -40px))) rotate(calc(var(--rot, 0deg) + var(--spin, 12deg))) scale(calc(var(--scale, 1) * 0.7));
  }
}

/* ---------- Top bar ---------- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  padding: calc(clamp(0.65rem, 1vw, 1rem) + var(--safe-top)) var(--space-page) clamp(0.65rem, 1vw, 1rem);
  background: rgba(247, 239, 227, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--charcoal);
  box-shadow: 0 4px 0 rgba(232, 122, 42, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand__logo {
  width: var(--brand-logo);
  height: var(--brand-logo);
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--charcoal);
  background: var(--white);
}

.brand__word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: -0.04em;
}

.brand__ticker {
  font-size: clamp(0.75rem, 1vw, 0.95rem);
  background: var(--sticky-yellow);
  border: 2px solid var(--charcoal);
  padding: 0.15rem 0.5rem;
  font-weight: 700;
}

.nav {
  display: none;
  gap: clamp(0.85rem, 1.4vw, 1.4rem);
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  font-size: clamp(0.85rem, 1.05vw, 1.05rem);
  font-weight: 700;
  text-transform: lowercase;
  opacity: 0.75;
}

.nav a:hover,
.nav a:focus-visible {
  opacity: 1;
  color: var(--ginger-deep);
}

.top-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 2px solid var(--charcoal);
  background: var(--white);
  padding: clamp(0.4rem, 0.7vw, 0.65rem) clamp(0.7rem, 1.1vw, 1rem);
  font-size: clamp(0.85rem, 1.05vw, 1rem);
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--charcoal);
}

.sound-toggle[aria-pressed="true"] {
  background: var(--sticky-yellow);
}

.sound-toggle__label {
  display: none;
}

@media (min-width: 480px) {
  .sound-toggle__label {
    display: inline;
  }
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  border: 3px solid var(--charcoal);
  background: var(--white);
  color: var(--charcoal);
  font-weight: 800;
  font-size: clamp(0.95rem, 1.2vw, 1.2rem);
  padding: clamp(0.7rem, 1.1vw, 1.05rem) clamp(1.15rem, 1.8vw, 1.75rem);
  box-shadow: 3px 3px 0 var(--charcoal);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn:hover,
.btn:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--charcoal);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--charcoal);
}

.btn--buy {
  background: var(--ginger);
  color: var(--white);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
}

.btn--chart {
  background: var(--win-blue-light);
  color: var(--white);
}

.btn--x {
  background: var(--charcoal);
  color: var(--white);
}

.btn--copy {
  background: var(--sticky-yellow);
}

.btn--machine {
  background: linear-gradient(180deg, #ffb347, var(--ginger));
  color: var(--white);
  width: 100%;
}

.btn--lg {
  font-size: clamp(1.15rem, 1.6vw, 1.55rem);
  padding: clamp(0.95rem, 1.4vw, 1.35rem) clamp(1.5rem, 2.4vw, 2.25rem);
}

.btn--sm {
  font-size: clamp(0.75rem, 0.95vw, 0.9rem);
  padding: 0.4rem 0.75rem;
  box-shadow: 2px 2px 0 var(--charcoal);
}

/* ---------- Win98 chrome ---------- */
.win98 {
  background: var(--win-face);
  border: 2px solid;
  border-color: var(--win-face-light) #404040 #404040 var(--win-face-light);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  font-family: "MS Sans Serif", Tahoma, var(--font-ui);
  width: var(--win98-w);
  max-width: 100%;
}

.win98__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, var(--win-blue), var(--win-blue-light));
  color: var(--white);
  padding: 0.4rem 0.55rem;
  font-size: clamp(0.85rem, 1.05vw, 1.05rem);
  font-weight: 700;
}

.win98__close {
  width: clamp(18px, 1.4vw, 24px);
  height: clamp(16px, 1.25vw, 22px);
  border: 1px solid;
  border-color: var(--win-face-light) #404040 #404040 var(--win-face-light);
  background: var(--win-face);
  font-size: clamp(12px, 1vw, 16px);
  line-height: 1;
  padding: 0;
  cursor: pointer;
  color: var(--charcoal);
}

.win98__body {
  padding: clamp(0.9rem, 1.4vw, 1.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  background: var(--win-face);
}

.win98__btn {
  min-width: clamp(80px, 8vw, 110px);
  padding: 0.4rem 1rem;
  border: 2px solid;
  border-color: var(--win-face-light) #404040 #404040 var(--win-face-light);
  background: var(--win-face);
  font-weight: 700;
  font-size: clamp(0.9rem, 1.05vw, 1.1rem);
  box-shadow: inset 1px 1px 0 #fff;
}

.win98__btn:active {
  border-color: #404040 var(--win-face-light) var(--win-face-light) #404040;
}

.notify-window__icon {
  width: clamp(52px, 5vw, 80px);
  height: clamp(52px, 5vw, 80px);
  object-fit: contain;
}

.notify-window__msg {
  margin: 0;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  font-weight: 800;
  font-family: var(--font-display);
}

.notify-window.is-hidden {
  display: none;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  border: none;
  background: transparent;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--charcoal);
  text-shadow: 1px 1px 0 var(--white);
  padding: 0.35rem;
}

.desktop-icon img {
  border: 2px solid var(--charcoal);
  background: var(--white);
  border-radius: 4px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 1080px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.75rem);
  padding: clamp(1.25rem, 3vh, 2.5rem) var(--space-page) clamp(2.5rem, 5vh, 4rem);
  isolation: isolate;
  overflow: hidden;
}

.hero__atmosphere {
  position: absolute;
  inset: -5% -5%;
  z-index: -2;
  background:
    url("assets/banner.png") center / cover no-repeat;
  opacity: 0.42;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.05);
}

.hero__noise {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.55), transparent 55%),
    linear-gradient(180deg, rgba(247, 239, 227, 0.2), rgba(247, 239, 227, 0.85));
  pointer-events: none;
}

.hero__left,
.hero__right {
  display: none;
  position: relative;
}

.hero__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
  padding: 1rem 0.5rem;
}

.hero-mascot {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  width: var(--hero-cat);
  max-width: 86vw;
  max-height: min(58vh, 620px);
  transition: transform 0.15s ease-out;
  will-change: transform;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.35));
}

.hero-mascot img {
  width: 100%;
  height: 100%;
  max-height: inherit;
  object-fit: contain;
  pointer-events: none;
}

.hero__title {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(4.75rem, 10vw, 9.5rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: var(--white);
  -webkit-text-stroke: clamp(4px, 0.45vw, 8px) var(--outline);
  paint-order: stroke fill;
  text-shadow: 6px 8px 0 rgba(0, 0, 0, 0.2);
}

.hero__ticker {
  margin: 0.45rem 0 0;
  display: inline-block;
  background: var(--sticky-yellow);
  border: 3px solid var(--charcoal);
  padding: 0.25rem 0.85rem;
  font-weight: 800;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  box-shadow: 3px 3px 0 var(--charcoal);
}

.hero__sub {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero__lead {
  margin: 0.5rem 0 0;
  max-width: 32ch;
  opacity: 0.85;
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 1.2vw, 1.1rem);
  justify-content: center;
  margin-top: clamp(1.25rem, 2.5vh, 2rem);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.55;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

.sticker {
  width: var(--deco-sticker);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--charcoal);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--shadow);
}

.sticker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticky {
  background: var(--sticky-yellow);
  padding: clamp(0.9rem, 1.4vw, 1.25rem) clamp(1rem, 1.5vw, 1.35rem);
  border: 2px solid rgba(0, 0, 0, 0.12);
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.15);
  font-family: var(--font-hand);
  font-weight: 700;
  width: var(--deco-sticky);
  max-width: 100%;
  font-size: clamp(1.05rem, 1.4vw, 1.4rem);
}

.sticky p {
  margin: 0;
}

.sticky__small {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.35rem !important;
}

.sticky--cream {
  background: var(--sticky-cream);
}

.sticky--yellow {
  background: var(--sticky-yellow);
}

.rotate-left { transform: rotate(-6deg); }
.rotate-right { transform: rotate(5deg); }

.retro-frame {
  width: var(--deco-frame);
  background: #8b6b45;
  border: clamp(5px, 0.5vw, 8px) solid #6b4f32;
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 0;
}

.retro-frame__bar {
  background: #5a9e3a;
  color: #fff;
  font-family: var(--font-pixel);
  font-size: clamp(0.6rem, 0.85vw, 0.8rem);
  padding: 0.2rem 0.4rem;
}

.retro-frame img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #3d7a28;
}

.float-hey {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--white);
  -webkit-text-stroke: 3px var(--outline);
  paint-order: stroke fill;
  font-size: clamp(1.5rem, 2.4vw, 2.6rem);
  animation: floaty 4s ease-in-out infinite;
}

.float-hey--a { top: 12%; left: 8%; animation-delay: 0s; }
.float-hey--b { top: 55%; left: 18%; color: var(--ginger); -webkit-text-stroke: 2px var(--outline); animation-delay: 0.6s; }
.float-hey--c { top: 70%; right: 10%; font-size: 1.1rem; animation-delay: 1.1s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

.float-a {
  animation: floaty 5s ease-in-out infinite;
}

.pixel-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  font-weight: 700;
}

.pixel-icon__folder {
  width: 42px;
  height: 32px;
  background: var(--sticky-yellow);
  border: 2px solid var(--charcoal);
  border-radius: 2px 6px 2px 2px;
  position: relative;
}

.pixel-icon__folder::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 2px;
  width: 16px;
  height: 8px;
  background: var(--ginger);
  border: 2px solid var(--charcoal);
  border-bottom: none;
}

.browser-deco {
  width: var(--deco-browser);
  background: var(--white);
  border: 3px solid var(--charcoal);
  box-shadow: 4px 4px 0 var(--charcoal);
  font-size: clamp(0.8rem, 1.05vw, 1.05rem);
}

.browser-deco__bar {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.45rem;
  background: var(--cream-dark);
  border-bottom: 2px solid var(--charcoal);
}

.browser-deco__bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ginger);
  border: 1px solid var(--charcoal);
}

.browser-deco__bar .dot:nth-child(2) { background: var(--sticky-yellow); }
.browser-deco__bar .dot:nth-child(3) { background: var(--grass); }

.browser-deco__url {
  margin-left: 0.35rem;
  font-family: var(--font-pixel);
  opacity: 0.7;
}

.browser-deco__content {
  padding: 0.75rem;
  font-weight: 700;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(220px, 1fr) var(--hero-center) minmax(220px, 1fr);
    align-items: center;
    padding: clamp(1.5rem, 3vh, 2.5rem) clamp(1.25rem, 2.5vw, 2.5rem) clamp(3rem, 5vh, 4.5rem);
    gap: clamp(0.5rem, 1.5vw, 1.5rem);
  }

  .hero__left,
  .hero__right {
    display: block;
    min-height: clamp(520px, 70vh, 780px);
    align-self: stretch;
  }

  .hero__left .sticker {
    position: absolute;
    top: 6%;
    left: 10%;
  }

  .hero__left .sticky {
    position: absolute;
    top: 36%;
    left: 4%;
  }

  .hero__left .retro-frame {
    position: absolute;
    bottom: 10%;
    left: 22%;
  }

  .hero__left .pixel-icon {
    position: absolute;
    top: 16%;
    right: 6%;
    font-size: clamp(0.75rem, 1vw, 1rem);
  }

  .hero__left .pixel-icon__folder {
    width: clamp(48px, 4vw, 72px);
    height: clamp(36px, 3vw, 54px);
  }

  .hero__right .notify-window {
    position: absolute;
    top: 4%;
    right: 6%;
    z-index: 5;
  }

  .hero__right .desktop-icon {
    position: absolute;
    top: 6%;
    right: 10%;
    font-size: clamp(0.8rem, 1vw, 1rem);
  }

  .hero__right .desktop-icon img {
    width: clamp(44px, 4vw, 64px);
    height: clamp(44px, 4vw, 64px);
  }

  .hero__right .sticky {
    position: absolute;
    bottom: 20%;
    right: 14%;
  }

  .hero__right .browser-deco {
    position: absolute;
    bottom: 6%;
    right: 4%;
  }
}

@media (min-width: 1400px) {
  .hero {
    grid-template-columns: minmax(280px, 1fr) var(--hero-center) minmax(280px, 1fr);
  }
}

/* ---------- Sections shared ---------- */
.section-head {
  text-align: center;
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
  padding: 0 var(--space-page);
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.section-head p {
  margin: 0.65rem auto 0;
  max-width: 44ch;
  opacity: 0.8;
  font-size: clamp(1rem, 1.25vw, 1.25rem);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Desktop section ---------- */
.desktop-section {
  padding: var(--space-section) 0;
}

.desktop-surface {
  position: relative;
  margin: 0 var(--space-page);
  min-height: clamp(640px, 78vh, 900px);
  background:
    linear-gradient(180deg, #3a8fd4 0%, #5aa8e0 40%, #7ec07a 40%, #6aad68 100%);
  border: 4px solid var(--charcoal);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
  overflow: hidden;
  padding: clamp(1rem, 1.5vw, 1.5rem);
}

.desktop-wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15), transparent 40%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(0, 0, 0, 0.03) 31px,
      rgba(0, 0, 0, 0.03) 32px
    );
  pointer-events: none;
}

.desk-win {
  position: relative;
  width: min(100%, var(--desk-win-w));
  margin: 0.85rem auto;
  background: var(--win-face);
  border: 2px solid;
  border-color: var(--win-face-light) #404040 #404040 var(--win-face-light);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
  z-index: var(--wz, 1);
  touch-action: manipulation;
}

.desk-win__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: linear-gradient(90deg, var(--win-blue), var(--win-blue-light));
  color: var(--white);
  padding: 0.4rem 0.55rem;
  font-size: clamp(0.8rem, 1.05vw, 1rem);
  font-weight: 700;
  cursor: grab;
  user-select: none;
}

.desk-win__bar:active {
  cursor: grabbing;
}

.desk-win__controls {
  display: flex;
  gap: 3px;
}

.desk-win__controls i {
  display: block;
  width: 14px;
  height: 12px;
  background: var(--win-face);
  border: 1px solid #404040;
}

.desk-win__body {
  padding: clamp(0.8rem, 1.2vw, 1.1rem);
  background: var(--white);
  border: 2px inset var(--win-face);
  margin: 0.4rem;
  min-height: clamp(110px, 14vh, 160px);
}

.desk-win__foot {
  padding: 0.35rem 0.55rem 0.55rem;
  text-align: center;
}

.chat-body {
  font-family: var(--font-pixel);
  font-size: clamp(0.85rem, 1.1vw, 1.05rem);
  max-height: clamp(160px, 22vh, 240px);
  overflow-y: auto;
}

.chat-line {
  margin-bottom: 0.35rem;
}

.chat-line--you {
  color: var(--ginger-deep);
}

.chat-who {
  font-weight: 700;
  opacity: 0.7;
}

.generator-body {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.generator-output {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 900;
  color: var(--white);
  -webkit-text-stroke: 3px var(--outline);
  paint-order: stroke fill;
  min-height: 1.2em;
  transition: transform 0.15s ease;
}

.generator-output.is-pop {
  transform: scale(1.15) rotate(-3deg);
}

.notepad-body {
  background: #fffff0;
  font-family: var(--font-pixel);
}

.notepad-body pre {
  margin: 0;
  white-space: pre-wrap;
  font-size: clamp(0.95rem, 1.2vw, 1.2rem);
  line-height: 1.5;
}

.alert-body {
  text-align: center;
}

.alert-title {
  font-weight: 800;
  margin: 0 0 0.35rem;
}

.counter-body {
  text-align: center;
}

.counter-label {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
}

.counter-value {
  margin: 0.25rem 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 900;
  color: var(--ginger);
  line-height: 1;
}

.counter-note {
  margin: 0;
  font-size: 0.65rem;
  opacity: 0.6;
}

.desktop-trash {
  display: none;
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--white);
  text-shadow: 1px 1px 0 #000;
}

.desktop-trash__can {
  width: 36px;
  height: 42px;
  border: 2px solid var(--white);
  border-radius: 2px 2px 6px 6px;
  background: rgba(255, 255, 255, 0.15);
}

@media (min-width: 900px) {
  .desktop-surface {
    min-height: clamp(720px, 82vh, 960px);
  }

  .desk-win {
    position: absolute;
    left: var(--wx, 10%);
    top: var(--wy, 10%);
    margin: 0;
    width: var(--desk-win-w);
  }

  .desk-win--alert {
    width: calc(var(--desk-win-w) * 0.92);
  }

  .desktop-trash {
    display: flex;
    font-size: clamp(0.75rem, 1vw, 0.95rem);
  }

  .desktop-trash__can {
    width: clamp(40px, 3.5vw, 56px);
    height: clamp(48px, 4vw, 66px);
  }
}

@media (min-width: 1100px) {
  .desk-win[data-window="generator"] {
    width: calc(var(--desk-win-w) * 1.12);
  }
}

/* ---------- Universe / Gallery ---------- */
.universe {
  padding: var(--space-section) var(--space-page);
  position: relative;
}

.gallery-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.65rem, 1.2vw, 1.15rem);
  max-width: var(--section-max);
  margin: 0 auto;
  padding: 0.5rem;
}

.gallery-tile {
  position: relative;
  aspect-ratio: 1;
  background-image: url("assets/gallary.png");
  background-size: 400% 400%;
  background-repeat: no-repeat;
  border: 3px solid var(--charcoal);
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 0.25s ease, z-index 0s;
  overflow: hidden;
  cursor: pointer;
  list-style: none;
}

.gallery-tile::after {
  content: "hey";
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  font-family: var(--font-hand);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--sticky-yellow);
  border: 2px solid var(--charcoal);
  padding: 0.1rem 0.35rem;
  opacity: 0;
  transform: scale(0.6) rotate(8deg);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.gallery-tile:hover,
.gallery-tile:focus-visible {
  transform: scale(1.06) rotate(var(--tilt, 0deg));
  z-index: 3;
  outline: none;
}

.gallery-tile:hover::after,
.gallery-tile:focus-visible::after {
  opacity: 1;
  transform: scale(1) rotate(-6deg);
}

.gallery-collage.is-react .gallery-tile:not(:hover):not(:focus-visible) {
  transform: scale(0.97);
  opacity: 0.85;
}

@media (min-width: 600px) {
  .gallery-collage {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
  }

  .gallery-tile {
    transform: rotate(var(--tilt, 0deg));
  }

  .gallery-tile:nth-child(3n) {
    width: 100%;
  }

  .gallery-tile:nth-child(5),
  .gallery-tile:nth-child(11) {
    transform: rotate(var(--tilt, 0deg)) scale(1.05);
  }
}

@media (min-width: 900px) {
  .gallery-collage {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem 0.75rem;
    padding: 1.5rem 1rem 2rem;
  }

  .gallery-tile:nth-child(1) { transform: rotate(-4deg) translateY(8px); }
  .gallery-tile:nth-child(2) { transform: rotate(3deg) translateY(-6px); }
  .gallery-tile:nth-child(3) { transform: rotate(-2deg) translateY(12px); }
  .gallery-tile:nth-child(4) { transform: rotate(5deg) translateY(-4px); }
  .gallery-tile:nth-child(6) { transform: rotate(-5deg) scale(1.08); z-index: 2; }
  .gallery-tile:nth-child(9) { transform: rotate(4deg) translateX(-6px); }
  .gallery-tile:nth-child(14) { transform: rotate(-3deg) scale(1.06); }
}

/* ---------- About ---------- */
.about {
  position: relative;
  padding: var(--space-section) var(--space-page) calc(var(--space-section) * 1.15);
  text-align: center;
  overflow: hidden;
}

.about__giant {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(6.5rem, 22vw, 16rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.8;
  color: var(--ginger);
  -webkit-text-stroke: clamp(4px, 0.4vw, 8px) var(--outline);
  paint-order: stroke fill;
  opacity: 0.92;
}

.about__copy {
  max-width: 32ch;
  margin: 1.75rem auto 0;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  font-weight: 600;
}

.about__copy p {
  margin: 0.35rem 0;
}

.about__echo {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.75rem) !important;
  font-weight: 900 !important;
  margin-top: 1rem !important;
}

.about__note {
  margin: 2rem auto 0;
  text-align: left;
  display: inline-block;
}

.about__note p {
  margin: 0.2rem 0;
}

.doodle {
  position: absolute;
  font-family: var(--font-hand);
  font-weight: 700;
  color: var(--brown);
  opacity: 0.55;
  animation: doodle-wiggle 5s ease-in-out infinite;
  pointer-events: none;
  font-size: clamp(1.1rem, 1.8vw, 1.8rem);
}

.doodle--1 { top: 12%; left: 8%; }
.doodle--2 { top: 18%; right: 10%; animation-delay: 0.8s; }
.doodle--3 { bottom: 18%; left: 12%; animation-delay: 1.4s; }
.doodle--4 { bottom: 22%; right: 14%; animation-delay: 0.4s; }

@keyframes doodle-wiggle {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}

/* ---------- Machine ---------- */
.machine-section {
  padding: var(--space-section) var(--space-page);
}

.machine {
  max-width: clamp(380px, 42vw, 560px);
  margin: 0 auto;
}

.machine__panel {
  background: linear-gradient(180deg, #d4c4b0, #b8a48c);
  border: 5px solid var(--charcoal);
  box-shadow:
    inset 0 0 0 4px #9a8870,
    8px 8px 0 rgba(0, 0, 0, 0.25);
  padding: clamp(1.25rem, 2vw, 1.85rem);
  border-radius: 8px 8px 4px 4px;
}

.machine__lights {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.machine__lights span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--charcoal);
  background: #666;
}

.machine.is-running .machine__lights span:nth-child(1) {
  background: #ff4444;
  animation: blink 0.3s steps(2) infinite;
}
.machine.is-running .machine__lights span:nth-child(2) {
  background: var(--sticky-yellow);
  animation: blink 0.25s steps(2) infinite 0.1s;
}
.machine.is-running .machine__lights span:nth-child(3) {
  background: var(--grass);
  animation: blink 0.35s steps(2) infinite 0.05s;
}

@keyframes blink {
  50% { opacity: 0.35; }
}

.machine__display {
  background: #1a2a1a;
  color: #7dff7d;
  font-family: var(--font-pixel);
  text-align: center;
  padding: clamp(0.9rem, 1.4vw, 1.2rem);
  border: 3px inset #555;
  margin-bottom: 0.85rem;
  letter-spacing: 0.08em;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  min-height: 3rem;
}

.machine__meter {
  height: 12px;
  background: #333;
  border: 2px solid var(--charcoal);
  margin-bottom: 1rem;
  overflow: hidden;
}

.machine__meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ginger), var(--sticky-yellow));
  transition: width 0.35s ease;
}

.machine__count {
  text-align: center;
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
}

.machine__slot {
  min-height: 70px;
  margin-top: 0.5rem;
  border: 3px dashed rgba(0, 0, 0, 0.25);
  border-top: none;
  background: rgba(0, 0, 0, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
}

.machine-sticker {
  font-family: var(--font-display);
  font-weight: 900;
  background: var(--white);
  border: 3px solid var(--charcoal);
  padding: 0.35rem 0.7rem;
  box-shadow: 2px 2px 0 var(--charcoal);
  animation: pop-in 0.35s ease;
  font-size: clamp(1rem, 1.4vw, 1.35rem);
}

@keyframes pop-in {
  from { transform: scale(0.4) translateY(-20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* ---------- Join / CA ---------- */
.join {
  padding: var(--space-section) var(--space-page);
  display: grid;
  gap: clamp(1.25rem, 2vw, 2rem);
  max-width: min(1100px, 94vw);
  margin: 0 auto;
}

.manual {
  background: var(--cream-dark);
  border: 4px solid var(--charcoal);
  box-shadow: 6px 6px 0 var(--charcoal);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  position: relative;
}

.manual::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 18px,
    rgba(0, 0, 0, 0.08) 18px 20px
  );
}

.manual__header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.03em;
}

.manual__meta {
  margin: 0.35rem 0 1rem;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  opacity: 0.65;
  text-transform: uppercase;
}

.manual__steps {
  list-style: none;
  padding: 0 0 0 0.5rem;
  margin: 0 0 1.25rem;
}

.manual__steps li {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: clamp(0.6rem, 1.2vh, 0.9rem) 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
  font-weight: 600;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
}

.manual__num {
  font-family: var(--font-pixel);
  font-weight: 700;
  color: var(--ginger-deep);
  flex-shrink: 0;
}

.manual__note {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  opacity: 0.7;
}

.ca-card {
  background: var(--white);
  border: 4px solid var(--charcoal);
  box-shadow: 6px 6px 0 var(--ginger);
  padding: clamp(1.25rem, 2vw, 2rem);
  text-align: center;
}

.ca-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.85rem);
}

.ca-card__badge {
  display: inline-block;
  margin: 0.5rem 0 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--sticky-cream);
  border: 2px solid var(--charcoal);
  padding: 0.2rem 0.55rem;
}

.ca-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.ca-value {
  font-family: var(--font-pixel);
  font-size: clamp(0.95rem, 3vw, 1.25rem);
  background: var(--cream);
  border: 2px dashed var(--charcoal);
  padding: 0.55rem 0.85rem;
  word-break: break-all;
}

.ca-feedback {
  margin: 0.65rem 0 0;
  font-weight: 900;
  color: var(--grass);
  letter-spacing: 0.08em;
}

@media (min-width: 700px) {
  .join {
    grid-template-columns: 1.3fr 1fr;
    align-items: start;
  }
}

/* ---------- Chart ---------- */
.chart-section {
  padding: var(--space-section) var(--space-page);
}

.chart-browser {
  max-width: var(--section-max);
  margin: 0 auto;
  border: 4px solid var(--charcoal);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
  background: var(--win-face);
  overflow: hidden;
}

.chart-browser__bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.45rem 0.65rem;
  background: linear-gradient(90deg, var(--win-blue), var(--win-blue-light));
  color: var(--white);
}

.chart-browser__dots {
  display: flex;
  gap: 4px;
}

.chart-browser__dots i {
  width: 12px;
  height: 12px;
  background: var(--win-face);
  border: 1px solid #404040;
  display: block;
}

.chart-browser__title {
  flex: 1;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 120px;
}

.chart-browser__frame {
  background: #0b0e11;
  aspect-ratio: 16 / 9;
  min-height: clamp(360px, 48vh, 620px);
}

.chart-browser__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- Hey wall ---------- */
.hey-wall {
  padding: var(--space-section) var(--space-page);
  text-align: center;
}

.wall-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.85rem, 1.5vw, 1.4rem) clamp(1rem, 2vw, 1.75rem);
  justify-content: center;
  align-items: center;
  max-width: var(--section-max);
  margin: 0 auto 2rem;
  padding: 1rem;
  min-height: clamp(220px, 28vh, 360px);
}

.wall-word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  transform: rotate(var(--r, 0deg));
  transition: transform 0.2s ease, color 0.2s ease;
  cursor: default;
  user-select: none;
  color: var(--charcoal);
}

.wall-word:hover,
.wall-word:focus-visible {
  transform: rotate(calc(var(--r, 0deg) * -1)) scale(1.15);
  color: var(--ginger);
}

.wall-word--outline {
  color: var(--white);
  -webkit-text-stroke: 3px var(--outline);
  paint-order: stroke fill;
}

.wall-word--orange {
  color: var(--ginger);
}

.wall-word--sticker {
  background: var(--sticky-yellow);
  border: 2px solid var(--charcoal);
  padding: 0.15rem 0.45rem;
  box-shadow: 2px 2px 0 var(--charcoal);
  font-size: clamp(1rem, 3vw, 1.5rem);
}

.wall-word--pixel {
  font-family: var(--font-pixel);
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  color: var(--win-blue);
  letter-spacing: 0.05em;
}

.wall-word--hand {
  font-family: var(--font-hand);
  color: var(--brown);
}

.wall-word.is-new {
  animation: pop-in 0.4s ease;
}

/* ---------- Community ---------- */
.community {
  padding: var(--space-section) var(--space-page) calc(var(--space-section) * 1.15);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.community h2 {
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  letter-spacing: -0.03em;
}

.community__giant {
  margin: 1.75rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 18vw, 14rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.85;
  color: var(--white);
  -webkit-text-stroke: clamp(4px, 0.4vw, 8px) var(--outline);
  paint-order: stroke fill;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.community__note {
  margin: 1rem auto 0;
  max-width: 36ch;
  font-size: 0.8rem;
  opacity: 0.65;
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--space-section) var(--space-page) calc(var(--space-section) + var(--safe-bottom));
  text-align: center;
  background:
    linear-gradient(180deg, transparent, rgba(232, 122, 42, 0.12)),
    var(--charcoal);
  color: var(--cream);
  border-top: 4px solid var(--ginger);
}

.footer__giant {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 14vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: var(--ginger);
  -webkit-text-stroke: 3px var(--cream);
  paint-order: stroke fill;
}

.footer__tagline {
  margin: 1.15rem 0 1.75rem;
  font-family: var(--font-hand);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.5;
  opacity: 0.9;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer__links a {
  color: var(--sticky-yellow);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__ca {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
}

.footer__ca code {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.7rem;
  border: 1px dashed rgba(255, 255, 255, 0.35);
}

.footer__sys {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  opacity: 0.55;
  margin: 0 0 1.5rem;
}

.footer__finale {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-cat {
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 50%;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.footer-cat:hover,
.footer-cat:focus-visible {
  transform: scale(1.08) rotate(-4deg);
}

.footer-cat img {
  width: clamp(160px, 14vw, 260px);
  height: clamp(160px, 14vw, 260px);
  object-fit: contain;
  border-radius: 50%;
  border: 4px solid var(--ginger);
  background: var(--white);
}

.footer__legal {
  margin: 2rem 0 0;
  font-size: 0.7rem;
  opacity: 0.45;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .float-hey,
  .float-a,
  .doodle,
  .hero__scroll-hint,
  .machine.is-running .machine__lights span {
    animation: none !important;
  }

  .hey-particle {
    animation-duration: 0.35s !important;
  }

  .gallery-tile,
  .wall-word,
  .hero-mascot,
  .community__giant {
    transition: none;
  }
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 899px) {
  .desk-win__bar {
    cursor: default;
  }

  .hero {
    padding-bottom: 2.5rem;
  }

  .hero__right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
  }

  .hero__right .notify-window {
    position: relative;
    max-width: 240px;
  }

  .hero__right .sticky,
  .hero__right .browser-deco {
    display: none;
  }
}
