/* === AI Writing Deals — Shared Stylesheet === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-card: #1e1e1e;
  --bg-card-hover: #252525;
  --text-primary: #f5f5f0;
  --text-secondary: #a8a8a0;
  --text-muted: #6b6b65;
  --accent: #d4a83c;
  --accent-hover: #e6b94a;
  --accent-dim: #8a6e28;
  --green: #4ade80;
  --red: #f87171;
  --border: #2a2a28;
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: 'Geist', system-ui, -apple-system, sans-serif;
  --font-heading: 'DM Sans', sans-serif;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* === Header === */
header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(15,15,15,0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}
.logo-icon {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  color: #0f0f0f;
  font-family: var(--font-heading);
}
.logo-text {
  font-family: var(--font-heading);
  font-weight: 700; font-size: 20px;
  letter-spacing: -0.3px;
}
.logo-text span { color: var(--accent); }
nav { display: flex; gap: 32px; align-items: center; }
nav a {
  color: var(--text-secondary);
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: color 0.2s;
}
nav a:hover { color: var(--text-primary); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 4px; z-index: 101;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 100px;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none; cursor: pointer;
}
.btn-primary {
  background: var(--accent); color: #0f0f0f;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,168,60,0.2);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--accent-dim);
  background: rgba(212,168,60,0.05);
}
.btn-sm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: 100px;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-primary-sm {
  background: var(--accent); color: #0f0f0f;
}
.btn-primary-sm:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-disabled-sm {
  background: var(--bg-card-hover); color: var(--text-muted);
  pointer-events: none;
}

/* === Tags === */
.tag {
  display: inline-block; padding: 2px 10px;
  border-radius: 100px; font-size: 12px; font-weight: 600;
}
.tag-best { background: rgba(74,222,128,0.15); color: var(--green); }
.tag-good { background: rgba(212,168,60,0.15); color: var(--accent); }
.tag-closed { background: rgba(248,113,113,0.15); color: var(--red); }

/* === Sections === */
section { padding: 64px 0; }
.section-label {
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 36px; font-weight: 700;
  letter-spacing: -0.8px; margin-bottom: 16px;
}
.section-subtitle {
  font-size: 16px; color: var(--text-secondary);
  max-width: 600px; margin-bottom: 48px;
}

/* === Responsive Tables === */
.table-wrap, table {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}
table { display: table; min-width: 600px; }
@media (max-width: 768px) {
  .table-wrap, .comparison-table, .pricing-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
/* === Pricing Table === */
.pricing-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden;
}
.pricing-table th {
  text-align: left; padding: 20px 24px;
  background: var(--bg-secondary);
  font-family: var(--font-heading); font-weight: 600;
  font-size: 14px; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.pricing-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.pricing-table tr:last-child td { border-bottom: none; }
.pricing-table tr:hover td { background: var(--bg-card-hover); }
.pricing-table .tool-name {
  font-family: var(--font-heading); font-weight: 600; font-size: 16px;
}
.price-best { color: var(--green); font-weight: 600; }
.price-high { color: var(--red); font-weight: 500; }
.price-mid { color: var(--accent); font-weight: 500; }

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px; margin-top: 64px;
}
footer .container {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 16px;
}
footer p { font-size: 13px; color: var(--text-muted); }
footer a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 13px; transition: color 0.2s;
}
footer a:hover { color: var(--text-primary); }
.footer-links { display: flex; gap: 24px; }

/* === Newsletter === */
.newsletter-signup {
  background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(124,58,237,0.02));
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: 14px; padding: 36px;
  margin: 40px auto 0; max-width: 560px; text-align: center;
}
.newsletter-signup h4 { font-size: 18px; margin-bottom: 8px; }
.newsletter-signup p { font-size: 14px; color: #a1a1aa; margin-bottom: 20px; }
.newsletter-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  padding: 12px 18px; border-radius: 8px;
  border: 1px solid #333; background: #0a0a0b;
  color: #e4e4e7; font-size: 14px; min-width: 260px; outline: none;
}
.newsletter-form button {
  padding: 12px 28px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff; border: none; border-radius: 8px;
  font-weight: 700; font-size: 14px; cursor: pointer;
  transition: all 0.2s;
}
.newsletter-form button:hover { opacity: 0.9; }
.newsletter-msg { display: none; margin-top: 12px; font-size: 14px; }

/* === Mobile === */
@media (max-width: 768px) {
  section { padding: 40px 0; }
  .section-title { font-size: 28px; }
  .hamburger { display: flex; }
  nav {
    position: fixed; top: 0; right: -100%;
    width: 280px; height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column; padding: 88px 32px 32px; gap: 0;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border); z-index: 100;
  }
  nav.open { right: 0; }
  nav a {
    font-size: 16px; padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 99;
  }
  .nav-overlay.open { display: block; }
}

/* === Related Articles === */
.related-articles {
  max-width: 900px; margin: 60px auto 0; padding: 0 20px;
}
.related-articles h3 {
  font-family: var(--font-heading); font-size: 18px;
  margin-bottom: 16px; color: var(--text-primary);
}
.related-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.related-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px; text-decoration: none;
  color: inherit; transition: all 0.2s; display: block;
}
.related-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.related-card h4 {
  font-family: var(--font-heading); font-size: 15px; font-weight: 600;
  margin-bottom: 6px; color: var(--text-primary);
}
.related-card p {
  font-size: 13px; color: var(--text-muted);
}
