@font-face {
  font-family: "Berkshire Swash";
  src: url("../assets/fonts/BerkshireSwash-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --gold-bright: #f6e2a0;
  --gold: #e4c15a;
  --gold-deep: #b8862a;
  --gold-shadow: rgba(92, 52, 8, 0.55);
  --ink: #140c04;
  --mist: rgba(255, 236, 196, 0.78);
  --veil-start: rgba(212, 160, 48, 0.5);
  --veil-mid: rgba(168, 108, 24, 0.22);
  --input-fill: rgba(18, 10, 4, 0.52);
  --font-display: "Berkshire Swash", "Palatino Linotype", Palatino, serif;
  --font-body: "Palatino Linotype", Palatino, "Iowan Old Style", "Times New Roman", serif;
  --cta-width: min(26rem, calc(100vw - 2rem));
  --control-h: 2.7rem;
}

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

html,
body {
  margin: 0;
  height: 100%;
  background: #0b0703;
  color: var(--gold-bright);
  font-family: var(--font-body);
  overflow: hidden;
}

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

.stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.hero-fallback,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  pointer-events: none;
  user-select: none;
}

.hero-fallback {
  z-index: 0;
  background-color: #0b0703;
  background-image: url("../assets/images/hero_horizontal.jpg");
  background-position: top left;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (max-width: 767px) {
  .hero-fallback {
    background-image: url("../assets/images/hero_vertical.jpg");
  }
}

.hero-video {
  z-index: 1;
  object-fit: cover;
  object-position: top left;
  opacity: 0;
  transition: opacity 700ms ease;
}

.hero-video.is-ready {
  opacity: 1;
}

.gold-veil {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  width: 50%;
  height: min(42dvh, 28rem);
  pointer-events: none;
  background:
    radial-gradient(
      120% 140% at 100% 100%,
      rgba(228, 178, 64, 0.38) 0%,
      transparent 64%
    ),
    linear-gradient(
      to left,
      var(--veil-start) 0%,
      var(--veil-mid) 46%,
      transparent 100%
    );
  -webkit-mask-image: linear-gradient(
    to top,
    #000 0%,
    rgba(0, 0, 0, 0.46) 54%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to top,
    #000 0%,
    rgba(0, 0, 0, 0.46) 54%,
    transparent 100%
  );
}

.audio-toggle {
  position: absolute;
  z-index: 4;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  width: 2.85rem;
  height: 2.85rem;
  touch-action: manipulation;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(228, 193, 90, 0.45);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 236, 180, 0.18), transparent 46%),
    rgba(18, 10, 4, 0.55);
  color: var(--gold-bright);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 8px 22px rgba(0, 0, 0, 0.28);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.audio-toggle:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.audio-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.audio-toggle.is-awaiting {
  animation: pulse-gold 2.4s ease-in-out infinite;
}

.audio-icon {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
  display: none;
}

.audio-toggle.is-muted .audio-icon-off,
.audio-toggle:not(.is-muted) .audio-icon-on {
  display: block;
}

@keyframes pulse-gold {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 8px 22px rgba(0, 0, 0, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(228, 193, 90, 0.55),
      0 0 18px rgba(228, 193, 90, 0.35);
  }
}

.cta {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  width: min(50%, 34rem);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  padding: 1.1rem max(1.4rem, env(safe-area-inset-right)) max(1.1rem, env(safe-area-inset-bottom));
}

.cta-title {
  margin: 0;
  padding: 0.1em 0.08em 0.22em;
  overflow: visible;
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 4.6vw, 4rem);
  font-weight: 400;
  line-height: 1.28;
  text-align: right;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.65)) drop-shadow(0 6px 16px var(--gold-shadow));
}

.cta-title span {
  background: linear-gradient(180deg, #fff8d8 12%, #f3d06a 58%, #e4b84a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.notify-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: var(--cta-width);
  max-width: 100%;
  margin-left: auto;
}

.notify-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.notify-form input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: var(--control-h);
  padding: 0.4rem 0.95rem 0.45rem;
  border: 1px solid rgba(228, 193, 90, 0.42);
  border-radius: 999px;
  background: var(--input-fill);
  color: var(--gold-bright);
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 236, 196, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.notify-form input[type="email"]::placeholder {
  color: rgba(246, 226, 160, 0.55);
  text-transform: none;
}

.notify-form input[type="email"]:hover {
  border-color: rgba(228, 193, 90, 0.7);
}

.notify-form input[type="email"]:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(228, 193, 90, 0.22);
}

.notify-form input[type="email"][aria-invalid="true"] {
  border-color: #e3a06a;
}

.form-status {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-align: right;
  color: var(--mist);
}

.form-status.is-error {
  color: #f0c4a0;
}

.form-status.is-success {
  color: var(--gold-bright);
}

.notify-btn {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  height: var(--control-h);
  width: 11.4rem;
  padding: 0 1.15rem 0.08rem;
  border: 0;
  background-color: transparent;
  background-image: url("../assets/images/button_default.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  font-family: var(--font-display);
  font-size: clamp(0.98rem, 1.35vw, 1.18rem);
  line-height: 1;
  white-space: nowrap;
  color: var(--gold-bright);
  text-shadow: 0 1px 0 rgba(80, 42, 4, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.notify-btn span {
  transform: translateY(-4%);
  white-space: nowrap;
}

@media (hover: hover) {
  .notify-btn:hover {
    background-image: url("../assets/images/button_hover.png");
    color: #fff3c2;
  }
}

.notify-btn:active,
.notify-btn.is-pressed {
  background-image: url("../assets/images/button_pressed.png");
  color: #d7b056;
}

.notify-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.notify-btn:disabled {
  cursor: wait;
  filter: saturate(0.85) brightness(0.92);
}

body::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  background-image:
    url("../assets/images/button_hover.png"),
    url("../assets/images/button_pressed.png");
}

.copyright {
  margin: 0.7rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-align: right;
  color: #1c1208;
}

@media (max-width: 767px) {
  :root {
    --control-h: 2.55rem;
    --cta-width: 100%;
  }

  .gold-veil {
    width: 100%;
    height: min(42dvh, 22rem);
    background:
      radial-gradient(
        130% 120% at 100% 100%,
        rgba(228, 178, 64, 0.5) 0%,
        transparent 72%
      ),
      linear-gradient(
        to left,
        rgba(212, 160, 48, 0.58) 0%,
        rgba(168, 108, 24, 0.28) 58%,
        transparent 92%
      );
  }

  .cta {
    width: min(22rem, 92%);
    gap: 0.2rem;
    padding: 0.7rem max(0.9rem, env(safe-area-inset-right)) max(0.85rem, env(safe-area-inset-bottom))
      0.5rem;
  }

  .cta-title {
    font-size: clamp(1.7rem, 7.6vw, 2.25rem);
    padding-bottom: 0.22em;
  }

  .notify-btn {
    width: 9.8rem;
    font-size: 0.95rem;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .gold-veil {
    height: min(70dvh, 100%);
    width: 78%;
  }

  .cta {
    gap: 0.25rem;
    padding-block: 0.5rem;
  }

  .cta-title {
    font-size: clamp(1.45rem, 5vh, 2.1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video,
  .audio-toggle,
  .notify-btn,
  .notify-form input {
    transition: none;
  }

  .audio-toggle.is-awaiting {
    animation: none;
  }
}
