:root {
  --ink: #1d1812;
  --ink-deep: #120e0a;
  --brown: #523520;
  --stone: #69614c;
  --clay: #b35823;
  --sand: #c3b69d;
  --sage: #798579;
  --cream: #e9e3d4;
  --brand: #cb9045;
  --gold: #cb9045;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-edge: rgba(255, 255, 255, 0.22);
  --text: #f4efe6;
  --muted: rgba(244, 239, 230, 0.62);
  --font: "Vazirmatn", Tahoma, sans-serif;
  --icon: "Phosphor", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2rem;
}

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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  font-family: var(--font);
  color: var(--text);
  background: var(--ink-deep);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  padding:
    env(safe-area-inset-top, 0)
    env(safe-area-inset-right, 0)
    env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
}

body.sheet-open {
  overflow: hidden;
}

.app-chrome {
  display: none;
}

.world {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(80% 60% at 50% 110%, rgba(203, 144, 69, 0.35), transparent 55%),
    radial-gradient(50% 40% at 15% 20%, rgba(179, 88, 35, 0.25), transparent 60%),
    radial-gradient(40% 35% at 85% 30%, rgba(82, 53, 32, 0.55), transparent 70%),
    linear-gradient(180deg, #2a2018 0%, var(--ink) 45%, #0c0907 100%);
}

#bokeh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.glow--amber {
  width: 42vw;
  height: 42vw;
  left: 8%;
  bottom: -8%;
  background: rgba(203, 144, 69, 0.45);
}

.glow--blue {
  width: 28vw;
  height: 28vw;
  right: 10%;
  top: 12%;
  background: rgba(90, 140, 180, 0.22);
}

.glow--floor {
  width: 70vw;
  height: 28vw;
  left: 15%;
  bottom: -12%;
  background: rgba(227, 180, 110, 0.28);
  filter: blur(80px);
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(0.85rem, 2.2vw, 1.6rem);
}

/*
  Radius + overflow on the frame; blur on an inner layer.
  Same-element backdrop-filter + border-radius often renders square corners.
*/
.glass-frame {
  position: relative;
  width: min(1180px, 100%);
  min-height: min(720px, calc(100dvh - 1.8rem));
  border-radius: var(--radius);
  overflow: clip;
  overflow: hidden;
  border: 1px solid var(--glass-edge);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.glass {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: inherit;
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: inherit;
}

.glass__wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.05) 38%,
      rgba(255, 255, 255, 0.03) 100%
    ),
    linear-gradient(120deg, rgba(120, 160, 190, 0.18), transparent 42%),
    linear-gradient(320deg, rgba(203, 144, 69, 0.16), transparent 40%),
    radial-gradient(55% 50% at 78% 62%, rgba(255, 255, 255, 0.16), transparent 70%);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.glass__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.glass__orb--blue {
  width: 280px;
  height: 280px;
  right: 18%;
  top: 18%;
  background: rgba(110, 160, 210, 0.35);
}

.glass__orb--peach {
  width: 240px;
  height: 240px;
  right: 8%;
  bottom: 10%;
  background: rgba(230, 150, 90, 0.28);
}

.glass__orb--mint {
  width: 180px;
  height: 180px;
  left: 42%;
  top: 28%;
  background: rgba(140, 180, 160, 0.18);
}

.glass__mark {
  position: absolute;
  z-index: 0;
  inset-inline-end: 6%;
  top: 18%;
  font-size: clamp(12rem, 28vw, 22rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  color: rgba(255, 255, 255, 0.07);
  line-height: 0.8;
  user-select: none;
  pointer-events: none;
}

.nav,
.hero {
  position: relative;
  z-index: 1;
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.35rem) clamp(1rem, 2.2vw, 1.6rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand__mark {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  color: var(--cream);
  font-size: 1.35rem;
  line-height: 1;
}

.brand__text {
  font-size: 1.12rem;
  font-family: var(--font);
}

.menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.menu__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: rgba(244, 239, 230, 0.82);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.menu__item i {
  font-size: 1rem;
  opacity: 0.9;
  color: var(--gold);
}

.menu__item.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(203, 144, 69, 0.35);
  background: rgba(203, 144, 69, 0.12);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}

.chip i {
  color: var(--gold);
}

.nav__actions,
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.78rem 1.15rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  transition:
    transform 0.3s var(--ease),
    background 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

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

.pill i {
  font-size: 1.05em;
  opacity: 0.9;
}

.pill--soft {
  color: #1c1610;
  background: linear-gradient(180deg, #f3ece0 0%, #e4d7c2 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.pill--soft:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #fff8ee 0%, #eadfcb 100%);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.6rem);
  padding:
    0.25rem
    clamp(1.1rem, 3vw, 2.4rem)
    clamp(1.2rem, 3vw, 2rem);
}

.copy {
  max-width: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--sand);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.eyebrow i {
  color: var(--gold);
}

.title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.9rem, 3.4vw, 2.85rem);
  line-height: 1.45;
  letter-spacing: -0.015em;
  font-weight: 700;
  max-width: 18ch;
  text-wrap: balance;
}

.lede {
  margin: 1.1rem 0 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.85;
  font-weight: 400;
  text-wrap: pretty;
}

.cta {
  margin-top: 1.45rem;
}

.lanes {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  color: color-mix(in srgb, var(--mist, #9bb0bd) 80%, white);
  font-size: 0.84rem;
}

.lanes li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(244, 239, 230, 0.7);
  white-space: nowrap;
}

.lanes i {
  color: var(--gold);
  font-size: 1.05em;
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(280px, 48vh, 460px);
  perspective: 900px;
  perspective-origin: 50% 45%;
}

.stage__scene {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  will-change: transform;
}

.stage__aura {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(160, 190, 220, 0.18) 35%,
    transparent 70%
  );
  filter: blur(8px);
  opacity: 0.8;
  transform: translateZ(-40px);
}

.stage__ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(233, 227, 212, 0.22);
  pointer-events: none;
  transform-style: preserve-3d;
}

.stage__ring--a {
  width: 86%;
  aspect-ratio: 1;
  border-color: rgba(203, 144, 69, 0.28);
  box-shadow: 0 0 40px rgba(203, 144, 69, 0.08);
}

.stage__ring--b {
  width: 104%;
  aspect-ratio: 1;
  border-style: dashed;
  border-color: rgba(160, 190, 220, 0.28);
}

.stage__spark {
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8ee 0%, var(--gold) 55%, transparent 70%);
  box-shadow: 0 0 16px rgba(203, 144, 69, 0.75);
  pointer-events: none;
}

.stage__spark--1 { inset-inline-start: 12%; top: 28%; }
.stage__spark--2 { inset-inline-end: 14%; top: 22%; }
.stage__spark--3 { inset-inline-start: 18%; bottom: 24%; }
.stage__spark--4 { inset-inline-end: 16%; bottom: 30%; }

.mascot {
  position: relative;
  z-index: 2;
  width: min(100%, 400px);
  height: auto;
  user-select: none;
  filter: drop-shadow(0 28px 40px rgba(20, 12, 6, 0.35));
  transform-origin: 50% 60%;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: grab;
}

.mascot:active {
  cursor: grabbing;
}


.tabbar {
  display: none;
}

.wait {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(12, 9, 7, 0.62);
  backdrop-filter: blur(14px);
}

.wait[hidden] {
  display: none;
}

.wait__form {
  width: min(100%, 26rem);
  padding: 1.35rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(29, 24, 18, 0.96);
}

.wait__handle {
  display: none;
  width: 2.5rem;
  height: 0.28rem;
  margin: 0 auto 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.wait__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.wait__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
}

.wait__field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.wait__field span {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.wait__field input {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  padding: 0.85rem 0.95rem;
  font: inherit;
  font-size: 1rem;
}

.wait__field input:focus {
  outline: 2px solid rgba(203, 144, 69, 0.45);
  outline-offset: 1px;
}

.wait__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.35rem;
  border: 0;
  border-radius: 0.85rem;
  padding: 0.95rem 1.1rem;
  background: var(--cream);
  color: #1c1610;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.wait__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.wait__note {
  min-height: 1.25em;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.wait__note[data-state="ok"] {
  color: #9dcca8;
}

.wait__note[data-state="error"] {
  color: #e8a090;
}

.wait__close {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
    overflow-x: hidden;
  }

  .shell {
    min-height: 100dvh;
    min-height: 100svh;
    padding: 0;
    align-items: stretch;
  }

  .glass-frame {
    width: 100%;
    min-height: 100dvh;
    min-height: 100svh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }

  .glass {
    min-height: 100dvh;
    min-height: 100svh;
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .nav {
    grid-template-columns: 1fr auto;
    padding-top: max(0.85rem, env(safe-area-inset-top, 0px));
  }

  .menu {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 1.5rem;
    gap: 0.5rem;
  }

  .copy {
    order: 1;
    max-width: none;
  }

  .title {
    max-width: 16ch;
    font-size: clamp(2rem, 8vw, 2.6rem);
  }

  .lede {
    max-width: none;
  }

  .stage {
    order: 0;
    min-height: 240px;
  }

  .mascot {
    width: min(70%, 300px);
  }

  .glass__mark {
    inset-inline-end: 2%;
    top: 34%;
    font-size: 40vw;
  }

  .tabbar {
    position: fixed;
    z-index: 8;
    inset-inline: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
    padding:
      0.45rem 0.75rem
      calc(0.55rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(18, 14, 10, 0.92);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
  }

  .tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 2.85rem;
    border-radius: 0.85rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
  }

  .tabbar__item i {
    font-size: 1.35rem;
    line-height: 1;
  }

  .tabbar__item.is-active {
    color: var(--cream);
    background: rgba(255, 255, 255, 0.06);
  }

  .tabbar__item--cta {
    color: var(--gold);
  }

  .tabbar__item--cta.is-active {
    color: #1c1610;
    background: var(--cream);
  }

  .wait {
    place-items: end center;
    padding: 0;
    background: rgba(12, 9, 7, 0.55);
  }

  .wait__form {
    width: 100%;
    max-width: none;
    border-radius: 1.4rem 1.4rem 0 0;
    border-bottom: 0;
    padding:
      0.65rem 1.15rem
      calc(1.25rem + env(safe-area-inset-bottom, 0px));
    animation: sheet-up 0.32s var(--ease);
  }

  .wait__handle {
    display: block;
  }
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .nav__actions {
    display: none;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .title {
    font-size: clamp(2.2rem, 11vw, 3rem);
  }

  .wait__title {
    white-space: normal;
  }

  .app-chrome {
    display: block;
    pointer-events: none;
  }

  .app-chrome__home {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: calc(0.2rem + env(safe-area-inset-bottom, 0px));
    width: 7.5rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    transform: translateX(-50%);
    opacity: 0.55;
  }
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .shell {
    padding: 0;
  }

  .glass-frame {
    border-radius: 0;
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glass-frame,
  .glass,
  .brand,
  .menu__item,
  .nav__actions .pill,
  .chip,
  .eyebrow,
  .title,
  .lede,
  .cta,
  .lanes,
  .mascot,
  .glass__mark,
  .glass__orb {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
}
