/* ── Fonts ── (self-hosted, latin subset; Space Grotesk is one variable file for 600–700) */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(fonts/space-grotesk.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/jetbrains-mono-400.woff2) format('woff2');
}

/* ── Tokens ── (palette sampled from the app icon: purple → blue → cyan) */
:root {
  --bg: #FBFAFD;
  --text: #17161C;
  --text-muted: #66646F;
  --grad-1: #A566F5;
  --grad-2: #5474E5;
  --grad-3: #17C2EC;
  --gradient: linear-gradient(120deg, var(--grad-1), var(--grad-2) 55%, var(--grad-3));
  --accent: #6D6AF0;
  --border: rgba(23, 22, 28, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D0C12;
    --text: #F1F0F6;
    --text-muted: #8C8A97;
    --accent: #9A8CF5;
    --border: rgba(241, 240, 246, 0.11);
  }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: 'Space Grotesk', -apple-system, sans-serif; }

/* ── Scroll reveal ── */
.reveal-enabled .reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-enabled .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-enabled .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Layout ── */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Hero ── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero-inner {
  max-width: 620px;
  padding: 100px 32px;
}

.app-icon-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 34px;
}

/* soft gradient halo behind the icon, gently breathing */
.app-icon-wrap::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: var(--gradient);
  filter: blur(52px);
  opacity: 0.5;
  border-radius: 50%;
  z-index: -1;
  animation: halo 6s ease-in-out infinite;
}
@keyframes halo {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50%      { transform: scale(1.12); opacity: 0.6; }
}
@media (prefers-reduced-motion: reduce) {
  .app-icon-wrap::before { animation: none; }
}

.app-icon {
  position: relative;
  width: 181px;
  height: 181px;
  display: block;
  border-radius: 26px;
  box-shadow: 0 12px 40px rgba(84, 116, 229, 0.28);
  /* pop in once, then float forever */
  animation: icon-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both,
             icon-float 5s ease-in-out 0.8s infinite;
}
@keyframes icon-in {
  0%   { opacity: 0; transform: scale(0.6) rotate(-12deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .app-icon { animation: none; }
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 20px;
}

.grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

/* ── Download button ── */
.btn-download {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: var(--gradient);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  border: none;
  padding: 14px 32px;
  border-radius: 980px;
  box-shadow: 0 8px 24px rgba(84, 116, 229, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  cursor: pointer;
}
.btn-download:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 12px 30px rgba(84, 116, 229, 0.45); }
.btn-download:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.btn-meta {
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.8;
}

.btn-download.disabled {
  background: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.55;
}
.btn-download.disabled:hover { transform: none; filter: none; box-shadow: none; }

.download-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.download-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.price-note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.price-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.faq {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}
.faq h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.faq-item { margin-bottom: 24px; }
.faq-item:last-child { margin-bottom: 0; }
.faq-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.faq-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.faq-item strong { color: var(--text); font-weight: 600; }

/* ── Features ── */
.features {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.feature-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.feature h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.feature:nth-child(2) { transition-delay: 0.08s; }
.feature:nth-child(3) { transition-delay: 0.16s; }

/* ── Requirements ── */
.requirements {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.requirements h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.requirements ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.requirements li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-left: 18px;
  position: relative;
}

.requirements li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.requirements li strong { color: var(--text); }

/* ── Bottom download ── */
.download {
  padding: 100px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.download h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

/* ── Footer ── */
footer {
  padding: 36px 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Checkout status (subscribe.html / success.html) ── */
.checkout-status {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  padding-top: 80px;
  padding-bottom: 80px;
}

.checkout-status .app-icon-wrap { margin-bottom: 0; }

.checkout-status h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.checkout-status .subtitle {
  max-width: 440px;
  margin: 0;
}

.info-card {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 34px;
  margin-bottom: 14px;
  box-shadow: 0 10px 34px rgba(23, 22, 28, 0.07);
}

@media (prefers-color-scheme: dark) {
  .info-card { background: #16151C; box-shadow: none; }
}

.info-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-block;
  text-align: left;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.9;
  color: var(--text);
}

.info-points li { position: relative; padding-left: 26px; }

.info-points li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.85em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.info-points .grad { font-weight: 700; }

/* Links inside a card need an explicit underline — the global `a` reset removes it, and
   gradient (.grad) links have transparent text, so set the underline colour so it shows. */
.info-points a {
  text-decoration-color: var(--accent);
}

.key-box {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 24px;
  user-select: all;
}

/* ── Contact form ── */
.contact-form {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 106, 240, 0.18);
}

.contact-form .btn-download { margin-top: 6px; align-self: center; }

/* ── Legal pages (terms.html / privacy.html) ── */
.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: 100px 32px 80px;
}

.legal .legal-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
  font-weight: 600;
  color: var(--text-muted);
}
.legal .legal-home img { width: 32px; height: 32px; border-radius: 8px; }

.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal .updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}

.legal h3 {
  font-size: 1rem;
  margin: 24px 0 8px;
}

.legal p,
.legal li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal p { margin-bottom: 14px; }

.legal ul { margin: 0 0 14px 20px; }
.legal li { margin-bottom: 6px; }

.legal strong { color: var(--text); }

.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal .callout {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 24px;
}
.legal .callout p:last-child { margin-bottom: 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-inner { padding: 80px 24px; }
  .app-icon { width: 96px; height: 96px; }

  .features-grid { grid-template-columns: 1fr; gap: 36px; }
  .feature:nth-child(2),
  .feature:nth-child(3) { transition-delay: 0; }
}
