/* Argi AI beta landing — mobile-first, centred column on wide screens.
   Colours follow mobile/src/theme/colors.ts (light) plus the mock's purple accents. */
:root {
  --primary: #047857;
  --primary-hover: #065f46;
  --on-primary: #ffffff;
  --soft-primary: #d1fae5;
  --soft-primary-border: #a7f3d0;
  --mint: #f6fbf8;
  --mint-deep: #eef7f2;
  --surface: #ffffff;
  --foreground: #052e16;
  --muted: #6b7280;
  --accent: #6c63a8;
  --accent-soft: #ece9f7;
  --border: #e5e7eb;
  --radius: 20px;
  --column: 480px;
  --sticky-height: 84px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--mint-deep);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  line-height: 1.45;
}

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

/* `hidden` must beat component display rules (e.g. .btn { display: flex }). */
[hidden] { display: none !important; }

.page {
  max-width: var(--column);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--surface);
  padding: 24px 20px calc(var(--sticky-height) + 24px);
}

@media (min-width: 560px) {
  .page {
    min-height: auto;
    margin: 32px auto;
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(5, 46, 22, 0.08);
  }
}

/* Brand header */
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.brand__icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 4px 12px rgba(5, 46, 22, 0.15); }
.brand__text { display: flex; flex-direction: column; gap: 6px; }
.brand__name { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.1; }
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

/* Hero */
.hero { margin-bottom: 20px; }
.hero__title { margin: 0 0 10px; font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.hero__subtitle { margin: 0 0 20px; font-size: 18px; color: var(--accent); }

.platform-switch {
  margin: 12px 0 0;
  text-align: center;
}
.platform-switch__btn {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.platform-switch__btn:hover { color: var(--primary); }

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 14px 20px;
  border-radius: 18px;
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px rgba(4, 120, 87, 0.28); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--primary:active { transform: scale(0.99); }
.btn__icon { width: 30px; height: 30px; flex: none; }

/* Steps */
.card {
  margin-top: 8px;
  padding: 0;
}
.card__title { margin: 0 0 14px; font-size: 21px; font-weight: 700; }

.carousel { position: relative; }
.carousel__viewport { overflow: hidden; border-radius: 16px; background: var(--surface); }
.carousel__track { list-style: none; margin: 0; padding: 0; }
.step { padding: 16px 16px 20px; }
.step__badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--soft-primary);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
}
.step__image {
  display: block;
  width: 100%;
  max-width: 400px;
  max-height: 560px;
  aspect-ratio: 9 / 19.5;
  object-fit: contain;
  margin: 14px auto 12px;
}
.step__image--icon {
  max-width: 120px;
  max-height: 120px;
  aspect-ratio: 1;
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(5, 46, 22, 0.15);
}
.step__title { margin: 0 0 6px; text-align: center; font-size: 22px; font-weight: 700; }
.step__text { margin: 0; text-align: center; color: var(--accent); font-size: 16px; }

/* Android download options */
.download__hint {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 15px;
}
.download-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.download-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--mint);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.download-option:hover {
  border-color: var(--soft-primary-border);
  background: var(--soft-primary);
}
.download-option[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}
.download-option__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--primary);
  flex: none;
}
.download-option__icon svg { width: 24px; height: 24px; }
.download-option__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.download-option__title { font-size: 17px; font-weight: 700; }
.download-option__desc { font-size: 14px; color: var(--muted); }
.download-option__chevron { font-size: 24px; color: var(--muted); line-height: 1; }

[data-platform="android"] .page {
  padding-bottom: 24px;
}

/* Arrows + stepper are only useful with JS (progressive enhancement). */
.carousel__arrow, .stepper { display: none; }

.js .carousel__track { display: flex; transition: transform 0.3s ease; }
.js .step { flex: 0 0 100%; }
.js .step[aria-hidden="true"] { visibility: hidden; }

.js .carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--soft-primary);
  color: var(--primary);
  cursor: pointer;
  z-index: 1;
}
.js .carousel__arrow svg { width: 24px; height: 24px; }
.js .carousel__arrow--prev { left: -8px; }
.js .carousel__arrow--next { right: -8px; }
.js .carousel__arrow:disabled { opacity: 0.35; cursor: default; }

.js .stepper {
  position: relative;
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 18px 0 0;
  padding: 0 8px;
}
.js .stepper::before {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  top: 20px;
  height: 2px;
  background: var(--soft-primary-border);
}
.stepper__item { position: relative; flex: 1; }
.stepper__button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.stepper__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--soft-primary-border);
  color: var(--foreground);
  font-weight: 700;
}
.stepper__button[aria-current="step"] .stepper__dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.stepper__button[aria-current="step"] .stepper__label { color: var(--primary); font-weight: 600; }

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.sticky-cta .btn { max-width: var(--column); margin: 0 auto; }
