:root {
  color-scheme: dark;
  --night: #06070d;
  --surface: #0d0d1a;
  --wine: #260a19;
  --burgundy: #3a0a1c;
  --red: #ff4758;
  --orange: #ff7c37;
  --cream: #f6e7de;
  --muted: #bca7af;
  --disabled: #9999a6;
  --gold-line: rgba(255, 133, 42, 0.5);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #020207;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(83, 13, 30, 0.28), transparent 30rem),
    #020207;
  color: #fff;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.phone-page {
  isolation: isolate;
  position: relative;
  width: min(100%, 375px);
  min-height: max(100svh, 812px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--night) url("../images/landing-background.png") center / cover no-repeat;
  box-shadow: 0 0 70px rgba(255, 71, 88, 0.12);
}

.background-shade {
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 2, 7, 0.08), rgba(3, 2, 7, 0.16) 45%, rgba(3, 2, 7, 0.04)),
    radial-gradient(circle at 50% 34%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.25) 68%);
}

.particle-field {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  left: var(--x);
  bottom: -24px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 181, 142, 0.95) 0 18%, rgba(255, 71, 88, 0.65) 35%, transparent 72%);
  filter: blur(var(--blur));
  opacity: 0;
  box-shadow: 0 0 12px rgba(255, 71, 88, 0.55);
  animation: particle-rise var(--duration) linear var(--delay) infinite;
}

.particle:nth-child(4n) {
  border-radius: 42% 42% 50% 50%;
}

@keyframes particle-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.55) rotate(0deg);
  }
  12% {
    opacity: var(--opacity);
  }
  78% {
    opacity: 0.18;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), -850px, 0) scale(1.2) rotate(150deg);
  }
}

.top-bar,
.hero,
.install-card,
.features,
.download-content {
  position: relative;
  z-index: 2;
}

.top-bar {
  height: 96px;
  padding: max(10px, env(safe-area-inset-top)) 20px 0;
}

.status-row {
  display: flex;
  height: 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 500;
}

.status-icons {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.status-icons i:first-child {
  width: 15px;
  height: 10px;
  background: linear-gradient(90deg, #fff 2px, transparent 2px 4px, #fff 4px 7px, transparent 7px 9px, #fff 9px 12px, transparent 12px 13px, #fff 13px);
  clip-path: polygon(0 100%, 0 70%, 20% 70%, 20% 48%, 45% 48%, 45% 25%, 70% 25%, 70% 0, 100% 0, 100% 100%);
}

.status-icons i:nth-child(2) {
  width: 15px;
  height: 10px;
  border-top: 2px solid #fff;
  border-radius: 50% 50% 0 0;
  position: relative;
}

.status-icons i:nth-child(2)::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.status-icons b {
  width: 21px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 3px;
  background: linear-gradient(90deg, #fff 0 78%, transparent 78%);
}

.navigation {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  height: 56px;
}

.navigation-title {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.back-button {
  display: grid;
  width: 32px;
  height: 40px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.back-button span {
  width: 11px;
  height: 11px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.hero {
  padding: 7px 22px 0;
  text-align: center;
}

.app-icon {
  display: grid;
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px solid rgba(255, 122, 55, 0.18);
  border-radius: 25px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 82, 55, 0.2), transparent 55%),
    linear-gradient(145deg, rgba(72, 5, 14, 0.98), rgba(84, 26, 0, 0.95));
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.3),
    0 0 28px rgba(255, 114, 41, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: logo-breathe 3.8s ease-in-out infinite;
}

.app-icon::before,
.download-logo::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -13px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 99, 66, 0.38), rgba(255, 71, 88, 0.08) 48%, transparent 72%);
  filter: blur(8px);
  opacity: 0.55;
  animation: halo-breathe 3.8s ease-in-out infinite;
}

@keyframes logo-breathe {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.3), 0 0 22px rgba(255, 114, 41, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  50% {
    transform: translateY(-2px) scale(1.025);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.34), 0 0 40px rgba(255, 92, 61, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
}

@keyframes halo-breathe {
  0%, 100% { opacity: 0.32; transform: scale(0.92); }
  50% { opacity: 0.78; transform: scale(1.08); }
}

.app-icon img {
  width: 79%;
  height: 79%;
  object-fit: contain;
}

.hero h1 {
  margin: 0;
  background: linear-gradient(100deg, #ff9b2e 0%, #ff7339 50%, #ff4758 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.08;
}

.hero p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.install-card {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 13px 15px;
  margin: 10px 22px 0;
  padding: 11px 12px 14px;
  border: 1px solid rgba(255, 132, 36, 0.42);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(11, 12, 16, 0.93), rgba(15, 13, 14, 0.89));
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

.qr-preview {
  display: grid;
  width: 136px;
  height: 136px;
  place-items: center;
  border: 1px solid rgba(255, 142, 42, 0.58);
  border-radius: 12px;
  background: #08090c;
}

.qr-preview img {
  width: 119px;
  height: 119px;
  border-radius: 7px;
  image-rendering: pixelated;
}

.install-copy {
  align-self: center;
  min-width: 0;
}

.install-copy h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.title-accent {
  display: block;
  width: 23px;
  height: 2px;
  margin: 8px 0 15px;
  border-radius: 2px;
  background: var(--orange);
}

.install-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.36;
}

.download-button {
  display: grid;
  position: relative;
  grid-column: 1 / -1;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 237, 224, 0.76);
  border-radius: 24px;
  background: linear-gradient(96deg, var(--red), #ff6658 45%, #ff9870 100%);
  box-shadow:
    0 0 17px rgba(255, 96, 70, 0.8),
    inset 0 2px 4px rgba(255, 255, 255, 0.62),
    inset 0 -4px 8px rgba(168, 21, 46, 0.2);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  transition: transform 160ms ease, filter 160ms ease;
  animation: button-breathe 2.8s ease-in-out infinite;
}

.download-button::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -35%;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  filter: blur(2px);
  transform: skewX(-18deg);
  animation: button-shine 3.6s ease-in-out infinite;
}

@keyframes button-breathe {
  0%, 100% {
    box-shadow: 0 0 14px rgba(255, 96, 70, 0.58), inset 0 2px 4px rgba(255, 255, 255, 0.62), inset 0 -4px 8px rgba(168, 21, 46, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 83, 74, 0.92), 0 0 42px rgba(255, 124, 55, 0.22), inset 0 2px 4px rgba(255, 255, 255, 0.72), inset 0 -4px 8px rgba(168, 21, 46, 0.18);
  }
}

@keyframes button-shine {
  0%, 55% { left: -35%; opacity: 0; }
  62% { opacity: 0.8; }
  82% { left: 112%; opacity: 0; }
  100% { left: 112%; opacity: 0; }
}

.download-button:hover,
.download-button:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.download-button:active {
  transform: translateY(1px) scale(0.99);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin: 18px 22px 40px;
}

.feature-card {
  min-width: 0;
  height: 122px;
  padding: 9px 4px 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 142, 42, 0.34);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(17, 14, 18, 0.91), rgba(7, 8, 12, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  text-align: center;
  backdrop-filter: blur(12px);
}

.feature-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 6px;
  place-items: center;
  animation: icon-breathe 3.2s ease-in-out infinite;
}

.feature-card:nth-child(2) .feature-icon {
  animation-delay: -1.05s;
}

.feature-card:nth-child(3) .feature-icon {
  animation-delay: -2.1s;
}

@keyframes icon-breathe {
  0%, 100% {
    transform: translateY(0) scale(0.98);
    filter: drop-shadow(0 0 4px rgba(255, 71, 88, 0.2));
  }
  50% {
    transform: translateY(-2px) scale(1.06);
    filter: drop-shadow(0 0 11px rgba(255, 99, 66, 0.68));
  }
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-card h2 {
  min-height: 14px;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.feature-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 6.5px;
  line-height: 1.45;
}

.home-indicator {
  position: absolute;
  z-index: 4;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: 50%;
  width: 130px;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.62);
  transform: translateX(-50%);
}

.download-page {
  min-height: max(100svh, 812px);
}

.download-content {
  padding: 35px 28px 50px;
  text-align: center;
}

.download-logo {
  display: grid;
  position: relative;
  width: 78px;
  height: 78px;
  margin: 0 auto 20px;
  place-items: center;
  border: 1px solid rgba(255, 122, 55, 0.3);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(80, 5, 18, 0.96), rgba(86, 28, 2, 0.94));
  box-shadow: 0 0 28px rgba(255, 90, 59, 0.38);
  animation: logo-breathe 3.8s ease-in-out infinite;
}

.download-logo img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.download-content h1 {
  margin: 0;
  color: var(--cream);
  font-size: 34px;
  line-height: 1.08;
}

.download-intro {
  max-width: 290px;
  margin: 14px auto 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.download-qr-card {
  position: relative;
  display: grid;
  width: 250px;
  height: 250px;
  margin: 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 125, 51, 0.62);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(21, 14, 18, 0.96), rgba(7, 8, 12, 0.94));
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.38),
    0 0 32px rgba(255, 71, 88, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.qr-large {
  display: grid;
  width: 202px;
  height: 202px;
  place-items: center;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.06);
}

.qr-large img {
  width: 188px;
  height: 188px;
  border-radius: 8px;
  image-rendering: pixelated;
}

.scan-line {
  position: absolute;
  left: 25px;
  right: 25px;
  top: 24px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--red), var(--orange), transparent);
  box-shadow: 0 0 10px rgba(255, 71, 88, 0.9);
  animation: scan 3.2s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(200px); opacity: 1; }
}

.download-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 22px;
  color: var(--muted);
  font-size: 11px;
}

.download-note span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #52d689;
  box-shadow: 0 0 8px rgba(82, 214, 137, 0.75);
}

.secondary-button {
  display: grid;
  width: 250px;
  height: 46px;
  margin: 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 99, 79, 0.55);
  border-radius: 24px;
  background: rgba(38, 10, 25, 0.72);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.page-leaving {
  /* animation: page-out 180ms ease forwards; */
}

@keyframes page-out {
  to { opacity: 0.7; transform: scale(0.992); }
}

@media (min-width: 540px) {
  body {
    display: grid;
    min-height: 100vh;
    place-items: start center;
    padding: 24px;
  }

  .phone-page {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
  }
}

@media (max-height: 760px) and (max-width: 539px) {
  .phone-page {
    min-height: 812px;
  }
}

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

  .particle-field {
    display: none;
  }
}
