:root {
  color-scheme: light;
  --green: #5f7f73;
  --green-deep: #405f55;
  --green-soft: #e9f0ed;
  --gold: #c8a96a;
  --background: #f6f4ef;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #626c70;
  --line: rgba(64, 95, 85, 0.16);
  --shadow: 0 28px 70px rgba(35, 55, 48, 0.14);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% -20%, rgba(127, 165, 150, 0.26), transparent 42rem),
    linear-gradient(180deg, #fbfaf7 0%, var(--background) 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 15% 85%, rgba(200, 169, 106, 0.12), transparent 26rem);
  content: "";
  pointer-events: none;
}

.download-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

.download-card {
  position: relative;
  width: min(100%, 620px);
  padding: clamp(30px, 7vw, 58px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
}

.download-card::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 132px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  content: "";
  transform: translateX(-50%);
}

.brand-lockup {
  display: grid;
  justify-items: center;
}

.app-icon {
  display: block;
  width: clamp(88px, 24vw, 112px);
  height: auto;
  aspect-ratio: 1;
  border: 1px solid rgba(64, 95, 85, 0.1);
  border-radius: 25%;
  background: #fff;
  box-shadow:
    0 16px 30px rgba(64, 95, 85, 0.16),
    0 2px 8px rgba(31, 41, 55, 0.08);
}

.brand-name {
  margin: 15px 0 0;
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro {
  margin-top: clamp(28px, 6vw, 38px);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #23352f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 9vw, 3.45rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.lead {
  max-width: 470px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 3.8vw, 1.1rem);
  line-height: 1.65;
}

.device-status {
  display: flex;
  width: fit-content;
  max-width: 100%;
  min-height: 50px;
  margin: 28px auto 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--green-soft);
  color: #314d44;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.4;
}

.status-mark {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(95, 127, 115, 0.16);
}

.store-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.store-badge {
  display: grid;
  min-width: 0;
  min-height: 56px;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 12px;
  color: #fff;
  background: #000;
  text-decoration: none;
  touch-action: manipulation;
}

.store-badge img {
  display: block;
  width: 100%;
  max-width: 176px;
  height: 54px;
  object-fit: contain;
}

.store-badge:hover {
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.15);
  transform: translateY(-1px);
}

.store-badge:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.store-badge.is-disabled {
  border-color: #d8dadd;
  color: #72777a;
  background: #eef0f1;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.store-badge-fallback {
  padding: 0 16px;
  font-size: 0.95rem;
  font-weight: 700;
}

.availability-note,
.noscript-note {
  margin: 18px auto 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f4f1e9;
  color: #6d624b;
  font-size: 0.88rem;
  line-height: 1.5;
}

.help-text {
  margin: 22px 0 0;
  color: #747c7f;
  font-size: 0.86rem;
  line-height: 1.55;
}

.web-view-link {
  display: inline-flex;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 5px;
  align-items: center;
  color: var(--green-deep);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: rgba(64, 95, 85, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.web-view-link:hover {
  color: #29483e;
  text-decoration-color: currentColor;
}

.web-view-link:focus-visible {
  border-radius: 6px;
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

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

@media (max-width: 540px) {
  .download-shell {
    place-items: start center;
  }

  .download-card {
    min-height: calc(100vh - max(48px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    min-height: calc(100dvh - max(48px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    padding-inline: clamp(22px, 7vw, 34px);
    border-radius: 26px;
  }

  .store-actions {
    grid-template-columns: 1fr;
    width: min(100%, 280px);
    margin-inline: auto;
  }
}

@media (max-width: 360px) {
  .download-card {
    padding-inline: 18px;
  }

  .device-status {
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .store-badge {
    transition: box-shadow 160ms ease, transform 160ms ease;
  }
}

@media (prefers-contrast: more) {
  .download-card,
  .device-status {
    border-color: var(--green-deep);
  }

  .help-text,
  .lead {
    color: #374247;
  }
}
