@font-face {
  font-family: 'Gotham';
  src: url('/pg/fonts/Gotham-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gotham';
  src: url('/pg/fonts/Gotham-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gotham';
  src: url('/pg/fonts/Gotham-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --artboard-width: min(100vw, 56.25vh);
}

@supports (height: 100lvh) {
  :root {
    --artboard-width: min(100vw, 56.25lvh);
  }
}

body.is-welcome {
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #1a1008;
  color: #fff8df;
  font-family: 'Gotham', system-ui, sans-serif;
}

@supports (min-height: 100dvh) {
  body.is-welcome {
    min-height: 100dvh;
  }
}

body.is-welcome #app {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
}

@supports (min-height: 100dvh) {
  body.is-welcome #app {
    min-height: 100dvh;
  }
}

.landing-welcome[hidden] {
  display: none !important;
}

.landing-welcome {
  position: fixed;
  inset: 0;
  z-index: 10;
  min-height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #1a1008;
  box-shadow: none;
}

@supports (min-height: 100dvh) {
  .landing-welcome {
    min-height: 100dvh;
  }
}

.landing-bg {
  /* BGFixed.jpg is a 1:2 portrait canvas (1920x3840). The stage covers the
     viewport (width >= 100vw, height = 2*width >= 100vh) anchored center-bottom,
     so the bottom composition stays put while the extra sky fills upward.
     This avoids the empty top on tall/narrow screens (e.g. Z Fold) while only
     trimming a little from the sides instead of cropping the artwork. */
  --stage-size: max(125vw, 65vh);
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #2a180c;
}

@supports (height: 100lvh) {
  .landing-bg {
    --stage-size: max(125vw, 65lvh);
  }
}

.landing-stage {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--stage-size);
  height: calc(var(--stage-size) * 2);
  transform: translateX(-50%);
  transform-origin: center bottom;
  pointer-events: none;
}

.landing-bg-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  user-select: none;
  pointer-events: none;
}

.landing-scene-layer {
  position: absolute;
  display: block;
  object-fit: fill;
  transform: translateX(-50%);
  transform-origin: center bottom;
  user-select: none;
  pointer-events: none;
}

/* bottom/height are halved vs the old 1920 square because the canvas height
   doubled (1920 -> 3840). left/width stay the same so the group keeps the exact
   same physical size and alignment with the baked background. */
.landing-scene-cov {
  z-index: 2;
  left: 41.71875%;
  bottom: 14.42708%;
  width: 37.29167%;
  height: 11.48438%;
}

.landing-scene-bean {
  z-index: 1;
  left: 43.69792%;
  bottom: 2.68229%;
  width: 49.27083%;
  height: 18.90625%;
}

.landing-scene-product {
  z-index: 3;
  left: 59.29688%;
  bottom: 0;
  width: 30.15625%;
  height: 27.68229%;
}

.landing-welcome.is-entering .landing-scene-bean,
.landing-welcome.is-entering .landing-scene-cov,
.landing-welcome.is-entering .landing-scene-product {
  opacity: 0;
  transition:
    opacity 420ms ease,
    transform 520ms cubic-bezier(0.2, 0.82, 0.22, 1);
}

.landing-welcome.is-entering .landing-scene-bean {
  transform: translateX(-50%) scale(0.82);
  transform-origin: center center;
}

.landing-welcome.is-entering .landing-scene-cov {
  transform: translateX(-50%) translateY(-32px);
}

.landing-welcome.is-entering .landing-scene-product {
  transform: translateX(-50%) translateY(34px);
}

.landing-welcome.is-entering.is-ready .landing-scene-bean,
.landing-welcome.is-entering.is-ready .landing-scene-cov,
.landing-welcome.is-entering.is-ready .landing-scene-product {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.landing-welcome.is-entering.is-ready .landing-scene-bean {
  transition-delay: 120ms;
}

.landing-welcome.is-entering.is-ready .landing-scene-cov {
  transition-delay: 520ms;
}

.landing-welcome.is-entering.is-ready .landing-scene-product {
  transition-delay: 920ms;
}

.landing-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: min(100%, 480px);
  margin: 0 auto;
  padding:
    calc(clamp(10px, 2.6vw, 16px) + env(safe-area-inset-top))
    calc(clamp(16px, 4vw, 24px) + env(safe-area-inset-right))
    calc(clamp(24px, 6vw, 40px) + env(safe-area-inset-bottom))
    calc(clamp(16px, 4vw, 24px) + env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  align-items: center;
}

@supports (min-height: 100dvh) {
  .landing-shell {
    min-height: 100dvh;
  }
}

.landing-logo {
  width: min(calc(var(--artboard-width) * 0.62), 320px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.32));
  margin-top: clamp(6px, 1.7vh, 18px);
}

.landing-copy {
  width: 100%;
  margin-top: clamp(18px, 4.6vh, 34px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 3.4vh, 26px);
}

.landing-headline {
  margin: 0;
  width: 100%;
  text-align: center;
  font-family: 'Gotham', system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(1.4rem, calc(var(--artboard-width) * 0.073), 2.2rem);
  line-height: 1.22;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.landing-headline-line {
  --headline-outline: linear-gradient(
    90deg,
    #6a2b10 0%,
    #9f4b15 18%,
    #df8f25 42%,
    #fff0a5 62%,
    #c86d16 80%,
    #633013 100%
  );
  position: relative;
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0.12em auto;
  padding: 0;
  line-height: 1.12;
  text-align: center;
}

.landing-headline-line::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: 0;
  color: transparent;
  -webkit-text-stroke: clamp(2.5px, 0.075em, 4px) transparent;
  paint-order: stroke fill;
  background: var(--headline-outline);
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
}

.landing-headline-line span {
  position: relative;
  z-index: 1;
  display: inline-block;
  color: #fffdf7;
  -webkit-text-stroke: 0.018em rgba(92, 42, 12, 0.34);
  paint-order: stroke fill;
}

.landing-welcome.is-entering .landing-headline-line {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 460ms ease,
    transform 560ms cubic-bezier(0.2, 0.82, 0.22, 1);
}

.landing-welcome.is-entering.is-ready .landing-headline-line {
  opacity: 1;
  transform: translateY(0);
}

.landing-welcome.is-entering.is-ready .landing-headline-line:nth-child(1) {
  transition-delay: 300ms;
}

.landing-welcome.is-entering.is-ready .landing-headline-line:nth-child(2) {
  transition-delay: 520ms;
}

.landing-cta {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: stretch;
  justify-content: center;
  min-width: min(calc(var(--artboard-width) * 0.54), 248px);
  min-height: clamp(42px, calc(var(--artboard-width) * 0.104), 48px);
  padding: 0;
  border: 2px solid #fff;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(90deg, #b97722 0%, #f2d06f 48%, #b46d1e 100%);
  color: #1a1208;
  font-family: 'Gotham', system-ui, sans-serif;
  font-size: clamp(1.05rem, calc(var(--artboard-width) * 0.043), 2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.landing-welcome.is-entering .landing-cta {
  opacity: 0;
  transform: translateX(18px);
  transition:
    opacity 360ms ease,
    transform 360ms ease,
    filter 160ms ease;
  pointer-events: none;
}

.landing-welcome.is-entering.is-ready .landing-cta {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 1320ms;
  pointer-events: auto;
}

.landing-welcome.is-pulsing .landing-cta {
  animation: landing-cta-pulse 1.25s ease-in-out infinite;
}

@keyframes landing-cta-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.045);
  }
}

.landing-cta-surface {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(clamp(42px, calc(var(--artboard-width) * 0.104), 48px) - 4px);
  padding: 5px 14px 3px;
  border-radius: 8px;
  line-height: 1;
  overflow: hidden;
}

.landing-cta-surface::before {
  content: "";
  position: absolute;
  inset: -8px -12px;
  z-index: -1;
  border-radius: inherit;
  background: url('/pg/assets/buttonTexture.png') center / 108% 126% no-repeat;
}

.landing-cta:active {
  transform: scale(0.98) translateY(1px);
  filter: brightness(0.96);
}

.landing-cta:focus-visible {
  outline: 2px solid #fff8df;
  outline-offset: 3px;
}

@media (min-width: 768px) {
  :root {
    --artboard-width: min(520px, 56.25vh);
  }

  @supports (height: 100lvh) {
    :root {
      --artboard-width: min(520px, 56.25lvh);
    }
  }

  .landing-shell {
    width: min(100%, 520px);
  }

  .landing-logo {
    width: min(calc(var(--artboard-width) * 0.54), 300px);
  }
}

@media (max-height: 700px) {
  .landing-logo {
    width: min(calc(var(--artboard-width) * 0.56), 292px);
    margin-top: clamp(4px, 1.2vh, 10px);
  }

  .landing-copy {
    margin-top: clamp(14px, 3.5vh, 24px);
    gap: clamp(14px, 2.8vh, 22px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-cta {
    transition: none;
  }

  .landing-welcome.is-entering .landing-headline-line,
  .landing-welcome.is-entering.is-ready .landing-headline-line {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
