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

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #17171c;
  --muted: #6f665a;
  --gold: #b9a27f;
  --gold-deep: #7b6448;
  --paper: #f8f4eb;
  --paper-soft: #fffdf8;
  --wave: rgba(185, 162, 127, 0.42);
  --shadow: 0 28px 80px rgba(80, 61, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.94) 0 22%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(156deg, #ffffff 0%, #fbf8f1 34%, #f1eadf 72%, #e3d5bf 100%);
}

a {
  color: inherit;
}

.screen-shell {
  position: relative;
  display: grid;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  padding: max(32px, env(safe-area-inset-top)) 22px max(36px, env(safe-area-inset-bottom));
  isolation: isolate;
}

.screen-shell::before {
  position: absolute;
  inset: -12% -28% auto;
  z-index: -3;
  height: 56%;
  content: "";
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0) 64%);
}

.brand-waves {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.95;
  transform: translateY(12%);
}

.brand-waves path {
  fill: none;
  stroke: var(--wave);
  stroke-width: 4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.download-panel {
  position: relative;
  display: block;
  width: min(100%, 430px);
  min-height: calc(100svh - max(32px, env(safe-area-inset-top)) - max(36px, env(safe-area-inset-bottom)));
  min-height: calc(100dvh - max(32px, env(safe-area-inset-top)) - max(36px, env(safe-area-inset-bottom)));
  margin: 0 auto;
  text-align: center;
}

.brand-logo {
  position: absolute;
  top: clamp(72px, 15svh, 136px);
  left: 50%;
  display: block;
  width: min(76vw, 330px);
  max-width: 100%;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 24px rgba(55, 43, 30, 0.08));
}

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

.device-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  width: 100%;
  max-width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: translate(-50%, calc(-50% + 34px));
}

html[data-platform="ios"] .device-ios,
html[data-platform="android"] .device-android,
html[data-platform="other"] .device-other {
  display: flex;
}

.store-row {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.badge-link {
  display: inline-flex;
  width: min(100%, 252px);
  aspect-ratio: 239.53 / 70.87;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
  filter: drop-shadow(0 20px 34px rgba(80, 61, 38, 0.14));
  transition:
    transform 160ms ease,
    filter 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.badge-link-primary {
  width: min(100%, 302px);
}

.badge-link:active {
  transform: translateY(1px) scale(0.99);
}

@media (hover: hover) {
  .badge-link:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 26px 42px rgba(80, 61, 38, 0.18));
  }
}

.store-badge-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
}

.fallback-link {
  max-width: 290px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
  font-weight: 500;
}

.fallback-link a {
  color: var(--gold-deep);
  font-weight: 700;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

@media (min-width: 720px) {
  .screen-shell {
    padding: 56px;
  }

  .download-panel {
    width: min(100%, 620px);
    gap: 28px;
  }

  .device-panel {
    transform: translate(-50%, -50%);
  }

  .brand-logo {
    top: clamp(96px, 18svh, 150px);
    width: min(420px, 52vw);
  }

  .store-row {
    flex-direction: row;
    justify-content: center;
  }

  .brand-waves {
    transform: translateY(3%);
  }

  .brand-waves path {
    stroke-width: 5;
  }
}

@media (max-height: 680px) {
  .brand-logo {
    top: clamp(46px, 10svh, 86px);
    width: clamp(190px, 54vw, 260px);
  }

  .device-panel {
    transform: translate(-50%, calc(-50% + 46px));
  }
}
