:root {
  --brand: #177245;
  --brand-dark: #0f4d2e;
  --brand-light: #2a9b63;
  --brand-tint: #9fd4b8;
  --surface: #f8fafc;
  --text: #0a2915;
  --muted: #64748b;
  --card: #ffffff;
  --border: #e2e8f0;
  --soft-grey: #e2e8f0;
  --shadow: 0 12px 40px rgba(23, 114, 69, 0.1);
  --radius: 16px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(23, 114, 69, 0.08), transparent),
    var(--surface);
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand);
}

.container {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  background: linear-gradient(
    135deg,
    var(--brand-dark) 0%,
    var(--brand) 45%,
    var(--brand-light) 100%
  );
  background-size: 200% 200%;
  animation: header-gradient 12s ease infinite;
  color: #fff;
  padding: 3.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.header-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 30%, rgba(255, 255, 255, 0.12), transparent 42%),
    radial-gradient(circle at 85% 70%, rgba(159, 212, 184, 0.2), transparent 38%);
  animation: glow-drift 18s ease-in-out infinite alternate;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
  pointer-events: none;
  animation: glow-pulse 6s ease-in-out infinite;
}

.header-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .header-inner {
    grid-template-columns: auto 1fr;
  }
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  animation: icon-float 5s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.88;
}

.site-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
}

.lead {
  margin: 0;
  max-width: 52ch;
  font-size: 1.05rem;
  opacity: 0.94;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.9rem;
  backdrop-filter: blur(6px);
  transition: transform 0.4s var(--ease-out), background 0.4s ease;
}

.version-pill.is-ready {
  animation: pill-pop 0.5s var(--ease-out);
}

main {
  margin-top: -2rem;
  padding-bottom: 4rem;
  position: relative;
  z-index: 2;
}

.download-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .download-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(23, 114, 69, 0.16);
  border-color: rgba(23, 114, 69, 0.22);
}

.card:hover .platform-icon {
  transform: scale(1.08) rotate(-3deg);
  background: rgba(23, 114, 69, 0.16);
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.platform-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(23, 114, 69, 0.1);
  color: var(--brand);
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-out), background 0.35s ease;
}

.platform-icon svg {
  width: 28px;
  height: 28px;
}

.card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.card .meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.req-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.req-list li + li {
  margin-top: 0.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  border: none;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    opacity 0.2s ease,
    background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #fff;
  box-shadow: 0 8px 20px rgba(23, 114, 69, 0.28);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(23, 114, 69, 0.38);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-muted {
  background: var(--soft-grey);
  color: var(--muted);
  cursor: not-allowed;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
}

.card-actions .btn {
  margin-top: 0;
}

.coming-soon-badge {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  animation: badge-pulse 2.5s ease-in-out infinite;
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.card > .note {
  margin-top: 0.25rem;
}

.section {
  margin-top: 2.5rem;
}

.section h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.steps {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.step:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(23, 114, 69, 0.1);
}

.step strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--brand-dark);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Entrance animations */
.animate-in,
.animate-card {
  opacity: 0;
  animation: fade-up 0.75s var(--ease-out) forwards;
  animation-delay: var(--delay, 0s);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

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

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes header-gradient {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes glow-drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(2%, -2%) scale(1.04);
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

@keyframes icon-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pill-pop {
  0% {
    transform: scale(0.92);
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes badge-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .animate-in,
  .animate-card {
    opacity: 1;
    animation: none;
  }
}
