/* ================================================
   ATLAS OVERRIDE — applied after deigo's built CSS
   ================================================ */

/* Fonts */
:root {
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-heading: 'Fraunces', Georgia, serif;

  /* Atlas palette */
  --atlas-paper:      #FAF7F0;
  --atlas-paper-card: #FFFFFF;
  --atlas-paper-edge: rgba(10,10,10,0.08);
  --atlas-ink:        #0A0A0A;
  --atlas-ink-soft:   #2A2A2A;
  --atlas-ink-muted:  #5A5A5A;
  --atlas-green:      #0F4A3F;   /* matches the Atlas tool's hero green */
  --atlas-green-deep: #0A332B;
  --atlas-amber:      #EAC995;
  --atlas-amber-deep: #DCBD8F;
}

/* Background — warm paper, not cold grey */
body { background-color: var(--atlas-paper) !important; }
:root { --bg-color: var(--atlas-paper) !important; }

/* Nav + footer card panels */
header .border.bg-white,
footer .border.bg-white { background-color: var(--atlas-paper-card) !important; }

/* Headings — Fraunces, tighter tracking */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Fraunces', Georgia, serif !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em !important;
}

/* Body type — Space Grotesk */
body, p, li, td, input, button, a {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

/* === NAV BRAND (orbital mark) === */
.atlas-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--atlas-ink);
}
.atlas-orbital {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* === BUTTONS === */

/* Subscribe — white fill, ink border + text */
.atlas-btn-subscribe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--atlas-ink) !important;
  background: var(--atlas-paper-card) !important;
  color: var(--atlas-ink) !important;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.atlas-btn-subscribe:hover {
  background: var(--atlas-paper) !important;
  transform: translateY(-1px);
}

/* Open Atlas — amber fill */
.atlas-btn-product {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid transparent !important;
  background: var(--atlas-amber) !important;
  color: var(--atlas-ink) !important;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.atlas-btn-product:hover {
  background: var(--atlas-amber-deep) !important;
  transform: translateY(-1px);
}

/* Hide the original subscribe button (replaced in template) */
[data-portal="subscribe"].bg-black-950,
[data-portal="signin"].bg-black-950,
[data-portal="account"].bg-black-950 {
  display: none !important;
}

/* Footer subscribe panel — restyle */
.bg-black-950 a[data-portal="subscribe"] {
  background-color: var(--atlas-amber) !important;
  color: var(--atlas-ink) !important;
}

/* Ghost accent — use amber */
:root { --ghost-accent-color: #EAC995; }

/* Separator stars */
.separator { color: var(--atlas-ink-muted); }

/* === MARK SIZE (nav) === */
.atlas-mark-nav {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* === FOOTER WORDMARK === */
.atlas-footer-wordmark {
  width: min(calc(100% - 48px), 900px);
  margin: 8px auto 0;
  overflow: hidden;
  line-height: 0;
}
.atlas-footer-wordmark svg {
  width: 100%;
  height: auto;
  max-height: 80px;
  color: var(--atlas-ink);
}

/* === CTA GROUP — hidden on mobile, flex on ≥600px === */
.atlas-cta-group {
  display: none;
  align-items: center;
  gap: 8px;
}
@media (width >= 600px) {
  .atlas-cta-group {
    display: flex !important;
  }
}

/* === POPULAR-BY-TAGS HEADING — match article card title style === */
.atlas-popular-heading {
  font-family: 'Space Grotesk', system-ui, sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--atlas-ink) !important;
  margin: 0 0 20px 0 !important;
  line-height: 1.3 !important;
}

/* === REMOVE old centered wordmark element if any remnant === */
.atlas-footer-wordmark { display: none !important; }

/* === GIANT FOOTER MARK — matches the app's index.html === */
.atlas-footer-mark {
  width: 100%;
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 24px 8px 20px;
  overflow: hidden;
  line-height: 0;
}
.atlas-footer-mark svg {
  width: 100%;
  height: auto;
  display: block;
}

/* === SECONDARY NAV in bottom strip — render as inline links like Privacy · Terms === */
.atlas-footer-bottom .secondary_nav ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 20px !important;
}
.atlas-footer-bottom .secondary_nav li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* === RELATED POSTS at the end of an article === */
.atlas-related {
  border-top: 1px solid var(--atlas-paper-edge);
  padding-top: 48px;
}
.atlas-related-head {
  margin-bottom: 28px;
}
.atlas-related-kicker {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--atlas-ink-muted);
  margin-bottom: 8px;
}
.atlas-related-title {
  font-family: 'Fraunces', Georgia, serif !important;
  font-size: 1.6rem !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em !important;
  color: var(--atlas-ink) !important;
  line-height: 1.15;
  margin: 0 !important;
}
@media (min-width: 768px) {
  .atlas-related-title { font-size: 2rem !important; }
}

/* === FOOTER BOTTOM — match app's index.html footer-bottom === */
.atlas-footer-bottom {
  font-family: 'Space Grotesk', system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--atlas-ink-muted) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}
.atlas-footer-bottom *,
.atlas-footer-bottom div,
.atlas-footer-bottom span,
.atlas-footer-bottom a,
.atlas-footer-bottom p,
.atlas-footer-bottom .secondary_nav,
.atlas-footer-bottom .secondary_nav ul,
.atlas-footer-bottom .secondary_nav li,
.atlas-footer-bottom .secondary_nav a,
.atlas-footer-copy,
.atlas-footer-copy * {
  font-family: 'Space Grotesk', system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--atlas-ink-muted) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-style: normal !important;
  line-height: 1.5 !important;
}
.atlas-footer-copy a {
  text-decoration: underline !important;
  text-underline-offset: 2px;
}
.atlas-footer-copy a:hover { color: var(--atlas-ink) !important; }
.atlas-footer-bottom .secondary_nav a:hover { color: var(--atlas-ink) !important; }

/* === BUTTON ARROW (SVG, replaces emoji ↗) === */
.atlas-btn-product .atlas-btn-arrow,
.atlas-btn-subscribe .atlas-btn-arrow {
  display: inline-block;
  margin-left: 6px;
  vertical-align: -2px;
  flex-shrink: 0;
}
.atlas-btn-product {
  display: inline-flex !important;
  align-items: center;
  gap: 0;
}

/* === MOBILE DRAWER NAV — match Atlas app styling === */
#mobile-nav {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}
#mobile-nav nav,
#mobile-nav ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}
#mobile-nav ul li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  display: block !important;
}
#mobile-nav ul li a,
#mobile-nav ul li > span {
  display: block !important;
  font-family: 'Space Grotesk', system-ui, sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  font-style: normal !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.4 !important;
  color: var(--atlas-ink-soft) !important;
  background: transparent !important;
  padding: 12px 14px !important;
  border: none !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease;
}
#mobile-nav ul li a:hover {
  background: var(--atlas-paper-card) !important;
  color: var(--atlas-ink) !important;
}
#mobile-nav ul li.nav-current a,
#mobile-nav ul li.nav-current > span {
  background: var(--atlas-paper-card) !important;
  color: var(--atlas-ink) !important;
  font-weight: 600 !important;
}

/* === HERO ARTICLE CARD — same shape as grid card, scaled up === */
.atlas-hero-card {
  background-color: var(--atlas-paper-card) !important;
  transition: box-shadow 0.25s ease;
}
.atlas-hero-card:hover {
  box-shadow: 0 8px 28px rgba(10,10,10,0.06);
}

/* Image: wide landscape so it feels hero, not square like the grid */
.atlas-hero-imgbox {
  aspect-ratio: 21 / 9;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .atlas-hero-imgbox { margin-bottom: 36px; }
}
@media (max-width: 760px) {
  .atlas-hero-imgbox { aspect-ratio: 16 / 10; }
}

/* Body container — extra breathing room on top */
.atlas-hero-body {
  padding-top: 4px;
}

.atlas-hero-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.atlas-hero-kicker {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--atlas-ink-muted);
}
.atlas-hero-readtime {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--atlas-ink-muted);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: 999px;
  padding: 3px 10px;
}

.atlas-hero-title {
  font-family: 'Fraunces', Georgia, serif !important;
  font-size: 2.0rem !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.1 !important;
  color: var(--atlas-ink) !important;
  margin: 0 !important;
}
.atlas-hero-title a {
  color: inherit !important;
  text-decoration: none !important;
}
.atlas-hero-title a:hover { text-decoration: underline; }
@media (min-width: 768px) {
  .atlas-hero-title { font-size: 2.6rem !important; }
}
@media (min-width: 1280px) {
  .atlas-hero-title { font-size: 3.2rem !important; max-width: 900px; }
}

.atlas-hero-excerpt {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--atlas-ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 760px;
}

.atlas-hero-divider {
  height: 1px;
  width: 100%;
  background-color: var(--atlas-paper-edge);
  margin-top: 4px;
}

.atlas-hero-bottomrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.atlas-hero-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.atlas-hero-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background-color: var(--atlas-amber);
  color: var(--atlas-ink);
  overflow: hidden;
  flex-shrink: 0;
}
.atlas-hero-author-text {
  display: flex;
  flex-direction: column;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  line-height: 1.3;
}
.atlas-hero-author-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--atlas-ink);
}
.atlas-hero-author-date {
  font-size: 12px;
  color: var(--atlas-ink-muted);
}
.atlas-hero-cta {
  display: inline-flex;
  align-items: center;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--atlas-ink);
  border-bottom: 2px solid var(--atlas-amber);
  padding: 2px 0;
  text-decoration: none !important;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.atlas-hero-cta:hover {
  color: var(--atlas-amber-deep);
  border-color: var(--atlas-amber-deep);
}

/* === SUBSCRIBE BLOCK — deep green, no grid === */
.atlas-subscribe-block {
  background-color: var(--atlas-green) !important;
  color: var(--atlas-paper) !important;
}
.atlas-subscribe-kicker {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250,247,240,0.6);
}
.atlas-subscribe-title {
  font-family: 'Fraunces', Georgia, serif !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em !important;
  color: var(--atlas-paper) !important;
  line-height: 1.1;
}
.atlas-subscribe-sub {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: rgba(250,247,240,0.75);
  line-height: 1.55;
}
/* Hide any inherited grid background inside the subscribe block */
.atlas-subscribe-block .grid-bg { display: none !important; }

/* === TOOL BLOCK on homepage — matches subscribe block === */
.atlas-tool-block {
  background-color: var(--atlas-green) !important;
  color: var(--atlas-paper) !important;
}
.atlas-tool-sub.expanded {
  max-width: 640px;
}
.atlas-tool-pillrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.atlas-tool-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(250,247,240,0.25);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(250,247,240,0.85);
  background: rgba(250,247,240,0.05);
}
.atlas-tool-kicker {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250,247,240,0.6);
}
.atlas-tool-title {
  font-family: 'Fraunces', Georgia, serif !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em !important;
  color: var(--atlas-paper) !important;
  line-height: 1.1;
}
.atlas-tool-sub {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: rgba(250,247,240,0.75);
  line-height: 1.55;
}

/* === ARTICLES TAG PAGE (tag-articles.hbs) === */
.ta-hero {
  background: #0F4A3F !important;
  color: #FFFFFF !important;
}
.ta-hero * { box-sizing: border-box; }
.ta-kicker  { color: #EAC995 !important; }
.ta-hero h1 { color: #FFFFFF !important; }
.ta-hero h1 em { color: #EAC995 !important; font-style: normal !important; }
.ta-hero-desc { color: rgba(255,255,255,0.72) !important; }
.ta-count { color: rgba(255,255,255,0.75) !important; background: rgba(255,255,255,0.1) !important; }

.ta-featured {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
}
@media (max-width: 1024px) {
  .ta-featured { grid-template-columns: 1fr !important; }
}

.ta-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
}
@media (max-width: 1024px) {
  .ta-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 640px) {
  .ta-grid { grid-template-columns: 1fr !important; }
}

/* Keep article page bg consistent with rest of site */
.ta-page-main {
  background: var(--atlas-paper) !important;
}

/* Articles page main — transparent so body paper colour shows, not Ghost's white card */
main.ta-page-main { background: transparent !important; border-radius: 0 !important; box-shadow: none !important; }

/* Force hero children transparent — Ghost/Tailwind leaks body bg-color onto nested divs */
.ta-hero *:not(.ta-btn-primary):not(.ta-btn-ghost):not(.ta-count) {
  background-color: transparent !important;
  background-image: none !important;
}

/* === ABOUT PAGE (page-about.hbs) === */
/* Hide the hr line behind the separator asterisks */
.page-about-template .ab-content-wrap hr,
.page-about-template .post-content hr {
  border: none !important;
  border-top: none !important;
  background: none !important;
  box-shadow: none !important;
}
.ab-hero {
  background: #0F4A3F !important;
  background-color: #0F4A3F !important;
}
.ab-hero *:not(.ab-contact-btn) {
  background-color: transparent !important;
  background-image: none !important;
}
.ab-contact {
  background: #0F4A3F !important;
  background-color: #0F4A3F !important;
}
.ab-contact *:not(.ab-contact-btn) {
  background-color: transparent !important;
}

/* === DRAWER — fully CSS-controlled, no Tailwind transform dependency ===
   Tailwind v4 -translate-x-full uses CSS custom properties that don't
   always initialise, leaving the white panel visible over the hero.
   atlas-drawer-panel class owns the hide/show entirely. */
.atlas-drawer-panel {
  transform: translate3d(-110%, 0, 0) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out !important;
}
.atlas-drawer-panel.translate-x-0,
.atlas-drawer-panel.is-open,
.atlas-drawer-panel.open {
  transform: translate3d(0, 0, 0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
