:root {
  color-scheme: light;
  --page: #f5eee3;
  --ink: #20213b;
  --muted: #41465d;
  --card-border: rgba(34, 35, 63, 0.08);
  --button-primary-start: #20213b;
  --button-primary-end: #4b507f;
  --button-primary-text: #fff8ef;
  --button-secondary-bg: rgba(75, 80, 127, 0.08);
  --button-secondary-text: #20213b;
  --shadow: 0 30px 70px rgba(63, 45, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: 'Avenir Next', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: linear-gradient(145deg, #efe8ff, #fef0df);
}

.shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px 14px;
}

.card {
  width: min(100%, 720px);
  padding: 28px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}

.brand-mark {
  display: flex;
  justify-content: flex-start;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(75, 80, 127, 0.12), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(75, 80, 127, 0.1);
}

.brand-logo {
  width: 52px;
  height: auto;
  display: block;
}

.hero-copy {
  margin-top: 24px;
}

h1 {
  margin: 0;
  font-family: 'Iowan Old Style', Georgia, serif;
  font-size: clamp(3rem, 7vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.copy {
  margin: 20px 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.8vw, 1.35rem);
  line-height: 1.65;
}

.actions {
  display: grid;
  gap: 20px;
  margin-top: 42px;
}

.button {
  min-height: 72px;
  padding: 18px 22px;
  border-radius: 28px;
  text-decoration: none;
  font-size: clamp(1.08rem, 2.4vw, 1.35rem);
  font-weight: 800;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button:focus-visible {
  outline: 2px solid rgba(75, 80, 127, 0.2);
  outline-offset: 2px;
}

.button-primary {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--button-primary-start), var(--button-primary-end));
  color: var(--button-primary-text);
  box-shadow: 0 16px 34px rgba(75, 80, 127, 0.22);
}

.button-primary::after {
  content: '';
  width: 28px;
  height: 28px;
}

.button-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--button-secondary-bg);
  color: var(--button-secondary-text);
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.button-icon svg {
  width: 100%;
  height: 100%;
}

.button-text {
  display: block;
  text-align: center;
}

/* Official store badge mode (iOS / Android) */
.button-primary[data-badge] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 8px 0 4px;
  min-height: auto;
  overflow: visible;
}

.button-primary[data-badge]:hover,
.button-primary[data-badge]:focus-visible {
  transform: none;
}

.button-primary[data-badge]::before {
  content: '';
  position: absolute;
  inset: auto 10% 6px;
  height: 24px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(32, 33, 59, 0.22) 0%, rgba(32, 33, 59, 0) 74%);
  filter: blur(10px);
  z-index: 0;
}

.button-primary[data-badge]::after {
  display: none;
}

.button-primary[data-badge] .button-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 10px 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 240, 255, 0.68));
  border: 1px solid rgba(75, 80, 127, 0.12);
  box-shadow:
    0 20px 40px rgba(53, 41, 84, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.store-badge-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.store-badge-frame::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 22px;
  z-index: -1;
}

.store-badge-frame--ios::after {
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.35), transparent 42%),
    linear-gradient(135deg, rgba(17, 18, 27, 0.08), rgba(255, 255, 255, 0));
}

.store-badge-frame--android::after {
  background:
    radial-gradient(circle at 16% 52%, rgba(0, 184, 240, 0.22), transparent 35%),
    radial-gradient(circle at 84% 30%, rgba(255, 214, 0, 0.2), transparent 30%),
    radial-gradient(circle at 66% 88%, rgba(255, 61, 0, 0.18), transparent 34%),
    radial-gradient(circle at 35% 88%, rgba(0, 200, 83, 0.18), transparent 34%);
}

.store-badge-img {
  display: block;
  height: clamp(44px, 7vw, 56px);
  width: auto;
  max-width: min(100%, 210px);
  filter: drop-shadow(0 8px 18px rgba(15, 18, 33, 0.14));
  transition:
    transform 150ms ease,
    filter 150ms ease;
}

.button-primary[data-badge]:hover .store-badge-img,
.button-primary[data-badge]:focus-visible .store-badge-img {
  transform: translateY(-2px) scale(1.02);
  filter: drop-shadow(0 14px 26px rgba(15, 18, 33, 0.2));
}

.button-primary[data-badge]:focus-visible .button-icon {
  outline: 2px solid rgba(75, 80, 127, 0.2);
  outline-offset: 4px;
}

.button-primary[data-badge] .button-text {
  display: none;
}

.meta {
  min-height: 1.25em;
  margin: 14px 0 0;
  color: #626883;
  font-size: 0.92rem;
  line-height: 1.5;
}

.meta:empty {
  display: none;
}

.noscript-copy {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.noscript-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .card {
    padding: 22px;
    border-radius: 30px;
  }

  .brand-badge {
    width: 78px;
    height: 78px;
  }

  .brand-logo {
    width: 46px;
  }

  .actions {
    gap: 14px;
    margin-top: 34px;
  }

  .button {
    min-height: 64px;
    padding: 16px 18px;
    border-radius: 24px;
  }

  .button-primary[data-badge] {
    padding: 4px 0 2px;
  }

  .button-primary[data-badge] .button-icon {
    padding: 8px 10px;
    border-radius: 20px;
  }

  .store-badge-frame::after {
    inset: -6px;
  }

  .store-badge-img {
    height: clamp(40px, 12vw, 48px);
  }
}
