:root {
  --black: #07080a;
  --graphite: #111316;
  --graphite-soft: #171a1e;
  --silver: #d9dce1;
  --silver-dim: #969ba5;
  --white: #f5f4f0;
  --blue: #5f9eff;
  --line: rgba(220, 224, 230, 0.16);
  --nav-height: 78px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--black);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--black);
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.app-shell {
  width: min(100%, 840px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 20px calc(var(--nav-height) + max(20px, env(safe-area-inset-bottom)) + 22px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--white);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 1.5px;
  text-decoration: none;
}

.brand b {
  color: var(--silver-dim);
  font-weight: 500;
}

.brand-mark {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  background: var(--silver);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 56%, 79% 94%, 50% 72%, 21% 94%, 32% 56%, 2% 35%, 39% 35%);
  filter: drop-shadow(3px 4px 0 rgba(98, 109, 124, 0.7));
}

.brand-mark::after {
  position: absolute;
  inset: 5px;
  background: var(--graphite);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 56%, 79% 94%, 50% 72%, 21% 94%, 32% 56%, 2% 35%, 39% 35%);
  content: "";
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.language-switch button {
  min-width: 27px;
  min-height: 24px;
  padding: 0 5px;
  border-radius: 3px;
  color: var(--silver-dim);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.7px;
}

.language-switch button[aria-pressed="true"] {
  color: var(--black);
  background: var(--silver);
}

.account-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  color: var(--silver);
  background: transparent;
  cursor: pointer;
}

.account-button svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.6;
}

.account-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: var(--graphite-soft);
  color: var(--white);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.4px;
}

.home {
  padding-top: 37px;
}

.hero {
  position: relative;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 350px;
}

.eyebrow,
.product-kicker,
.price-strip span,
.star-stage-caption {
  margin: 0;
  color: var(--silver-dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.45px;
}

.hero h1 {
  max-width: 550px;
  margin: 12px 0 16px;
  color: var(--white);
  font-size: 50px;
  font-weight: 690;
  line-height: 0.95;
}

.hero-description {
  max-width: 300px;
  margin: 0;
  color: var(--silver-dim);
  font-size: 15px;
  line-height: 1.45;
}

.star-stage {
  position: relative;
  height: 335px;
  margin-top: -26px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

#star-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.star-stage::after {
  position: absolute;
  right: 7%;
  bottom: 35px;
  width: 54%;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.84);
  content: "";
  filter: blur(13px);
  transform: rotate(-8deg);
}

.star-stage-caption {
  position: absolute;
  right: 0;
  bottom: 13px;
  left: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}

.price-strip {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr);
  align-items: baseline;
  gap: 14px;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
}

.price-strip strong {
  color: var(--silver);
  font-size: 25px;
  font-weight: 560;
  letter-spacing: 0;
}

.price-strip span:last-child {
  text-align: right;
}

.catalogue {
  margin-top: 36px;
}

.product {
  position: relative;
  min-height: 238px;
  overflow: hidden;
}

.product-stars {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px 22px 25px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--graphite);
}

.product-stars::before {
  position: absolute;
  top: 26px;
  right: 24px;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(217, 220, 225, 0.32);
  border-radius: 50%;
  content: "";
}

.product-stars::after {
  position: absolute;
  top: 46px;
  right: 44px;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(217, 220, 225, 0.6);
  border-radius: 50%;
  content: "";
}

.product-premium {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 264px;
  margin-top: 16px;
  padding: 27px 22px 25px;
  border-radius: 7px;
  background: var(--silver);
  color: var(--black);
}

.product-index {
  position: absolute;
  top: 22px;
  right: 23px;
  color: var(--silver-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.product-premium .product-index {
  color: rgba(7, 8, 10, 0.45);
}

.product-copy {
  position: relative;
  z-index: 1;
  max-width: 290px;
}

.product-kicker {
  margin-bottom: 9px;
}

.product-premium .product-kicker {
  color: rgba(7, 8, 10, 0.56);
}

.product h2 {
  margin: 0;
  color: inherit;
  font-size: 29px;
  font-weight: 640;
  line-height: 0.98;
}

.product p:not(.product-kicker) {
  max-width: 238px;
  margin: 13px 0 0;
  color: var(--silver-dim);
  font-size: 13px;
  line-height: 1.4;
}

.product-premium p:not(.product-kicker) {
  color: rgba(7, 8, 10, 0.58);
}

.product-arrow {
  position: absolute;
  z-index: 2;
  right: 21px;
  bottom: 22px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--black);
  background: var(--silver);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.product-premium .product-arrow {
  color: var(--white);
  background: var(--black);
}

.product-arrow:hover {
  transform: translate(2px, -2px);
}

.product-arrow:active {
  transform: scale(0.94);
}

.product-arrow svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.7;
}

.premium-art {
  position: absolute;
  top: -11px;
  right: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 142px;
  height: 142px;
  transform: rotate(-18deg);
}

.premium-art span {
  position: absolute;
  display: block;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(7, 8, 10, 0.68);
  transform: rotate(45deg);
}

.premium-art span:nth-child(2) {
  width: 72px;
  height: 72px;
  border-color: rgba(7, 8, 10, 0.43);
}

.premium-art span:nth-child(3) {
  width: 42px;
  height: 42px;
  border-color: rgba(7, 8, 10, 0.73);
}

.bottom-nav {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 840px);
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  margin: 0 auto;
  padding: 9px 17px max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--black);
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 3px;
  color: #858a93;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 620;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.5;
}

.nav-item.is-active {
  color: var(--white);
}

.toast {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 18px);
  left: 20px;
  max-width: 440px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #1a1e24;
  color: var(--white);
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 620ms cubic-bezier(0.2, 0.7, 0, 1) forwards;
}

.reveal-delay-1 { animation-delay: 70ms; }
.reveal-delay-2 { animation-delay: 150ms; }
.reveal-delay-3 { animation-delay: 230ms; }
.reveal-delay-4 { animation-delay: 300ms; }
.reveal-delay-5 { animation-delay: 370ms; }

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 680px) {
  .app-shell {
    padding-right: 36px;
    padding-left: 36px;
  }

  .home {
    padding-top: 52px;
  }

  .hero h1 {
    font-size: 67px;
  }

  .star-stage {
    height: 425px;
    margin-top: -86px;
  }

  .catalogue {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 16px;
  }

  .product,
  .product-premium {
    min-height: 290px;
    margin-top: 0;
  }
}

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