/*
Theme Name: Afflyr
Theme URI: https://afflyr.com
Description: Afflyr — Affiliate tracking plugin storefront theme
Version: 1.0.0
Author: Antigravity
*/

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

:root {
  --violet:       #6C3FE8;
  --violet-light: #8B5CF6;
  --violet-pale:  #EDE9FE;
  --dark:         #1A1A2E;
  --dark-mid:     #2D2D44;
  --gray:         #6B7280;
  --gray-light:   #E5E7EB;
  --bg:           #FAFAFA;
  --white:        #FFFFFF;
  --green:        #10B981;
  --red:          #EF4444;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 4px 24px rgba(108,63,232,0.10);
  --shadow-lg:    0 8px 48px rgba(108,63,232,0.16);
  --transition:   0.2s ease;
}

html { scroll-behavior: smooth; }

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

a { color: var(--violet); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--violet-light); }

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

/* ── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--gray); line-height: 1.7; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--violet);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(108,63,232,0.35);
}
.btn-primary:hover {
  background: var(--violet-light);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(108,63,232,0.45);
}
.btn-outline {
  background: transparent;
  color: var(--violet);
  border: 2px solid var(--violet);
}
.btn-outline:hover {
  background: var(--violet);
  color: var(--white);
}
.btn-ghost {
  background: transparent;
  color: var(--dark);
  padding: 14px 20px;
}
.btn-ghost:hover { color: var(--violet); background: var(--violet-pale); }
.btn-lg { padding: 18px 36px; font-size: 1.1rem; }

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,250,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-light);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
}
.nav-logo img { height: 36px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--gray);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
}
.nav-links a:hover { color: var(--dark); background: var(--gray-light); }
.nav-links a.active { color: var(--violet); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--dark); border-radius: 2px;
  margin: 5px 0; transition: all var(--transition);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(108,63,232,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--violet-pale);
  color: var(--violet);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 { max-width: 820px; margin: 0 auto 24px; }
.hero h1 span { color: var(--violet); }
.hero-sub {
  font-size: 1.2rem;
  max-width: 560px;
  margin: 0 auto 40px;
  color: var(--gray);
}
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 0.875rem; color: var(--gray); }
.hero-img {
  margin: 64px auto 0;
  max-width: 960px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-light);
  overflow: hidden;
  background: var(--white);
}

/* ── Social Proof Bar ─────────────────────────────────────────────────────── */
.proof-bar {
  background: var(--white);
  border-top: 1px solid var(--gray-light);
  border-bottom: 1px solid var(--gray-light);
  padding: 24px 0;
}
.proof-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.proof-stat { text-align: center; }
.proof-stat strong { display: block; font-size: 1.5rem; color: var(--dark); }
.proof-stat span { font-size: 0.875rem; color: var(--gray); }

/* ── Features Grid ────────────────────────────────────────────────────────── */
.section-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.section-title { margin-bottom: 16px; }
.section-sub { font-size: 1.1rem; max-width: 540px; }
.section-header { margin-bottom: 56px; }
.section-header.centered { text-align: center; }
.section-header.centered .section-sub { margin: 0 auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
}
.feature-card:hover {
  border-color: var(--violet-light);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px; height: 48px;
  background: var(--violet-pale);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}
.feature-card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.feature-card p { font-size: 0.95rem; }

/* ── Comparison Table ─────────────────────────────────────────────────────── */
.comparison-section { background: var(--white); }
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.comparison-table th {
  padding: 20px 24px;
  text-align: left;
  font-size: 1rem;
  background: var(--dark);
  color: var(--white);
}
.comparison-table th.highlight { background: var(--violet); }
.comparison-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-light);
  font-size: 0.95rem;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: var(--bg); }
.comparison-table .check { color: var(--green); font-weight: 700; }
.comparison-table .cross { color: var(--red); }
.comparison-table .col-afflyr { font-weight: 600; color: var(--violet); }

/* ── Pricing ──────────────────────────────────────────────────────────────── */
.pricing-section { background: var(--bg); }
.billing-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 100px;
  padding: 4px;
  margin-bottom: 48px;
}
.billing-toggle button {
  padding: 8px 24px;
  border-radius: 100px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--gray);
  transition: all var(--transition);
}
.billing-toggle button.active {
  background: var(--violet);
  color: var(--white);
  font-weight: 600;
}
.billing-toggle .save-badge {
  background: var(--green);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 6px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 840px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--white);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
}
.pricing-card.featured {
  border-color: var(--violet);
  box-shadow: var(--shadow-lg);
}
.pricing-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--violet);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 100px;
  white-space: nowrap;
}
.pricing-tier { font-size: 0.875rem; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.pricing-price { margin-bottom: 4px; }
.pricing-price .amount { font-size: 3rem; font-weight: 800; color: var(--dark); line-height: 1; }
.pricing-price .period { font-size: 1rem; color: var(--gray); margin-left: 4px; }
.pricing-price .annual-note { font-size: 0.85rem; color: var(--gray); margin-top: 4px; display: block; }
.pricing-desc { font-size: 0.95rem; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--gray-light); }
.pricing-features { list-style: none; margin-bottom: 32px; }
.pricing-features li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--dark);
}
.pricing-features li .icon { color: var(--green); font-weight: 700; margin-top: 2px; flex-shrink: 0; }
.pricing-features li .icon.no { color: var(--gray); }
.pricing-card .btn { width: 100%; justify-content: center; }

/* ── Testimonials ─────────────────────────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 28px;
}
.testimonial-stars { color: #F59E0B; font-size: 1.1rem; margin-bottom: 14px; }
.testimonial-text { font-size: 0.95rem; color: var(--dark); line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--violet-pale);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--violet); font-size: 0.9rem;
}
.testimonial-name { font-weight: 600; font-size: 0.9rem; color: var(--dark); }
.testimonial-role { font-size: 0.8rem; color: var(--gray); }

/* ── CTA Band ─────────────────────────────────────────────────────────────── */
.cta-band {
  background: var(--dark);
  padding: 80px 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); margin-bottom: 16px; }
.cta-band p { color: rgba(255,255,255,0.6); margin-bottom: 36px; font-size: 1.1rem; }
.cta-band .btn-primary { font-size: 1.1rem; padding: 18px 40px; }
.cta-band .guarantee { margin-top: 16px; font-size: 0.875rem; color: rgba(255,255,255,0.4); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  border-top: 1px solid var(--dark-mid);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p { color: rgba(255,255,255,0.5); font-size: 0.9rem; margin-top: 12px; max-width: 260px; }
.footer-col h4 { color: var(--white); font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.5); font-size: 0.9rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--dark-mid);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.3);
}
.footer-logo { display: flex; align-items: center; gap: 8px; }
.footer-logo img { height: 28px; }
.footer-logo span { color: var(--white); font-weight: 700; font-size: 1.1rem; }

/* ── Page Header ──────────────────────────────────────────────────────────── */
.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
  padding: 64px 0 48px;
  text-align: center;
}
.page-header h1 { margin-bottom: 12px; }
.page-header p { font-size: 1.1rem; max-width: 560px; margin: 0 auto; }

/* ── Docs / Support ───────────────────────────────────────────────────────── */
.docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.doc-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
}
.doc-card:hover { border-color: var(--violet); box-shadow: var(--shadow); transform: translateY(-2px); }
.doc-card .doc-icon { font-size: 2rem; margin-bottom: 14px; }
.doc-card h3 { color: var(--dark); margin-bottom: 8px; font-size: 1.05rem; }
.doc-card p { font-size: 0.9rem; }

/* ── Changelog ────────────────────────────────────────────────────────────── */
.changelog-entry { border-left: 3px solid var(--violet); padding-left: 28px; margin-bottom: 48px; }
.changelog-version { font-size: 1.3rem; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.changelog-date { font-size: 0.875rem; color: var(--gray); margin-bottom: 16px; }
.changelog-items { list-style: none; }
.changelog-items li { padding: 6px 0; font-size: 0.95rem; color: var(--dark); display: flex; align-items: flex-start; gap: 10px; }
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.tag-new { background: #DCFCE7; color: #166534; }
.tag-fix { background: #FEF3C7; color: #92400E; }
.tag-pro { background: var(--violet-pale); color: var(--violet); }

/* ── Support Form ─────────────────────────────────────────────────────────── */
.support-form {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 40px;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--dark); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--dark);
  background: var(--bg);
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--violet); background: var(--white); }
.form-group textarea { resize: vertical; min-height: 140px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .docs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .nav-links, .nav-cta .btn-outline { display: none; }
  .nav-hamburger { display: block; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 440px; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .docs-grid { grid-template-columns: 1fr; }
  .comparison-table { font-size: 0.85rem; }
  .comparison-table th, .comparison-table td { padding: 12px 14px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .proof-inner { gap: 24px; }
}
