/* ===========================================================
   RutaCafé — Download gate
   Tokens
   =========================================================== */
:root {
  --bg:           #ffffff;   /* page background */
  --surface:      #f7f6f2;   /* subtle raised surface */
  --hairline:     #e6e3da;   /* dividers, borders */
  --ink:          #131210;   /* primary text, near-black */
  --ink-dim:      #6f6b60;   /* muted text */
  --olive:        #636d2f;   /* brand olive — Android */
  --olive-dim:    #4e5624;
  --near-black:   #0e0d0b;   /* brand black — iOS */

  --display: "Fraunces", ui-serif, Georgia, serif;
  --body: "Inter", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* faint paper grain so the flat white field doesn't feel like a template */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 1;
}

.stage {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8vh 24px 40px;
  text-align: center;
}

/* ---------- steam signature: three soft rising wisps behind the headline ---------- */
.steam {
  position: absolute;
  top: 6%;
  left: 50%;
  width: 140px;
  height: 220px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}
.steam span {
  position: absolute;
  bottom: 0;
  width: 2px;
  height: 100%;
  left: 50%;
  background: linear-gradient(to top, transparent, rgba(99,109,47,0.22) 30%, transparent 75%);
  filter: blur(6px);
  transform-origin: bottom center;
  animation: rise 7s ease-in-out infinite;
}
.steam span:nth-child(1) { left: 30%; animation-delay: -1.5s; }
.steam span:nth-child(2) { left: 50%; animation-delay: 0s; }
.steam span:nth-child(3) { left: 70%; animation-delay: -3.2s; }

@keyframes rise {
  0%   { transform: translateY(0) scaleY(0.9) rotate(0deg); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(-140px) scaleY(1.3) rotate(6deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .steam span { animation: none; opacity: 0.18; }
}

/* ---------- wordmark ---------- */
.mark {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  margin-bottom: 8vh;
}
.mark__logo {
  display: block;
  border-radius: 8px;
}
.mark__word {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 18px;
}

.headline {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(1.9rem, 7vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  color: var(--ink);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.dots {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 7px;
}
.dots i {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--olive);
  opacity: 0.25;
  animation: blink 1.2s ease-in-out infinite;
}
.dots i:nth-child(1) { animation-delay: 0s; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .dots i { animation: none; opacity: 0.7; }
}

@media (max-width: 460px) {
  .headline { gap: 7px; }
  .dots { gap: 5px; }
  .dots i { width: 7px; height: 7px; }
}

@media (max-width: 370px) {
  .headline { font-size: 1.55rem; }
}

.sub {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: 38ch;
  margin: 0 0 44px;
}

/* ---------- CTA area ---------- */
.cta {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta__loading {
  font-size: 0.85rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

/* Android button: solid brand olive, official Android icon, white label */
.btn-android {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--olive);
  color: #ffffff;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  padding: 16px 30px;
  border-radius: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-android:hover { background: var(--olive-dim); transform: translateY(-1px); }
.btn-android:active { transform: translateY(0); }
.btn-android svg { flex-shrink: 0; }

/* iOS button: solid brand black pill, Apple mark, white label */
.btn-ios {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--near-black);
  color: #ffffff;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  padding: 15.5px 30px;
  border-radius: 999px;
  border: 1.5px solid var(--near-black);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-ios:hover { background: #262421; transform: translateY(-1px); }
.btn-ios:active { transform: translateY(0); }
.btn-ios svg { flex-shrink: 0; }

.btn-android:focus-visible,
.btn-ios:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* both buttons shown together on desktop / unknown devices */
.cta--both {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- fallback ---------- */
.fallback {
  font-size: 0.85rem;
  color: var(--ink-dim);
  max-width: 34ch;
  margin: 28px 0 14px;
}

.fallback-links {
  display: flex;
  gap: 14px;
}

.fallback-links a {
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.fallback-links a:hover { border-color: var(--olive); }

/* ---------- footer ---------- */
.foot {
  position: relative;
  z-index: 2;
  margin-top: 8vh;
  font-size: 0.75rem;
  color: var(--ink-dim);
  opacity: 0.75;
}

@media (max-width: 400px) {
  .btn-android, .btn-ios { padding: 14px 22px; font-size: 0.95rem; }
}