/*
Theme Name: ToolAtlasHQ v3
Theme URI: https://toolatlashq.com
Description: Independent Shopify App Guide — Blog & Review Theme
Version: 3.0
Author: ToolAtlasHQ
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg: #faf8f4;
  --ink: #1a1814;
  --muted: #6b6560;
  --accent: #e85d2f;
  --accent-soft: #fdf0eb;
  --accent2: #2f6ee8;
  --accent2-soft: #ebf0fd;
  --accent3: #1e8a4a;
  --accent3-soft: #edfaf3;
  --accent4: #6e35d9;
  --accent4-soft: #f3eeff;
  --border: #e8e4de;
  --card-bg: #ffffff;
  --max-width: 1200px;
  --post-width: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── NAV ─── */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 52px;
  height: 68px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-logo { display: flex; align-items: baseline; }

.logo-tool {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.logo-atlas {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.logo-hq {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 2px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 5px;
  margin-bottom: 3px;
  opacity: 0.6;
  align-self: flex-end;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--ink); }

.nav-cta {
  background: var(--ink) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 500 !important;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--accent) !important; }

/* ─── HERO ─── */
.hero {
  padding: 96px 52px 80px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 80px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 4.5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero h1 em { font-style: italic; color: var(--accent); }

.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 460px;
  margin-bottom: 40px;
}

.hero-actions { display: flex; gap: 16px; align-items: center; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 13px 28px;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-ghost {
  color: var(--ink);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

.btn-ghost:hover { gap: 10px; }

/* Stats panel */
.hero-stats {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.05);
}

.stat-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-row:last-child { border-bottom: none; padding-bottom: 0; }
.stat-row:first-child { padding-top: 0; }
.stat-label { font-size: 0.85rem; color: var(--muted); }

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
}

.stat-value span {
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--accent);
  font-weight: 500;
  margin-left: 4px;
}

/* ─── TICKER ─── */
.ticker {
  background: var(--ink);
  padding: 11px 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  gap: 40px;
  animation: ticker 28s linear infinite;
}

.ticker-item {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.ticker-item strong { color: var(--accent); }

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── SECTION ─── */
.home-section {
  padding: 72px 52px;
  border-bottom: 1px solid var(--border);
}

.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
}

.see-all {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.see-all:hover { gap: 8px; }

/* ─── CARDS ─── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.09);
}

.card-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}

.card-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  width: fit-content;
}

.card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  line-height: 1.25;
  font-weight: 700;
}

.card-sm h2 { font-size: 1.15rem; }
.card h2 em { font-style: italic; color: var(--accent); }

.card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: auto;
}

.read-more {
  font-weight: 500;
  color: var(--accent);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.card:hover .read-more { gap: 8px; }

/* Category colors */
.cat-support   { background: var(--accent-soft);  color: var(--accent);  }
.cat-personal  { background: var(--accent2-soft); color: var(--accent2); }
.cat-email     { background: var(--accent3-soft); color: var(--accent3); }
.cat-reviews   { background: var(--accent4-soft); color: var(--accent4); }
.cat-upsell    { background: var(--accent-soft);  color: var(--accent);  }
.cat-guide     { background: var(--accent2-soft); color: var(--accent2); }
.cat-compare   { background: var(--accent3-soft); color: var(--accent3); }
.cat-default   { background: var(--accent-soft);  color: var(--accent);  }

.bar-support  { background: var(--accent); }
.bar-personal { background: var(--accent2); }
.bar-email    { background: var(--accent3); }
.bar-reviews  { background: var(--accent4); }
.bar-upsell   { background: var(--accent); }
.bar-guide    { background: var(--accent2); }
.bar-compare  { background: var(--accent3); }
.bar-default  { background: var(--accent); }

/* Grids */
.grid-featured { display: grid; grid-template-columns: 1.65fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* ─── NEWSLETTER ─── */
.newsletter {
  background: var(--ink);
  padding: 96px 52px;
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.nl-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
}

.nl-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(232,93,47,0.15);
  border: 1px solid rgba(232,93,47,0.3);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.nl-inner h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
}

.nl-inner h2 em { color: var(--accent); font-style: italic; }
.nl-inner > div > p { color: #7a7570; font-size: 0.95rem; line-height: 1.75; }

.nl-form { display: flex; flex-direction: column; gap: 12px; }

.nl-form input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 14px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: #fff;
  outline: none;
  transition: border 0.2s;
  font-weight: 300;
  width: 100%;
}

.nl-form input::placeholder { color: #3a3530; }
.nl-form input:focus { border-color: var(--accent); }

.nl-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  width: 100%;
}

.nl-form button:hover { opacity: 0.85; transform: translateY(-1px); }
.nl-note { font-size: 0.76rem; color: #3a3530; text-align: center; }

/* ─── SINGLE POST ─── */
.post-wrap {
  max-width: var(--post-width);
  margin: 0 auto;
  padding: 80px 32px 120px;
}

.post-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.post-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.post-title em { font-style: italic; color: var(--accent); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  font-size: 0.82rem;
  color: var(--muted);
}

.post-meta-dot { color: var(--border); }

.post-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border);
  line-height: 1.75;
}

.post-content p {
  font-size: 1.05rem;
  margin-bottom: 28px;
  color: #2d2a26;
  line-height: 1.8;
}

.post-content > p:first-child::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 4.2rem;
  font-weight: 700;
  float: left;
  line-height: 0.8;
  margin: 8px 12px 0 0;
  color: var(--accent);
}

.post-content .highlight {
  background: linear-gradient(180deg, transparent 60%, rgba(232,93,47,0.15) 60%);
  font-weight: 500;
}

.post-content .callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  margin: 36px 0;
  border-radius: 0 8px 8px 0;
}

.post-content .callout p { margin: 0; font-size: 1rem; }
.post-content .callout strong { color: var(--accent); }

.post-content .section-break {
  text-align: center;
  color: var(--border);
  font-size: 1.4rem;
  margin: 44px 0;
  letter-spacing: 8px;
}

.verdict {
  margin-top: 52px;
  padding: 40px;
  background: var(--ink);
  border-radius: 12px;
}

.verdict h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 14px;
  color: #fff;
}

.verdict p { font-size: 0.95rem; color: #c4bfb8; line-height: 1.75; margin-bottom: 0 !important; }

.cta-btn {
  display: inline-block;
  margin-top: 22px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  padding: 12px 24px;
  border-radius: 6px;
  transition: opacity 0.2s;
}

.cta-btn:hover { opacity: 0.85; }

/* Related posts */
.related {
  max-width: var(--post-width);
  margin: 0 auto;
  padding: 48px 32px 80px;
  border-top: 1px solid var(--border);
}

.related-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.related-label::before { content: ''; width: 20px; height: 2px; background: var(--accent); }

.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── FOOTER ─── */
.site-footer {
  background: var(--ink);
  border-top: 1px solid #222018;
  padding: 28px 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer .logo-tool { color: #fff; font-size: 1.1rem; }
.site-footer .logo-atlas { font-size: 1.1rem; }
.site-footer .logo-hq { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.3); }
.site-footer p { font-size: 0.78rem; color: #3a3530; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-left  { animation: fadeUp 0.6s 0.05s ease both; }
.hero-stats { animation: fadeUp 0.6s 0.2s ease both; }

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  .site-header { padding: 0 24px; }
  .site-nav { display: none; }
  .hero { padding: 64px 24px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .home-section { padding: 48px 24px; }
  .grid-featured, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .newsletter { padding: 64px 24px; }
  .nl-inner { grid-template-columns: 1fr; gap: 48px; }
  .site-footer { flex-direction: column; gap: 12px; padding: 24px; text-align: center; }
  .post-wrap { padding: 48px 20px 80px; }
  .related { padding: 32px 20px 60px; }
  .related-grid { grid-template-columns: 1fr; }
  .verdict { padding: 28px; }
}
