:root {
  --color-bg: #0a0f0e;
  --color-bg-elevated: #121a18;
  --color-bg-card: #182220;
  --color-text: #e8f0ee;
  --color-text-muted: #8fa39d;
  --color-accent: #0f766e;
  --color-accent-light: #14b8a6;
  --color-border: rgba(20, 184, 166, 0.18);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 960px;
  --radius: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent-light);
}

a:hover {
  color: #5eead4;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(10, 15, 14, 0.85);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}

.brand-icon {
  border-radius: 8px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.header-cta:hover {
  background: var(--color-accent-light);
  color: #042f2e;
}

.hero {
  padding: 4rem 0 3rem;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--color-accent-light);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 0.75rem;
  color: var(--color-text-muted);
  max-width: 36rem;
}

.hero-actions {
  margin-top: 2rem;
}

.app-store-link {
  display: inline-block;
  text-decoration: none;
}

.app-store-badge {
  width: 160px;
  height: auto;
  transition: transform 0.15s ease;
}

.app-store-link:hover .app-store-badge {
  transform: scale(1.03);
}

.hero-visual {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

/* Fake-out candle: one 9s loop. Rally (0–36%), hold, reverse (51–67%), close, dim, fade out. */
.fakeout {
  --up: #30d158;
  --down: #ff453a;
  width: min(280px, 100%);
  height: auto;
  overflow: visible;
}

.fakeout .history {
  opacity: 0.4;
}

.fakeout .up {
  fill: var(--up);
}

.fakeout .down {
  fill: var(--down);
}

.fakeout .live,
.fakeout .live-wick,
.fakeout .live-rally,
.fakeout .live-reversal,
.fakeout .countdown-fill {
  animation-duration: 9s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  transform-box: fill-box;
}

.fakeout .live {
  animation-name: live-fade;
}

.fakeout .live-wick {
  transform-origin: bottom;
  animation-name: live-wick;
}

.fakeout .live-rally {
  fill: var(--up);
  transform-origin: bottom;
  animation-name: live-rally;
}

.fakeout .live-reversal {
  fill: var(--down);
  transform-origin: top;
  animation-name: live-reversal;
}

.fakeout .countdown-track {
  fill: rgba(232, 240, 238, 0.15);
}

.fakeout .countdown-fill {
  fill: var(--color-accent-light);
  transform-origin: left;
  animation-name: countdown;
  animation-timing-function: linear;
}

@keyframes live-fade {
  0% { opacity: 0; }
  3%, 76% { opacity: 1; }
  84%, 94% { opacity: 0.4; }
  100% { opacity: 0; }
}

@keyframes live-rally {
  0% { transform: scaleY(0); }
  11% { transform: scaleY(0.1); }
  24% { transform: scaleY(0.55); }
  36% { transform: scaleY(1); }
  47% { transform: scaleY(0.93); }
  51% { transform: scaleY(0.87); }
  58%, 100% { transform: scaleY(0); }
}

/* The wick keeps the high once it is made, and turns red with the reversal. */
@keyframes live-wick {
  0% { transform: scaleY(0); fill: var(--up); }
  11% { transform: scaleY(0.1); }
  24% { transform: scaleY(0.55); }
  36% { transform: scaleY(1); }
  57% { fill: var(--up); }
  59%, 100% { transform: scaleY(1); fill: var(--down); }
}

@keyframes live-reversal {
  0%, 58% { transform: scaleY(0); }
  67%, 100% { transform: scaleY(1); }
}

@keyframes countdown {
  0% { transform: scaleX(1); }
  67%, 99% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* Hold on the closed candle: the point of the story. */
@media (prefers-reduced-motion: reduce) {
  .fakeout .live,
  .fakeout .live-wick,
  .fakeout .live-rally,
  .fakeout .live-reversal,
  .fakeout .countdown-fill {
    animation: none;
  }

  .fakeout .live-wick {
    fill: var(--down);
  }

  .fakeout .live-rally {
    transform: scaleY(0);
  }

  .fakeout .countdown-fill {
    transform: scaleX(0);
  }
}

.features,
.screenshots,
.cta {
  padding: 4rem 0;
}

.features {
  background: var(--color-bg-elevated);
  border-block: 1px solid var(--color-border);
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0 0 2.5rem;
  color: var(--color-text-muted);
  max-width: 40rem;
}

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

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

.feature-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.feature-step {
  margin: 0 0 0.5rem;
  color: var(--color-accent-light);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.feature-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.feature-card p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

.feature-card > :last-child {
  margin-bottom: 0;
}

.feature-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.feature-card li + li {
  margin-top: 0.35rem;
}

.screenshot-grid {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
}

@media (min-width: 640px) {
  .screenshot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .screenshot-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.screenshot-grid figure {
  margin: 0;
  text-align: center;
}

.screenshot-grid img {
  border-radius: 24px;
  border: 1px solid var(--color-border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.screenshot-grid figcaption {
  margin-top: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.cta {
  background: linear-gradient(180deg, var(--color-bg) 0%, #0d1715 100%);
}

.cta-inner {
  text-align: center;
}

.cta-inner h2 {
  margin-bottom: 0.75rem;
}

.cta-inner p {
  margin: 0 0 1.75rem;
  color: var(--color-text-muted);
}

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.footer-support {
  margin: 0 0 0.75rem;
  color: var(--color-text-muted);
}

.footer-support a {
  color: var(--color-accent-light);
}

.footer-copy {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.legal {
  padding: 4rem 0;
}

.legal .container {
  max-width: 40rem;
}

.legal h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
}

.legal p {
  margin: 0 0 1rem;
}

.legal-date {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}
