/* ============================================================
   FeedTracker — Shared Stylesheet
   Design tokens sourced from AppColors.swift / AppTypography.swift
   ============================================================ */

/* --- Tokens ------------------------------------------------ */
:root {
  --bg:           #0F2E1F;
  --bg-card:      #163A2B;
  --bg-card-alt:  #1A3E2E;
  --border:       #1E4A36;
  --green:        #4ADE80;
  --green-dark:   #22C55E;
  --green-muted:  #2D6A4A;
  --text:         #FFFFFF;
  --text-muted:   #A7B3A9;
  --text-dim:     #3A5A4A;
  --red:          #EF4444;
  --amber:        #F59E0B;

  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    24px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-w: 1100px;
  --section-gap: 100px;
}

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

html { scroll-behavior: smooth; }

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

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

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Layout helpers --------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- NAV -------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 46, 31, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav__logo img {
  height: 32px;
  width: 32px;
  border-radius: 8px;
}

.nav__logo-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.nav__links a:hover { color: var(--text); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #0F2E1F;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav__cta:hover {
  background: var(--green-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Hamburger (mobile) */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
  padding: 12px 24px 20px;
}

.nav__mobile.open { display: flex; }

.nav__mobile a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile a:hover { color: var(--text); }

.nav__mobile .nav__cta {
  margin-top: 12px;
  align-self: flex-start;
}

/* --- HERO -------------------------------------------------- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

.hero__headline {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  max-width: 800px;
  margin: 0 auto 24px;
}

.hero__headline span { color: var(--green); }

.hero__sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #0F2E1F;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.25);
}

.btn-primary:hover {
  background: var(--green-dark);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(74, 222, 128, 0.35);
}

.btn-primary svg { flex-shrink: 0; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--green-muted);
  text-decoration: none;
}

/* Hero visual */
.hero__visual {
  max-width: 380px;
  margin: 0 auto;
  position: relative;
}

.hero__mockup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(74,222,128,0.08);
  aspect-ratio: 9 / 19;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 24px;
}

.hero__mockup-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.hero__mockup-placeholder img {
  width: 72px;
  height: 72px;
  opacity: 0.6;
}

.hero__mockup img.screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- FEATURES --------------------------------------------- */
.features {
  padding: var(--section-gap) 0;
}

.section-label {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}

.section-title {
  text-align: center;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 14px;
  line-height: 1.2;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 17px;
  max-width: 500px;
  margin: 0 auto 56px;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--green-muted);
  transform: translateY(-3px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  background: rgba(74, 222, 128, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
}

.feature-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.feature-card__body {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

.feature-card__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 14px;
  letter-spacing: 0.3px;
}

/* --- CTA BAND --------------------------------------------- */
.cta-band {
  padding: var(--section-gap) 0;
}

.cta-band__inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band__inner::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(74,222,128,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-band__title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}

.cta-band__sub {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 440px;
  margin: 0 auto 36px;
}

.cta-band__note {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 13px;
}

/* --- FOOTER ----------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.footer__logo img {
  height: 28px;
  width: 28px;
  border-radius: 6px;
}

.footer__logo-name {
  font-size: 15px;
  font-weight: 700;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  list-style: none;
}

.footer__links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.footer__links a:hover { color: var(--text); }

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

/* --- PAGE HEADER (inner pages) ---------------------------- */
.page-header {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 60px;
}

.page-header__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.page-header__title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.page-header__meta {
  color: var(--text-muted);
  font-size: 15px;
}

/* --- PROSE (legal pages) ---------------------------------- */
.prose {
  max-width: 720px;
  padding-bottom: 100px;
}

.prose h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-top: 48px;
  margin-bottom: 14px;
  color: var(--text);
}

.prose h3 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text);
}

.prose p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.75;
}

.prose ul, .prose ol {
  color: var(--text-muted);
  padding-left: 24px;
  margin-bottom: 16px;
}

.prose li {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.65;
}

.prose a { color: var(--green); }

.prose strong { color: var(--text); font-weight: 600; }

.prose .note {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* --- SUPPORT ---------------------------------------------- */
.support-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 100px;
}

.support-contact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: sticky;
  top: 84px;
}

.support-contact__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.support-contact__email {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 14px;
}

.support-contact__email span { color: var(--text-muted); }
.support-contact__email strong { color: var(--green); font-weight: 600; }

.support-contact__note {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.support-contact__version {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

/* FAQ */
.faq { }

.faq__section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
  margin-top: 40px;
  color: var(--text);
}

.faq__section-title:first-child { margin-top: 0; }

.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq__question {
  width: 100%;
  background: var(--bg-card);
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.15s;
}

.faq__question:hover { background: var(--bg-card-alt); }

.faq__chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq__item.open .faq__chevron { transform: rotate(180deg); }

.faq__answer {
  display: none;
  padding: 0 20px 18px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.faq__item.open .faq__answer { display: block; }

/* --- RESPONSIVE ------------------------------------------- */
@media (max-width: 768px) {
  :root { --section-gap: 64px; }

  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__hamburger { display: flex; }

  .hero { padding: 56px 0 48px; }
  .hero__mockup { max-width: 280px; }

  .cta-band__inner { padding: 48px 24px; }

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

  .support-contact {
    position: static;
  }
}

@media (max-width: 480px) {
  .hero__headline { letter-spacing: -0.8px; }
  .hero__actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
