/* NeroImage marketing site - plain CSS, mobile-first, no framework (§8.2). */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f6f7fb;
  --color-text: #1a1a2e;
  --color-text-muted: #565973;
  --color-primary: #4f46e5;
  --color-primary-dark: #3730a3;
  --color-accent: #16a34a;
  --color-border: #e2e4ee;
  --color-error: #b00020;
  --max-width: 1080px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
}

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

a { color: var(--color-primary); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 56px 0; }
section.alt { background: var(--color-bg-alt); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; text-align: center; margin-bottom: 8px; }
.section-subtitle { text-align: center; color: var(--color-text-muted); max-width: 620px; margin: 0 auto 32px; }

p { margin: 0 0 16px; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---- Top nav ---- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-nav .brand { display: flex; align-items: center; text-decoration: none; }
.site-nav .brand img { display: block; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(180deg, var(--color-bg-alt), var(--color-bg));
  padding: 40px 0 56px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
.hero-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 12px 0 20px;
}
.hero-price .amount { font-size: 1.7rem; }

/* Illustrative mockup of the app's Compress tab - not a real screenshot. */
.app-mockup {
  background: #1e1e2e;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 20px 50px rgba(20, 20, 40, 0.25);
}
.app-mockup .titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 12px;
}
.app-mockup .dot { width: 10px; height: 10px; border-radius: 50%; background: #55576b; }
.app-mockup .screen {
  background: #ffffff;
  border-radius: 8px;
  padding: 18px;
  color: var(--color-text);
  font-size: 0.85rem;
}
.app-mockup .row { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--color-text-muted); }
.app-mockup .progress-track { background: #eef0f8; border-radius: 6px; height: 10px; overflow: hidden; margin-bottom: 10px; }
.app-mockup .progress-fill { background: var(--color-accent); height: 100%; width: 92%; }
.app-mockup .stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; color: var(--color-text-muted); }
.app-mockup .stats strong { color: var(--color-text); }

/* ---- Features ---- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature-card p { color: var(--color-text-muted); margin: 0; font-size: 0.95rem; }

/* ---- Before/after ---- */
.before-after {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 520px;
  margin: 0 auto;
}
.ba-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.ba-card .size { font-size: 2rem; font-weight: 800; }
.ba-card.before .size { color: var(--color-text-muted); }
.ba-card.after .size { color: var(--color-accent); }
.ba-note { text-align: center; color: var(--color-text-muted); font-size: 0.9rem; margin-top: 12px; }

/* ---- How it works ---- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  counter-reset: step;
}
.step { text-align: center; }
.step .step-num {
  counter-increment: step;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  margin: 0 auto 10px;
}
.step .step-num::before { content: counter(step); }

/* ---- Pricing card ---- */
.pricing-card {
  max-width: 420px;
  margin: 0 auto;
  border: 2px solid var(--color-primary);
  border-radius: 14px;
  padding: 32px;
  text-align: center;
}
.pricing-card .price { font-size: 2.6rem; font-weight: 800; margin: 8px 0 4px; }
.pricing-card .price-note { color: var(--color-text-muted); margin-bottom: 20px; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; }
.pricing-card li { padding: 6px 0; }
.pricing-card li::before { content: "✓ "; color: var(--color-accent); font-weight: 700; }

/* ---- Checkout form ---- */
.checkout-form {
  max-width: 480px;
  margin: 0 auto;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.field input[type=text],
.field input[type=email],
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
}
.field-error {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 4px;
  display: none;
}
.field.has-error input, .field.has-error select { border-color: var(--color-error); }
.field.has-error .field-error { display: block; }
.phone-row { display: flex; gap: 8px; }
.phone-row select { flex: 0 0 110px; }
.phone-row input { flex: 1; }
.checkbox-field { display: flex; align-items: flex-start; gap: 8px; }
.checkbox-field input { margin-top: 4px; width: auto; }
.checkbox-field label { font-weight: 400; font-size: 0.9rem; }
.bot-protection-slot {
  min-height: 65px;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.form-message { margin-top: 14px; font-size: 0.9rem; }

/* ---- FAQ ---- */
.faq-item { border-bottom: 1px solid var(--color-border); padding: 16px 0; }
.faq-item summary { font-weight: 600; cursor: pointer; }
.faq-item p { margin-top: 10px; color: var(--color-text-muted); }

/* ---- Footer ---- */
.site-footer {
  background: #14142a;
  color: #c7c9e0;
  padding: 40px 0;
  font-size: 0.9rem;
}
.site-footer a { color: #c7c9e0; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer-links a { display: block; margin-bottom: 6px; }
.footer-note { margin-top: 24px; color: #8a8dad; font-size: 0.8rem; }

/* ---- Legal pages ---- */
.legal-content { max-width: 720px; margin: 0 auto; }
.legal-content h2 { text-align: left; margin-top: 28px; }
.legal-updated { color: var(--color-text-muted); font-size: 0.85rem; }

/* ---- Responsive ---- */
@media (min-width: 720px) {
  h1 { font-size: 2.6rem; }
  .hero .container { grid-template-columns: 1.1fr 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .before-after { grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 640px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
}

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

/* ---- Thank-you page (task 19) ---- */
.order-page { max-width: 640px; margin: 0 auto; }
.order-success { text-align: center; color: var(--color-accent); font-weight: 700; margin-bottom: 4px; }
.order-meta { text-align: center; color: var(--color-text-muted); margin-bottom: 28px; font-size: 0.9rem; }
.key-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}
.key-box code {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  word-break: break-all;
}
.key-copy-message { font-size: 0.85rem; color: var(--color-accent); min-height: 1.2em; margin-top: 8px; }
.activation-steps { counter-reset: astep; list-style: none; padding: 0; margin: 0 0 24px; }
.activation-steps li { position: relative; padding: 4px 0 4px 36px; }
.activation-steps li::before {
  counter-increment: astep;
  content: counter(astep);
  position: absolute; left: 0; top: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.sent-to-row { text-align: center; color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.resend-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.resend-row button { font-size: 0.85rem; padding: 8px 14px; }
.resend-message { text-align: center; font-size: 0.85rem; min-height: 1.2em; margin-bottom: 20px; }
.polling-box { text-align: center; padding: 40px 20px; }
.polling-spinner {
  width: 36px; height: 36px; margin: 0 auto 16px;
  border: 3px solid var(--color-border); border-top-color: var(--color-primary);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
