/* ============================================================
   HIITTrack – style.css
   Retro-inspired, clean, mobile-first layout
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Color palette – neutral light with warm paper tones */
  --color-bg:          #f5f0e8;
  --color-surface:     #ffffff;
  --color-surface-alt: #edeae0;
  --color-border:      #c8c0ae;
  --color-text:        #1a1a18;
  --color-text-muted:  #6b6658;
  --color-accent:      #b84c2e;   /* retro orange-red */
  --color-accent-dark: #8f3520;
  --color-accent-light:#f0ddd7;

  /* Typography */
  --font-sans:  system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono:  "Courier New", Courier, monospace;

  /* Spacing */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   6rem;

  /* Misc */
  --radius:     4px;
  --border:     2px solid var(--color-border);
  --max-width:  960px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

a {
  color: var(--color-accent);
  text-decoration: underline;
}
a:hover,
a:focus-visible {
  color: var(--color-accent-dark);
}

/* ── Utility ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.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;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.1s;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
  border: 2px solid var(--color-accent);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-large {
  font-size: 1.125rem;
  padding: 1rem 2.5rem;
}

.btn-secondary {
  background-color: var(--color-text);
  color: #fff;
  border: 2px solid var(--color-text);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  background-color: #333;
  border-color: #333;
  color: #fff;
  transform: translateY(-1px);
}

/* ── Section shared ───────────────────────────────────────── */
section {
  padding-block: var(--space-lg);
}

.section-alt {
  background-color: var(--color-surface-alt);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.section-intro {
  max-width: 640px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* ── Header / Hero ────────────────────────────────────────── */
header {
  background-color: var(--color-bg);
  border-bottom: var(--border);
  padding-block: var(--space-xl);
  text-align: center;
}

/* Retro top rule */
header::before {
  content: "";
  display: block;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--color-accent) 0px,
    var(--color-accent) 12px,
    transparent 12px,
    transparent 16px
  );
  margin-bottom: var(--space-lg);
}

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.app-icon-placeholder {
  font-size: 2.5rem;
  line-height: 1;
}

/* Replace with real icon: <img src="icon.png" class="app-icon" /> */
.app-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
}

.app-wordmark {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.hero-headline {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  max-width: 700px;
  margin-inline: auto;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.55;
}

.coming-soon {
  display: inline-block;
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius);
}

/* ── Features grid ────────────────────────────────────────── */
.feature-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.feature-grid li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--radius);
}

.feature-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.feature-grid strong {
  font-size: 1rem;
  font-weight: 700;
}

.feature-grid span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ── Why list ─────────────────────────────────────────────── */
.why-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  max-width: 680px;
}

.why-list li {
  display: flex;
  gap: var(--space-sm);
  font-size: 1rem;
  line-height: 1.55;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.why-list li:last-child {
  border-bottom: none;
}

.bullet {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-accent);
  margin-top: 0.1em;
}

/* ── Screenshots ──────────────────────────────────────────── */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.screenshot-grid figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.screenshot-grid img {
  width: 100%;
  border: var(--border);
  border-radius: 12px;
  background-color: var(--color-surface-alt);
  /* Ensures placeholder box is visible before real images are added */
  min-height: 320px;
  object-fit: cover;
}

/* Shown when the image src 404s */
.screenshot-grid .placeholder-fig img {
  opacity: 0;
}
.screenshot-grid .placeholder-fig {
  position: relative;
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  min-height: 340px;
  background-color: var(--color-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.screenshot-grid .placeholder-fig::before {
  content: "📱 Screenshot\Acoming soon";  /* \A = newline in CSS content */
  white-space: pre;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1.8;
}

.screenshot-grid figcaption {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Pricing ──────────────────────────────────────────────── */
.pricing-container {
  text-align: center;
}

.pricing-box {
  display: inline-block;
  margin-top: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--radius);
  max-width: 480px;
  text-align: center;
}

.price-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.price-amount {
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.price-detail {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.price-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-sm);
}

/* ── Call to Action ───────────────────────────────────────── */
#cta {
  background-color: var(--color-accent-light);
  border-top: var(--border);
  border-bottom: var(--border);
}

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

.cta-container p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  font-size: 1.05rem;
}

/* ── Email Signup ─────────────────────────────────────────── */
.signup-container {
  max-width: 560px;
  text-align: center;
}

.signup-container p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.email-placeholder {
  margin-top: var(--space-sm);
}

.email-form {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  justify-content: center;
}

.email-form input[type="email"] {
  flex: 1 1 220px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  min-width: 0;
}

.email-form input[type="email"]:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-note {
  margin-top: var(--space-xs);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background-color: var(--color-text);
  color: #d8d4cc;
  padding-block: var(--space-lg);
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
}

.footer-links a {
  color: #c8c0ae;
  font-size: 0.875rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  color: #fff;
  border-bottom-color: #fff;
}

.footer-note {
  font-size: 0.8rem;
  color: #8a8478;
  max-width: 520px;
}

.footer-note.small {
  font-size: 0.72rem;
}

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 640px) {
  header {
    padding-block: var(--space-lg);
  }

  header::before {
    margin-bottom: var(--space-md);
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .screenshot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-box {
    padding: var(--space-md);
  }

  .btn-large {
    font-size: 1rem;
    padding: 0.85rem 1.75rem;
  }
}

@media (max-width: 400px) {
  .screenshot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .email-form {
    flex-direction: column;
  }

  .email-form input[type="email"],
  .email-form .btn-secondary {
    width: 100%;
  }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  header::before,
  .btn-primary,
  .btn-secondary,
  #signup {
    display: none;
  }
}
