@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');

/* ─── LIGHT MODE ─── */
:root {
  --bg:           #faf8f4;
  --ink:          #1a1814;
  --muted:        #6b6560;
  --accent:       #e85d2f;
  --accent-soft:  #fdf0eb;
  --border:       #e8e4de;
  --card:         #ffffff;
  --max:          1200px;
  --post-w:       860px;
}


/* ─── BASE ─── */
* { 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;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background .25s, color .25s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
main { flex: 1; }

/* ─── 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;
  transition: background .25s, border-color .25s;
}
.site-logo { display: flex; align-items: baseline; }
.logo-tool  { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--ink); transition: color .25s; }
.logo-atlas { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.logo-hq    { font-size: .6rem; font-weight: 600; letter-spacing: 2px; border: 1.5px solid var(--ink); border-radius: 3px; padding: 1px 4px; margin-left: 5px; opacity: .5; align-self: flex-end; margin-bottom: 4px; transition: border-color .25s, color .25s; }
.site-nav   { display: flex; align-items: center; gap: 36px; list-style: none; }
.site-nav a { font-size: .875rem; color: var(--muted); transition: color .2s; }
.site-nav a:hover { color: var(--ink); }
.nav-cta    { background: var(--ink) !important; color: var(--bg) !important; padding: 8px 20px; border-radius: 6px; font-weight: 500 !important; transition: background .2s !important; }
.nav-cta:hover { background: var(--accent) !important; color: #fff !important; }
.nav-right  { display: flex; align-items: center; gap: 10px; }
.nav-btn    { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; display: flex; align-items: center; transition: color .2s; }
.nav-btn:hover { color: var(--ink); }
.hamburger  { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: background .25s; }

/* Dark mode icon toggle */
.icon-moon { display: block; }
.icon-sun  { display: none; }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  transition: background .25s;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 14px 0; font-size: 1rem; border-bottom: 1px solid var(--border); color: var(--ink); display: block; transition: color .2s; }
.mobile-menu a:last-child { border-bottom: none; }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(14,13,11,0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.search-overlay.active { display: flex; }
.search-inner { width: 100%; max-width: 600px; display: flex; flex-direction: column; gap: 16px; }
.search-inner form { display: flex; background: var(--card); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.search-inner input { flex: 1; border: none; outline: none; padding: 18px 20px; font-family: 'DM Sans', sans-serif; font-size: 1.1rem; color: var(--ink); background: transparent; }
.search-inner button[type=submit] { background: var(--accent); border: none; color: #fff; padding: 18px 24px; font-family: 'DM Sans', sans-serif; font-size: .9rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
.search-close { background: none; border: none; color: rgba(255,255,255,.4); font-size: .85rem; cursor: pointer; text-align: center; padding: 8px; font-family: 'DM Sans', sans-serif; transition: color .2s; }
.search-close:hover { color: #fff; }

/* ─── 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: .4; pointer-events: none; transition: opacity .25s; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1fr 400px; gap: 80px; align-items: center; max-width: var(--max); 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; color: var(--ink); }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-desc { font-size: 1.05rem; color: var(--muted); 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: .9rem; font-weight: 500; transition: opacity .2s, transform .2s; display: inline-block; }
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-ghost { color: var(--ink); font-size: .9rem; transition: color .2s; }
.hero-stats { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 36px; box-shadow: 0 4px 32px rgba(0,0,0,.05); transition: background .25s, border-color .25s; }
.stat-row { padding: 18px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; transition: border-color .25s; }
.stat-row:last-child { border-bottom: none; padding-bottom: 0; }
.stat-row:first-child { padding-top: 0; }
.stat-label { font-size: .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: .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; transition: background .25s; }
.ticker-track { display: inline-flex; gap: 40px; animation: ticker 30s linear infinite; }
.ticker-item { font-size: .78rem; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.3); }
.ticker-item strong { color: var(--accent); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── SECTIONS ─── */
.home-section { padding: 72px 52px; border-bottom: 1px solid var(--border); transition: border-color .25s; }
.section-inner { max-width: var(--max); 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: .85rem; color: var(--accent); font-weight: 500; }
.see-all:hover { text-decoration: underline; }

/* ─── CARDS ─── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 32px; display: flex; flex-direction: column; gap: 12px; transition: transform .25s, box-shadow .25s, background .25s, border-color .25s; position: relative; overflow: hidden; height: 100%; }
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 48px rgba(0,0,0,.08); }
.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; color: var(--ink); }
.card-sm h2 { font-size: 1.15rem; }
.card p { font-size: .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: .8rem; color: var(--muted); margin-top: auto; transition: border-color .25s; }
.read-more { font-weight: 500; color: var(--accent); font-size: .85rem; }
.card:hover .read-more { text-decoration: underline; }
.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; transition: background .25s; }
.newsletter::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 48px 48px; pointer-events: none; }
.nl-inner { max-width: var(--max); 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,.15); border: 1px solid rgba(232,93,47,.3); color: var(--accent); font-size: .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: #e8e4dc; line-height: 1.2; margin-bottom: 16px; }
.nl-inner h2 em { color: var(--accent); font-style: italic; }
.nl-inner > div > p { color: #5a5550; font-size: .95rem; }
.nl-form { display: flex; flex-direction: column; gap: 12px; }
.nl-form input { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; padding: 14px 18px; font-family: 'DM Sans', sans-serif; font-size: .95rem; color: #e8e4dc; outline: none; font-weight: 300; width: 100%; transition: border .2s; }
.nl-form input:focus { border-color: var(--accent); }
.nl-form input::placeholder { color: #3a3530; }
.nl-form button { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 14px 24px; font-family: 'DM Sans', sans-serif; font-size: .95rem; font-weight: 500; cursor: pointer; transition: opacity .2s; width: 100%; }
.nl-form button:hover { opacity: .85; }
.nl-note { font-size: .76rem; color: #3a3530; text-align: center; }

/* ─── SINGLE POST ─── */
.post-wrap { max-width: var(--post-w); margin: 0 auto; padding: 80px 48px 120px; }
.post-tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; padding: 5px 14px; border-radius: 20px; margin-bottom: 28px; }
.post-title { font-family: 'Playfair Display', serif; font-size: clamp(2.4rem,5.5vw,3.6rem); line-height: 1.1; margin-bottom: 16px; letter-spacing: -1px; color: var(--ink); }
.post-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; font-size: .82rem; color: var(--muted); flex-wrap: wrap; }
.post-meta-dot { color: var(--border); }
.post-subtitle { font-size: 1.1rem; color: var(--muted); margin-bottom: 44px; padding-bottom: 44px; border-bottom: 1px solid var(--border); line-height: 1.8; transition: border-color .25s; }
.post-content p { font-size: 1.1rem; margin-bottom: 32px; line-height: 1.9; color: var(--ink); transition: color .25s; }
.post-content > p:first-child::first-letter { font-family: 'Playfair Display', serif; font-size: 5.5rem; font-weight: 700; font-style: italic; float: left; line-height: .75; margin: 10px 14px 0 0; }
.post-content h2 { font-family: 'Playfair Display', serif; font-size: 1.75rem; font-weight: 700; margin: 52px 0 20px; letter-spacing: -.5px; color: var(--ink); }
.post-content h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; margin: 36px 0 14px; color: var(--ink); }
.post-content a { border-bottom: 1.5px solid; transition: opacity .2s; }
.post-content a:hover { opacity: .75; }
.post-content ul, .post-content ol { margin: 16px 0 32px 24px; line-height: 2.1; font-size: 1.05rem; }
.post-content li { color: var(--ink); margin-bottom: 4px; }
.highlight { font-weight: 500; }
.callout { border-left: 3px solid; border-radius: 0; padding: 20px 24px; margin: 36px 0; }
.callout p { margin: 0 !important; font-size: 1rem; }
.section-break { text-align: center; color: var(--border); font-size: 1.4rem; margin: 44px 0; letter-spacing: 8px; }
.post-content table { width: 100%; border-collapse: collapse; margin: 32px 0; font-size: .95rem; }
.post-content table thead th { background: var(--ink); color: var(--bg); padding: 14px 18px; text-align: left; transition: background .25s, color .25s; }
.post-content table thead th:first-child { border-radius: 8px 0 0 0; }
.post-content table thead th:last-child  { border-radius: 0 8px 0 0; }
.post-content table tbody tr:nth-child(odd)  { background: var(--bg); }
.post-content table tbody tr:nth-child(even) { background: var(--card); }
.post-content table td { padding: 12px 18px; border-bottom: 1px solid var(--border); line-height: 1.6; color: var(--ink); transition: border-color .25s, color .25s; }
.post-content table tbody tr:last-child td { border-bottom: none; }
.verdict { margin-top: 52px; padding: 40px; background: var(--ink); border-radius: 12px; transition: background .25s; }
.verdict h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 14px; color: #e8e4dc; }
.verdict p { font-size: .95rem; color: #7a7268; line-height: 1.75; }
.cta-btn { display: inline-block; margin-top: 22px; font-size: .9rem; font-weight: 500; color: #fff; padding: 12px 24px; border-radius: 6px; transition: opacity .2s; }
.cta-btn:hover { opacity: .85; }
.related { max-width: var(--post-w); margin: 0 auto; padding: 48px 48px 80px; border-top: 1px solid var(--border); transition: border-color .25s; }
.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; }

/* ─── ARCHIVE ─── */
.archive-wrap { max-width: var(--max); margin: 0 auto; padding: 72px 52px 100px; }
.archive-header { margin-bottom: 52px; padding-bottom: 36px; border-bottom: 1px solid var(--border); transition: border-color .25s; }
.archive-header h1 { font-family: 'Playfair Display', serif; font-size: clamp(2rem,4vw,3rem); margin-top: 12px; letter-spacing: -.5px; color: var(--ink); }
.no-results { padding: 80px 0; text-align: center; color: var(--muted); }
.pagination { margin-top: 52px; display: flex; justify-content: center; gap: 8px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); font-size: .9rem; color: var(--muted); transition: all .2s; }
.pagination a:hover, .pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── 404 ─── */
.not-found { max-width: 860px; margin: 0 auto; padding: 100px 32px; text-align: center; }
.not-found-code { font-family: 'Playfair Display', serif; font-size: 8rem; font-weight: 700; color: var(--border); line-height: 1; margin-bottom: 16px; }
.not-found h1 { font-family: 'Playfair Display', serif; font-size: 2.5rem; margin-bottom: 12px; color: var(--ink); }
.not-found-actions { display: flex; gap: 16px; justify-content: center; margin: 32px 0; flex-wrap: wrap; }

/* ─── FOOTER ─── */
.site-footer { background: var(--ink); border-top: 1px solid var(--border); padding: 28px 52px; display: flex; justify-content: space-between; align-items: center; margin-top: auto; transition: background .25s, border-color .25s; }
.footer-logo-tool  { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: #e8e4dc; }
.footer-logo-atlas { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.footer-logo-hq    { font-size: .55rem; font-weight: 600; letter-spacing: 2px; border: 1.5px solid rgba(232,228,220,.2); border-radius: 3px; padding: 1px 4px; margin-left: 5px; color: rgba(232,228,220,.3); align-self: flex-end; margin-bottom: 4px; }
.site-footer p { font-size: .78rem; color: #3a3530; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.hero-left  { animation: fadeUp .6s .05s ease both; }
.hero-stats { animation: fadeUp .6s .2s  ease both; }

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  .site-header { padding: 0 24px; }
  .site-nav { display: none !important; }
  .hamburger { display: flex; }
  .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, .related { padding-left: 24px; padding-right: 24px; }
  .archive-wrap { padding: 48px 24px 72px; }
  .related-grid { grid-template-columns: 1fr; }
  .verdict { padding: 28px; }
  .not-found-code { font-size: 5rem; }
}


/* Beehiiv embed */
.nl-embed {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.nl-embed iframe,
.beehiiv-embed {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
