/* =============================================
   Ranking Atlas AEO — styles.css
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- Custom Properties --- */
:root {
  --purple:       #6B5BF4;
  --purple-light: #8B7BF6;
  --purple-dark:  #5445D4;
  --purple-bg:    #F0EEFF;
  --dark:         #0D0B1E;
  --dark-card:    #1A1730;
  --white:        #FFFFFF;
  --off-white:    #F8F7FF;
  --text-dark:    #111827;
  --text-body:    #374151;
  --text-muted:   #6B7280;
  --border:       #E5E7EB;
  --border-light: #F3F4F6;
  --radius:       8px;
  --radius-lg:    14px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-hover: 0 4px 12px rgba(107,91,244,.18), 0 8px 32px rgba(107,91,244,.10);
  --max-w:        1160px;
  --section-gap:  96px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-body);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

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

/* --- Typography --- */
h1, h2, h3, h4 {
  color: var(--text-dark);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { line-height: 1.75; }
.accent { color: var(--purple); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}
.btn-primary:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(107,91,244,.35);
}
.btn-outline {
  background: transparent;
  color: var(--text-dark);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}
.btn-sm { padding: 9px 18px; font-size: 0.875rem; }

/* =============================================
   NAV
   ============================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}
.nav-logo .logo-mark {
  width: 32px;
  height: 32px;
  background: var(--purple);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-logo .logo-mark svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: white;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text-dark); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; cursor: pointer; padding: 6px; }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.2s;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  padding: 80px 0 96px;
  background: var(--white);
  text-align: center;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--purple-bg);
  color: var(--purple);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero-label .dot {
  width: 6px;
  height: 6px;
  background: var(--purple);
  border-radius: 50%;
}
.hero h1 {
  max-width: 800px;
  margin: 0 auto 20px;
}
.hero-sub {
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.hero-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.hero-pill svg {
  width: 16px;
  height: 16px;
  stroke: var(--purple);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* =============================================
   SECTION LABELS
   ============================================= */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 12px;
}
.section-intro {
  max-width: 600px;
  color: var(--text-muted);
  margin-top: 12px;
}
.section-intro.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* =============================================
   WHAT WE COVER (3-col)
   ============================================= */
.covers {
  padding: var(--section-gap) 0;
  background: var(--off-white);
}
.covers-header {
  text-align: center;
  margin-bottom: 56px;
}
.covers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cover-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.cover-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.cover-icon {
  width: 44px;
  height: 44px;
  background: var(--purple-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.cover-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--purple);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cover-card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.cover-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }

/* =============================================
   DARK SECTION
   ============================================= */
.dark-section {
  background: var(--dark);
  padding: var(--section-gap) 0;
  color: var(--white);
}
.dark-section h2 { color: var(--white); }
.dark-section .section-label { color: var(--purple-light); }
.dark-section .section-intro { color: rgba(255,255,255,0.6); }
.dark-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.dark-card {
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.dark-card h4 {
  color: var(--white);
  margin-bottom: 10px;
  font-size: 1rem;
}
.dark-card p {
  color: rgba(255,255,255,0.55);
  font-size: 0.875rem;
  line-height: 1.65;
}
.dark-stat {
  font-size: 2rem;
  font-weight: 900;
  color: var(--purple-light);
  display: block;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

/* =============================================
   ALL ARTICLES (3-col grid)
   ============================================= */
.posts-section {
  padding: var(--section-gap) 0;
}
.posts-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 20px;
  flex-wrap: wrap;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  background: var(--white);
}
.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.post-card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--purple-bg) 0%, #e0d8ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.post-card-body { padding: 24px; }
.post-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--purple);
  margin-bottom: 10px;
}
.post-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--text-dark);
}
.post-card h3 a { color: inherit; }
.post-card h3 a:hover { color: var(--purple); }
.post-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.post-meta .divider { color: var(--border); }

/* =============================================
   LINK HUB
   ============================================= */
.link-hub {
  padding: var(--section-gap) 0;
  background: var(--off-white);
}
.link-hub-header {
  margin-bottom: 40px;
}
.link-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.link-hub-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.link-hub-card:hover {
  border-color: var(--purple);
  box-shadow: 0 2px 12px rgba(107,91,244,0.12);
  transform: translateY(-1px);
}
.link-hub-icon {
  width: 36px;
  height: 36px;
  background: var(--purple-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}
.link-hub-card-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-dark);
  margin-bottom: 3px;
  display: block;
}
.link-hub-card-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* =============================================
   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; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-band .btn-primary { font-size: 1rem; padding: 15px 32px; }

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 48px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 28px;
}
.footer-brand p {
  color: rgba(255,255,255,0.45);
  font-size: 0.875rem;
  margin-top: 14px;
  max-width: 300px;
  line-height: 1.65;
}
.footer-brand .nav-logo { color: var(--white); }
.footer-col h5 {
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.45);
  font-size: 0.875rem;
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-bottom p {
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
}
.footer-bottom a {
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  transition: color 0.15s;
}
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

/* =============================================
   BLOG PAGE
   ============================================= */
.blog-hero {
  padding: 64px 0 56px;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}
.blog-list {
  padding: 64px 0 var(--section-gap);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.blog-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.blog-card-img {
  height: 200px;
  background: linear-gradient(135deg, var(--purple-bg) 0%, #ddd6ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.blog-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--text-dark);
}
.blog-card h2 a { color: inherit; }
.blog-card h2 a:hover { color: var(--purple); }
.blog-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex: 1;
  line-height: 1.7;
}
.blog-card .read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--purple);
}
.blog-card .read-link:hover { text-decoration: underline; }

/* =============================================
   ARTICLE / POST
   ============================================= */
.article-hero {
  padding: 64px 0 56px;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}
.article-hero .section-label { display: block; margin-bottom: 16px; }
.article-hero h1 { max-width: 780px; margin-bottom: 20px; }
.article-hero .article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 24px;
}
.article-hero .article-meta a { color: var(--purple); font-weight: 500; }
.article-hero .article-meta .sep { color: var(--border); }
.article-hero .byline-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}
.article-body p { margin-bottom: 24px; font-size: 1.05rem; line-height: 1.8; }
.article-body h2 {
  font-size: 1.6rem;
  margin: 48px 0 16px;
  padding-top: 8px;
}
.article-body h3 {
  font-size: 1.2rem;
  margin: 36px 0 14px;
}
.article-body ul, .article-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-body);
}
.article-body a {
  color: var(--purple);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(107,91,244,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.article-body a:hover { text-decoration-color: var(--purple); }
.post-content a {
  color: var(--purple);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(107,91,244,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.post-content a:hover { text-decoration-color: var(--purple); }

/* POST HEADER (AEO article pages) */
.post-header {
  padding: 64px 0 56px;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}
.post-header .post-tag { display: block; margin-bottom: 14px; }
.post-header h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.post-header .post-meta { margin-top: 20px; }

/* POST BODY + CONTENT (AEO article pages) */
.post-body { padding: 64px 0 96px; }
.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}
.post-content p {
  margin-bottom: 22px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-body);
}
.post-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 52px 0 14px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.post-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 36px 0 12px;
  line-height: 1.3;
}
.post-content ul,
.post-content ol {
  margin-bottom: 24px;
  padding-left: 22px;
}
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-body);
}
.post-content strong { color: var(--text-dark); font-weight: 600; }
.post-content blockquote {
  border-left: 4px solid var(--purple);
  padding: 16px 24px;
  background: var(--purple-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 32px 0;
  font-style: italic;
  color: var(--text-dark);
}

.article-body blockquote {
  border-left: 4px solid var(--purple);
  padding: 16px 24px;
  background: var(--purple-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 32px 0;
  font-style: italic;
  color: var(--text-dark);
}
.article-body .callout {
  background: var(--purple-bg);
  border: 1px solid rgba(107,91,244,0.2);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}
.article-body .callout p { margin-bottom: 0; font-size: 0.95rem; }
.article-cta {
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 48px 0;
  text-align: center;
}
.article-cta h3 { color: var(--white); margin-bottom: 10px; font-size: 1.3rem; }
.article-cta p { color: rgba(255,255,255,0.6); margin-bottom: 24px; font-size: 0.95rem; }
.related-posts {
  border-top: 1px solid var(--border);
  padding: 48px 24px 80px;
  max-width: 760px;
  margin: 0 auto;
}
.related-posts h3 { font-size: 1.2rem; margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.related-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s;
}
.related-card:hover { border-color: var(--purple); }
.related-card .post-tag { margin-bottom: 6px; }
.related-card h4 { font-size: 0.95rem; line-height: 1.45; }
.related-card h4 a { color: var(--text-dark); }
.related-card h4 a:hover { color: var(--purple); }

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--purple); }
.breadcrumb span { color: var(--border); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .covers-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .dark-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .link-hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  :root { --section-gap: 64px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .covers-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .posts-header { flex-direction: column; align-items: flex-start; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .article-cta { padding: 28px 20px; }
  .link-hub-grid { grid-template-columns: 1fr; }
}
