* {
  box-sizing: border-box;
}

:root {
  --bg: #050506;
  --text: #ffffff;
  --purple: #9d37ff;
  --purple-light: #c56cff;
  --header-height: 58px;
}

html,
body {
  margin: 0;
  width: 100%;
  min-width: 280px;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  overflow: hidden;
}

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

.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding:
    max(8px, env(safe-area-inset-top))
    14px
    0;
  background: linear-gradient(
    to bottom,
    rgba(3, 3, 5, 0.92),
    rgba(3, 3, 5, 0.45),
    transparent
  );
}

.brand {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.20em;
}

.menu-button {
  position: relative;
  z-index: 60;
  width: 42px;
  height: 42px;
  padding: 7px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 25px;
  height: 2px;
  margin: 7px auto;
  background: #ffffff;
  transition: transform 0.2s ease;
}

.menu-button.open span:first-child {
  transform: translateY(4.5px) rotate(45deg);
}

.menu-button.open span:last-child {
  transform: translateY(-4.5px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding:
    calc(var(--header-height) + env(safe-area-inset-top))
    20px
    max(30px, env(safe-area-inset-bottom));
  background: rgba(3, 3, 5, 0.985);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: clamp(28px, 8.5vw, 46px);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  background: #050506;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-image: url("assets/hero-mobile.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.03) 0%,
    rgba(0,0,0,0.02) 55%,
    rgba(0,0,0,0.18) 72%,
    rgba(0,0,0,0.72) 100%
  );
}

.actions {
  position: absolute;
  z-index: 10;
  left: 16px;
  right: 16px;
  bottom: max(105px, calc(env(safe-area-inset-bottom) + 92px));
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.action {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 18px;
  border: 1px solid rgba(181, 79, 255, 0.75);
  background: rgba(3, 3, 5, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.action-primary {
  background: linear-gradient(
    90deg,
    rgba(99, 20, 151, 0.90),
    rgba(143, 39, 211, 0.78)
  );
}

.action b {
  color: var(--purple-light);
  font-size: 22px;
  font-weight: 400;
}

@media (min-width: 700px) {
  .hero {
    max-width: 540px;
    margin: 0 auto;
  }

  body {
    background: #000;
  }
}

@media (max-width: 370px) {
  .brand {
    font-size: 8px;
  }

  .actions {
    left: 12px;
    right: 12px;
    bottom: max(92px, calc(env(safe-area-inset-bottom) + 80px));
  }

  .action {
    min-height: 50px;
    font-size: 9px;
    padding: 0 15px;
  }
}


/* Extra fallback: real image element behind everything */
.hero-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-image {
  z-index: 1;
}

.hero-shade {
  z-index: 2;
}

.actions {
  z-index: 10;
}


/* =========================================================
   DESKTOP VERSION
   Mobile rules above are kept intact.
   ========================================================= */

.desktop-nav {
  display: none;
}

@media (min-width: 761px) {
  :root {
    --header-height: 72px;
  }

  body {
    overflow: hidden;
    background: #050506;
  }

  .topbar {
    height: var(--header-height);
    justify-content: center;
    padding: 0 74px;
    background: rgba(3,3,5,.93);
    border-bottom: 1px solid rgba(168,62,231,.42);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(32px, 5vw, 78px);
    white-space: nowrap;
  }

  .desktop-nav a {
    position: relative;
    padding: 28px 0 24px;
    color: #f5f2f7;
    font-size: clamp(10px, .72vw, 12px);
    font-weight: 700;
    letter-spacing: .19em;
    text-transform: uppercase;
  }

  .desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 18px;
    height: 1px;
    background: #bd63ff;
    transition: right .18s ease;
  }

  .desktop-nav a:hover::after {
    right: 0;
  }

  .menu-button {
    position: absolute;
    right: 32px;
    top: 14px;
  }

  .mobile-menu {
    display: none !important;
  }

  .hero {
    width: 100vw;
    max-width: none;
    height: 100vh;
    min-height: 620px;
    margin: 0;
  }

  .hero-fallback {
    display: none;
  }

  .hero-image {
    z-index: 0;
    background-image: url("assets/hero-desktop.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }

  /*
    The generated desktop artwork already contains a mock top menu and CTA area.
    The real header above covers the mock menu, and this lower mask softens the
    baked-in buttons before our functional CTAs are drawn over them.
  */
  .hero::after {
    content: "";
    position: absolute;
    z-index: 4;
    left: 4.5vw;
    bottom: clamp(76px, 10vh, 112px);
    width: min(620px, 46vw);
    height: 94px;
    background:
      linear-gradient(
        90deg,
        rgba(4,4,6,.78),
        rgba(4,4,6,.66)
      );
    filter: blur(0);
    border-radius: 2px;
    pointer-events: none;
  }

  .hero-shade {
    z-index: 2;
    background:
      linear-gradient(to bottom, rgba(0,0,0,.10), transparent 24%, transparent 72%, rgba(0,0,0,.35)),
      linear-gradient(to right, rgba(0,0,0,.05), transparent 18%, transparent 84%, rgba(0,0,0,.10));
  }

  .actions {
    z-index: 10;
    left: 5.8vw;
    right: auto;
    bottom: clamp(88px, 11.5vh, 128px);
    width: min(585px, 43vw);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .action {
    min-height: 64px;
    padding: 0 22px;
    font-size: clamp(10px, .72vw, 12px);
    background: rgba(3,3,5,.84);
    border-color: rgba(181,79,255,.76);
  }

  .action-primary {
    background: linear-gradient(
      90deg,
      rgba(95,20,145,.94),
      rgba(145,39,211,.84)
    );
  }
}

/* Laptop/smaller desktop */
@media (min-width: 761px) and (max-width: 1150px) {
  .topbar {
    padding-inline: 52px;
  }

  .desktop-nav {
    gap: 30px;
  }

  .actions {
    left: 4vw;
    width: min(540px, 51vw);
  }

  .hero::after {
    left: 3vw;
    width: min(570px, 54vw);
  }
}

/* Short desktop windows */
@media (min-width: 761px) and (max-height: 720px) {
  .actions {
    bottom: 34px;
  }

  .hero::after {
    bottom: 23px;
  }
}


/* =========================================================
   V4 - DESKTOP IMAGE ALWAYS FULLY VISIBLE
   ========================================================= */
@media (min-width: 761px) {
  .hero {
    width: 100vw;
    height: calc(100dvh - var(--header-height));
    min-height: 0;
    margin-top: var(--header-height);
    background: #050506;
  }

  .hero-image {
    inset: 0;
    background-image: url("assets/hero-desktop.png");
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #050506;
  }

  .hero-fallback {
    display: none;
  }

  .hero-shade {
    background: none;
  }
}

/* On very wide or very tall windows, keep black letterbox space rather than crop. */
@media (min-width: 761px) and (min-aspect-ratio: 16/9) {
  .hero-image {
    background-size: contain;
    background-position: center center;
  }
}

@media (min-width: 761px) and (max-aspect-ratio: 16/10) {
  .hero-image {
    background-size: contain;
    background-position: center center;
  }
}


/* =========================================================
   V5 - MENU BREAKPOINT FIX
   Mobile: hamburger only
   Desktop: desktop nav only
   ========================================================= */

/* Default/mobile */
.desktop-nav {
  display: none !important;
}

.menu-button {
  display: block !important;
}

/* Desktop */
@media (min-width: 761px) {
  .desktop-nav {
    display: flex !important;
  }

  .menu-button {
    display: none !important;
  }

  .mobile-menu {
    display: none !important;
  }
}

/* Mobile */
@media (max-width: 760px) {
  .desktop-nav {
    display: none !important;
  }

  .menu-button {
    display: block !important;
  }
}
