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

:root {
  --bg: #0D0D0D;
  --bg-surface: #151515;
  --bg-card: #1A1A1A;
  --border: #2A2A2A;
  --text: #F0F0F0;
  --text-muted: #888;
  --text-dim: #555;
  --accent: #FF6B35;
  --accent-hover: #FF8555;
  --accent-dim: rgba(255, 107, 53, 0.12);
  --green: #4CAF50;
  --yellow: #FFC107;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; }

/* ============================================================
   Typography
   ============================================================ */
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; line-height: 1.1; letter-spacing: -1px; }
h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 700; line-height: 1.2; }
h3 { font-size: clamp(18px, 2.5vw, 24px); font-weight: 600; }

.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-dim); }

.btn-full { width: 100%; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,107,53,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,53,0.3);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero h1 { margin-bottom: 20px; }

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 520px;
  line-height: 1.7;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat-item { }
.stat-value { font-size: 28px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* Phone mockup */
.phone-mockup {
  display: flex;
  justify-content: center;
}

.phone {
  width: 240px;
  height: 480px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 36px;
  padding: 20px 12px;
  position: relative;
  box-shadow: var(--shadow), 0 0 60px rgba(255,107,53,0.06);
}

.phone::before {
  content: '';
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 6px;
  background: var(--border);
  border-radius: 3px;
}

.phone-screen {
  background: #111;
  border-radius: 24px;
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.phone-header { font-size: 12px; font-weight: 700; color: var(--text-muted); text-align: center; }

.phone-food-img {
  height: 120px;
  background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.phone-result {
  background: var(--bg-surface);
  border-radius: 10px;
  padding: 12px;
}

.phone-result-name { font-size: 13px; font-weight: 600; margin-bottom: 8px; }

.phone-macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.macro-item { text-align: center; }
.macro-val { font-size: 14px; font-weight: 700; color: var(--accent); }
.macro-key { font-size: 9px; color: var(--text-muted); }

.phone-scan-btn {
  background: var(--accent);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  margin-top: auto;
}

/* ============================================================
   Steps
   ============================================================ */
.steps { background: var(--bg-surface); }

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.section-title { margin-bottom: 16px; }
.section-sub { color: var(--text-muted); font-size: 18px; max-width: 560px; }

.section-header { margin-bottom: 56px; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  transition: border-color var(--transition), transform var(--transition);
}

.step-card:hover { border-color: rgba(255,107,53,0.4); transform: translateY(-2px); }

.step-number {
  position: absolute;
  top: -14px; left: 28px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}

.step-icon { font-size: 40px; margin-bottom: 20px; display: block; }
.step-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.step-desc { color: var(--text-muted); font-size: 15px; line-height: 1.6; }

/* ============================================================
   Features
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: border-color var(--transition);
}

.feature-card:hover { border-color: rgba(255,107,53,0.3); }

.feature-icon { font-size: 32px; flex-shrink: 0; }
.feature-text h3 { font-size: 17px; margin-bottom: 6px; }
.feature-text p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ============================================================
   Pricing
   ============================================================ */
.pricing { background: var(--bg-surface); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
}

.plan-card.featured {
  border-color: var(--accent);
  position: relative;
  background: linear-gradient(180deg, rgba(255,107,53,0.05) 0%, var(--bg-card) 100%);
}

.plan-badge {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

.plan-name { font-size: 14px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.plan-price { margin-bottom: 8px; }
.plan-price .amount { font-size: 48px; font-weight: 800; line-height: 1; }
.plan-price .currency { font-size: 24px; font-weight: 700; vertical-align: super; }
.plan-period { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.plan-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

.plan-features li.muted {
  color: var(--text-muted);
}
.plan-features li.muted::before { color: var(--text-dim); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color var(--transition);
}

.faq-question:hover { color: var(--accent); }

.faq-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

.footer-links a { color: var(--text-muted); font-size: 14px; }
.footer-links a:hover { color: var(--text); }

.footer-copy { color: var(--text-dim); font-size: 13px; }

/* ============================================================
   Buy page
   ============================================================ */
.buy-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.buy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 480px;
}

.buy-card h1 { font-size: 28px; margin-bottom: 4px; }
.buy-price { font-size: 56px; font-weight: 800; color: var(--accent); line-height: 1; margin: 16px 0 4px; }
.buy-price-note { color: var(--text-muted); font-size: 15px; margin-bottom: 28px; }

.buy-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.buy-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.buy-features li::before { content: '✓'; color: var(--green); font-weight: 700; }

.contact-type-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.form-group { margin-bottom: 16px; }

.form-input {
  width: 100%;
  padding: 13px 16px;
  background: #111;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  transition: border-color var(--transition);
  font-family: inherit;
}

.form-input:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--text-dim); }
.form-input.error { border-color: #f44336; }

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
  line-height: 1.6;
  text-align: center;
}

.form-error {
  color: #f44336;
  font-size: 13px;
  margin-top: 10px;
  display: none;
}

.btn-loader {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Success page
   ============================================================ */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.success-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.checkmark-wrap { margin-bottom: 24px; }

.checkmark {
  width: 72px;
  height: 72px;
}

.checkmark-circle {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: dashCircle 0.6s cubic-bezier(0.65,0,0.45,1) forwards;
}

.checkmark-check {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: dashCheck 0.35s 0.5s ease forwards;
}

@keyframes dashCircle { to { stroke-dashoffset: 0; } }
@keyframes dashCheck  { to { stroke-dashoffset: 0; } }

.success-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.success-sub { color: var(--text-muted); font-size: 15px; margin-bottom: 32px; }

.spinner-wrap { padding: 32px 0; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
.spinner-text { color: var(--text-muted); font-size: 14px; }

.code-block-wrap {
  display: none;
  margin-bottom: 28px;
}

.code-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; text-align: left; }

.code-block {
  display: flex;
  align-items: center;
  background: #111;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  gap: 12px;
}

.code-value {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text);
  flex: 1;
  text-align: center;
}

.btn-copy {
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,53,0.3);
  color: var(--accent);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-copy:hover { background: rgba(255,107,53,0.2); }

.success-steps {
  text-align: left;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 24px;
  display: none;
}

.success-steps h3 { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

.success-steps ol {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.success-steps ol li {
  counter-increment: steps;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.success-steps ol li::before {
  content: counter(steps);
  width: 22px; height: 22px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,53,0.3);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.warning-block {
  display: none;
  background: rgba(255,193,7,0.08);
  border: 1px solid rgba(255,193,7,0.25);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--yellow);
  text-align: left;
  margin-bottom: 24px;
}

.pending-msg {
  color: var(--text-muted);
  font-size: 14px;
  padding: 8px 0;
  display: none;
}

/* ============================================================
   Utilities
   ============================================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .phone-mockup { display: none; }
  .hero-stats { gap: 24px; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
}

@media (max-width: 480px) {
  section { padding: 56px 0; }
  .buy-card, .success-card { padding: 28px 20px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; text-align: center; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .code-value { font-size: 18px; letter-spacing: 2px; }
}
