:root {
  --cream: #fff8f0;
  --cream-tint: #fdf1f0;
  --cream-cool: #f6f2ef;
  --terracotta: #b93f37;
  --terracotta-dark: #8c2d27;
  --terracotta-light: #e57368;
  --terracotta-glow: #e35436;
  --ink: #2a1d1a;
  --ink-soft: #6b534d;
  --hairline: rgba(185, 63, 55, 0.18);
  --shadow: 0 20px 60px -30px rgba(140, 45, 39, 0.35);
  --radius: 22px;
  --radius-lg: 28px;
  --serif-display: "Young Serif", "Cormorant Garamond", Georgia, serif;
  --serif-prose: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@font-face {
  font-family: "Young Serif";
  src: url("https://fonts.gstatic.com/s/youngserif/v2/3qTpojOggD2XtAdFb-QXZGt61EcYaQ7F.woff2") format("woff2");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ---------- ambient nature backdrop ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.backdrop::before {
  content: "";
  position: absolute;
  inset: -10% -10% 40% -10%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(229, 115, 104, 0.18), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(212, 160, 84, 0.12), transparent 60%);
}
.backdrop .hill {
  position: absolute;
  left: 50%;
  bottom: -2%;
  width: 200vw;
  min-width: 2560px;
  height: 42vh;
  background: linear-gradient(180deg, transparent, rgba(185, 63, 55, 0.08) 40%, rgba(140, 45, 39, 0.16));
  clip-path: path("M0,220 C240,120 480,200 760,140 C1040,80 1320,200 1640,160 C1960,120 2280,220 2560,180 L2560,320 L0,320 Z");
  transform: translateX(-50%);
  transform-origin: bottom center;
}
.backdrop .trees,
.backdrop .bush {
  position: absolute;
  bottom: 0;
  opacity: 0.9;
  filter: drop-shadow(0 8px 16px rgba(140, 45, 39, 0.15));
}
.backdrop .trees {
  left: 4vw;
  width: min(260px, 36vw);
  animation: bob 7s ease-in-out infinite;
}
.backdrop .bush {
  right: 6vw;
  width: min(180px, 28vw);
  animation: bob 5s ease-in-out infinite reverse;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ---------- layout ---------- */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 140px;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif-display);
  font-size: 20px;
  letter-spacing: 0.01em;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 6px 16px -8px rgba(140, 45, 39, 0.5);
}
.brand span { color: var(--terracotta); }

.hero {
  max-width: 620px;
  width: 100%;
  text-align: center;
  margin-top: 6vh;
}
.eyebrow {
  display: inline-block;
  padding: 8px 16px;
  border: 1.5px solid var(--terracotta);
  border-radius: 999px;
  color: var(--terracotta);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--cream-tint);
}
.hero h1 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(40px, 8vw, 68px);
  line-height: 1.05;
  margin: 24px 0 18px;
  color: var(--ink);
}
.hero h1 em {
  font-family: var(--serif-prose);
  font-style: italic;
  color: var(--terracotta);
}
.hero p {
  font-family: var(--serif-prose);
  font-style: italic;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto;
}

/* ---------- card (used on download page) ---------- */
.card {
  background: #ffffff;
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  width: min(480px, 100%);
  margin: 0 auto;
}
.card.tint {
  background: var(--cream-tint);
  border-color: rgba(185, 63, 55, 0.28);
}
.card h2 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 8px;
}
.card .lede {
  font-family: var(--serif-prose);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 22px;
  line-height: 1.55;
}

/* ---------- form ---------- */
.field {
  display: block;
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--hairline);
  border-radius: 14px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.field input:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(185, 63, 55, 0.12);
}
.field input::placeholder { color: #b6a5a0; }
.field .hint {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 6px;
  font-style: italic;
}

/* ---------- pill button ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 24px;
  background: var(--terracotta);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 30px -14px rgba(185, 63, 55, 0.8);
  transition: transform 140ms ease, background 140ms ease, box-shadow 200ms ease;
}
.pill:hover { background: var(--terracotta-glow); }
.pill:active { transform: translateY(1px); }
.pill:disabled {
  background: #d9c4c0;
  box-shadow: none;
  cursor: not-allowed;
}

.pill.ghost {
  background: transparent;
  color: var(--terracotta);
  border: 1.5px solid var(--terracotta);
  box-shadow: none;
}
.pill.ghost:hover { background: var(--cream-tint); }

/* ---------- status ---------- */
.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  display: none;
}
.status.show { display: block; }
.status.error {
  background: #fdecea;
  color: #8c2d27;
  border: 1px solid rgba(140, 45, 39, 0.2);
}
.status.success {
  background: #ecf5ee;
  color: #2f5d3a;
  border: 1px solid rgba(47, 93, 58, 0.2);
}

/* ---------- success state ---------- */
.success-block {
  text-align: center;
}
.success-block .checkmark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 14px;
  animation: pop 700ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop {
  0% { transform: scale(0.2); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}
.version-pill {
  display: inline-block;
  margin: 10px 0 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--cream-tint);
  color: var(--terracotta);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.install-note {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-top: 18px;
  font-style: italic;
}

/* ---------- desktop block ---------- */
.desktop-block {
  display: none;
}
@media (min-width: 820px) and (hover: hover) and (pointer: fine) {
  .desktop-block { display: flex; }
  .download-flow { display: none; }
}
.desktop-block {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.desktop-block svg { opacity: 0.85; margin-bottom: 8px; }
.desktop-block h2 { margin: 0 0 4px; font-family: var(--serif-display); font-weight: 400; font-size: 24px; }
.desktop-block p { font-family: var(--serif-prose); font-style: italic; color: var(--ink-soft); max-width: 40ch; margin: 0; }

/* ---------- QR code section ---------- */
.qr-section {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.qr-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.qr-divider::before,
.qr-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}
#qr-code {
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid var(--hairline);
  box-shadow: 0 8px 24px -12px rgba(140, 45, 39, 0.2);
}

/* ---------- footer ---------- */
footer {
  position: relative;
  z-index: 1;
  padding: 24px 20px 32px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
footer img { width: 96px; opacity: 0.75; }
footer a { color: var(--terracotta); text-decoration: none; }

/* ---------- responsive tweaks ---------- */
@media (max-width: 420px) {
  main { padding-top: 20px; }
  .card { padding: 26px 20px; border-radius: 22px; }
  .hero { margin-top: 2vh; }
  .backdrop .trees { width: 150px; left: -10px; }
  .backdrop .bush { width: 110px; right: -10px; }
}
