:root {
  --next-orange: #ce5f26;
  --cream: #fff6e7;
  --ink: #2e241e;
  --footer-safe: 86px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.scene {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(18px, 3vw, 42px);
}

/* First page */
.hero {
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(90deg, rgba(255, 246, 231, 0.78) 0%, rgba(255, 246, 231, 0.48) 32%, rgba(206, 95, 38, 0.08) 74%),
    linear-gradient(180deg, rgba(255, 246, 231, 0.12), rgba(206, 95, 38, 0.32)),
    url("assets/street-food-background.jpg") center / cover no-repeat;
}

.topbar {
  position: absolute;
  top: clamp(4px, 0.8vw, 10px);
  left: 50%;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  width: calc(100% - clamp(36px, 6vw, 84px));
  max-width: 1180px;
  transform: translateX(-50%);
  pointer-events: none;
}

.topbar a {
  pointer-events: auto;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  padding: 9px 12px;
  border: 2px solid rgba(206, 95, 38, 0.55);
  border-radius: 999px;
  background: rgba(255, 246, 231, 0.9);
  color: var(--next-orange);
  backdrop-filter: blur(10px);
  font-size: 0.88rem;
  font-weight: 800;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(600px, 44vw);
  margin: 0 0 0 20px;
  color: var(--next-orange);
  text-shadow: 0 4px 18px rgba(255, 246, 231, 0.72);
}

h1 {
  max-width: 590px;
  margin: 0;
  font-size: clamp(3.2rem, 6.6vw, 7rem);
  font-weight: 950;
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
}

.promoter-wrap {
  position: absolute;
  left: 55vw;
  bottom: 0;
  z-index: 8;
  width: min(1040px, 74vw);
  height: 100vh;
  transform: translateX(-50%);
  pointer-events: none;
}

.promoter {
  position: absolute;
  left: 50%;
  bottom: -52px;
  width: min(820px, 66vw);
  transform: translateX(-50%) translateY(190px) scale(0.42);
  transform-origin: center bottom;
  animation: promoter-arrival 1.75s cubic-bezier(.17,.86,.24,1) 250ms forwards;
}

.promoter img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes promoter-arrival {
  to {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.speech-bubble {
  position: absolute;
  left: calc(50% + min(430px, 32vw));
  top: 86px;
  width: min(410px, 34vw);
  padding: 22px;
  border: 4px solid var(--cream);
  border-radius: 8px;
  background: var(--next-orange);
  color: var(--cream);
  box-shadow: 12px 12px 0 rgba(255, 246, 231, 0.28);
  opacity: 0;
  transform: translateX(-50%) translateY(18px) scale(0.98);
  transition: opacity 420ms ease, transform 420ms cubic-bezier(.2,.9,.2,1);
  pointer-events: auto;
}

.speech-bubble.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: -15px;
  bottom: 72px;
  width: 38px;
  height: 38px;
  border-right: 4px solid var(--cream);
  border-bottom: 4px solid var(--cream);
  background: var(--next-orange);
  transform: rotate(135deg);
}

.speech-bubble p {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  font-size: clamp(0.96rem, 1.4vw, 1.08rem);
  line-height: 1.52;
  font-weight: 650;
}

.sample-highlight {
  color: #fff;
  font-size: 1.2em;
  font-weight: 950;
  line-height: 1;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

.primary-action {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 3px solid var(--cream);
  border-radius: 8px;
  background: var(--cream);
  color: var(--next-orange);
  box-shadow: 0 5px 0 rgba(255, 246, 231, 0.24);
  cursor: pointer;
  font-weight: 900;
}

.primary-action:hover {
  transform: translateY(-2px);
}

/* Second page */
.truck-scene {
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  padding: 0 clamp(18px, 3vw, 42px);
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.82), transparent 34rem),
    linear-gradient(180deg, #fff6e7 0%, #ffd8a0 58%, var(--next-orange) 100%);
  scroll-margin-top: 0;
}

.image-yard {
  position: relative;
  isolation: isolate;
  width: min(1280px, 100%);
  height: 100vh;
  min-height: 700px;
  margin: 0 auto;
}

.experience-item {
  position: absolute;
  z-index: 3;
  cursor: pointer;
  transform-origin: center;
}

.experience-item:focus {
  outline: 4px solid rgba(206, 95, 38, 0.42);
  outline-offset: 6px;
}

.experience-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform-origin: center;
  transition: transform 260ms cubic-bezier(.2,.9,.2,1), filter 260ms ease;
}

.experience-item:hover,
.experience-item:focus {
  z-index: 20;
}

.image-yard:has(.experience-item:hover) .experience-item:not(:hover) .experience-image,
.image-yard:has(.experience-item:focus) .experience-item:not(:focus) .experience-image,
.image-yard:has(.experience-item:hover) .cow-car-item .experience-image,
.image-yard:has(.experience-item:focus) .cow-car-item .experience-image {
  filter: grayscale(1) saturate(0.1) opacity(0.58);
}

.experience-item:hover .experience-image,
.experience-item:focus .experience-image {
  transform: scale(1.2);
  filter: saturate(1.08);
}

.cow-car-item {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: var(--footer-safe);
  z-index: 1;
  width: min(1180px, 112vw);
  transform: translateX(-50%);
  pointer-events: none;
}

.chef-item {
  left: 50%;
  top: auto;
  bottom: calc(var(--footer-safe) + 330px);
  z-index: 8;
  width: min(235px, 19.5vw);
  transform: translateX(-2%);
}

.machine-item {
  left: -200px;
  top: 50px;
  bottom: auto;
  z-index: 12;
  width: min(345px, 24vw);
}

.wheel-item {
  left: -200px;
  bottom: calc(var(--footer-safe) - 2px);
  z-index: 12;
  width: min(450px, 34.5vw);
}

.photo-item {
  right: -200px;
  top: 30px;
  bottom: auto;
  z-index: 12;
  width: min(465px, 24vw);
}

.voucher-item {
  right: -150px;
  bottom: calc(var(--footer-safe) - 2px);
  z-index: 12;
  width: min(248px, 18vw);
}

.module-card {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 16px);
  width: min(390px, 34vw);
  padding: 16px;
  border: 4px solid var(--next-orange);
  border-radius: 8px;
  background: rgba(255, 246, 231, 0.98);
  color: var(--ink);
  box-shadow: 10px 10px 0 rgba(206, 95, 38, 0.22);
  font-weight: 650;
  line-height: 1.42;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px) scale(0.96);
  transition: opacity 220ms ease, transform 220ms cubic-bezier(.2,.9,.2,1);
}

.module-card h3 {
  margin: 0 0 8px;
  color: var(--next-orange);
  font-size: 1.08rem;
  line-height: 1.05;
}

.module-card p {
  margin: 0 0 13px;
  font-size: 0.9rem;
  line-height: 1.42;
}

.module-card p:last-child {
  margin-bottom: 0;
}

.experience-item:hover .module-card,
.experience-item:focus .module-card {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.machine-item .module-card,
.wheel-item .module-card {
  left: 100%;
  top: 24px;
  bottom: auto;
  transform: translateX(14px) translateY(10px) scale(0.96);
}

.machine-item:hover .module-card,
.machine-item:focus .module-card,
.wheel-item:hover .module-card,
.wheel-item:focus .module-card {
  transform: translateX(14px) translateY(0) scale(1);
}

.photo-item .module-card,
.voucher-item .module-card {
  left: auto;
  right: 84%;
  top: 18px;
  bottom: auto;
  transform: translateX(0) translateY(10px) scale(0.96);
}

.voucher-item .module-card {
  right: 96%;
  top: -18px;
  width: min(360px, 32vw);
}

.photo-item:hover .module-card,
.photo-item:focus .module-card,
.voucher-item:hover .module-card,
.voucher-item:focus .module-card {
  transform: translateX(0) translateY(0) scale(1);
}

@media (max-width: 980px) {
  .truck-scene {
    min-height: 100vh;
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero-copy {
    align-self: start;
    width: min(440px, 44vw);
    margin-top: 110px;
  }

  .promoter-wrap {
    left: 58vw;
    width: min(900px, 82vw);
  }

  .speech-bubble {
    left: calc(50% + min(360px, 34vw));
  }

  .image-yard {
    height: 100vh;
    min-height: 700px;
    margin-top: 0;
  }

  .cow-car-item {
    top: auto;
    bottom: var(--footer-safe);
    width: min(1120px, 128vw);
    transform: translateX(-50%);
  }

  .chef-item {
    top: auto;
    bottom: calc(var(--footer-safe) + 305px);
    width: min(185px, 22vw);
  }

  .machine-item {
    left: -22px;
    top: 72px;
    bottom: auto;
    width: min(292px, 28.5vw);
  }

  .wheel-item {
    left: -24px;
    top: auto;
    bottom: calc(var(--footer-safe) - 2px);
    width: min(428px, 40.5vw);
  }

  .photo-item {
    right: -24px;
    top: 72px;
    bottom: auto;
    width: min(345px, 33vw);
  }

  .voucher-item {
    right: -18px;
    bottom: calc(var(--footer-safe) - 2px);
    width: min(203px, 19.5vw);
  }

  .module-card {
    width: min(330px, 42vw);
  }

  .voucher-item .module-card {
    right: 104%;
    top: -8px;
    width: min(300px, 38vw);
  }
}

@media (max-width: 680px) {
  :root {
    --footer-safe: 70px;
  }

  .truck-scene {
    min-height: 100vh;
    padding-top: 0;
    padding-bottom: 0;
  }

  .scene {
    padding: 18px;
  }

  .truck-scene {
    padding: 0 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    width: calc(100% - 28px);
  }

  nav {
    justify-content: flex-start;
  }

  nav a {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .hero-copy {
    width: min(92vw, 520px);
    margin-top: 78px;
    margin-left: 20px;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 4.2rem);
  }

  .promoter-wrap {
    left: 50%;
    width: min(560px, 100vw);
  }

  .promoter {
    width: min(640px, 118vw);
    transform: translateX(-50%) translateY(190px) scale(0.38);
  }

  @keyframes promoter-arrival {
    to {
      transform: translateX(-50%) translateY(0) scale(0.86);
    }
  }

  .speech-bubble {
    left: 50%;
    top: 4px;
    width: min(360px, 88vw);
    padding: 15px;
  }

  .speech-bubble::after {
    left: 50%;
    bottom: -17px;
    transform: translateX(-50%) rotate(45deg);
  }

  .speech-bubble p {
    font-size: 0.9rem;
  }

  .image-yard {
    height: 100vh;
    min-height: 680px;
    margin-top: 0;
  }

  .cow-car-item {
    top: auto;
    bottom: var(--footer-safe);
    width: 142vw;
    transform: translateX(-50%);
  }

  .chef-item {
    left: 55%;
    top: auto;
    bottom: calc(var(--footer-safe) + 310px);
    width: 34vw;
  }

  .machine-item {
    left: -18px;
    top: 72px;
    bottom: auto;
    width: 40.5vw;
  }

  .wheel-item {
    left: -20px;
    top: auto;
    bottom: calc(var(--footer-safe) - 2px);
    width: 48vw;
  }

  .photo-item {
    right: -20px;
    top: 72px;
    bottom: auto;
    width: 46.5vw;
  }

  .voucher-item {
    right: -16px;
    bottom: calc(var(--footer-safe) - 2px);
  }

  .module-card,
  .machine-item .module-card,
  .wheel-item .module-card,
  .photo-item .module-card,
  .voucher-item .module-card {
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(100% + 12px);
    width: min(320px, 86vw);
    transform: translateX(-50%) translateY(10px) scale(0.96);
  }

  .experience-item:hover .module-card,
  .experience-item:focus .module-card {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  .voucher-item .module-card {
    left: auto;
    right: 84%;
    bottom: calc(100% + 10px);
    width: min(290px, 78vw);
    transform: translateX(0) translateY(10px) scale(0.96);
  }

  .voucher-item:hover .module-card,
  .voucher-item:focus .module-card {
    transform: translateX(0) translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .speech-bubble {
    opacity: 1;
    transform: translateX(-50%);
  }
}

.scroll-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  overflow: hidden;
  border-top: 4px solid var(--cream);
  border-bottom: 4px solid var(--cream);
  background: var(--next-orange);
  color: var(--cream);
  white-space: nowrap;
}

.scroll-track {
  display: inline-flex;
  gap: 48px;
  min-width: max-content;
  padding: 18px 0;
  animation: footer-scroll 24s linear infinite;
}

.scroll-track span {
  font-size: clamp(1.4rem, 3vw, 3rem);
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

@keyframes footer-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}
