/* ==========================================================================
   RedMantu blog theme
   Ported 1:1 from redmantu.com's assets/css/site.css + assets/css/blog.css
   (same tokens, same component classes) so the blog reads as the same
   product, not a bolt-on. See docs/design-system.md on the main site for
   the source of truth this was built from.
   ========================================================================== */

:root{
  --orange:#FF4500;
  --orange-hover:#E03E00;
  --navy:#0F172A;
  --slate:#1F2937;
  --paper:#FFFFFF;
  --text-muted:#475569;
  --border:#E2E8F0;
  --bg-page:#F8FAFC;
  --hot:#16A34A;
  --medium:#EAB308;
  --cold:#94A3B8;

  --font-head: "Golos Text", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --container: 1120px;
  --radius: 14px;
  --radius-sm: 8px;
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--navy);
  background:var(--bg-page);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block;}
h1,h2,h3{
  font-family:var(--font-head);
  line-height:1.15;
  margin:0 0 .6em;
  letter-spacing:-.01em;
}
p{margin:0 0 1em;}
a{color:inherit;}
ul{margin:0;padding:0;}
.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 20px;
}
.section-head{max-width:640px;margin:0 0 40px;}
.section-head.center{margin-left:auto;margin-right:auto;text-align:center;}
.section-head h2{font-size:clamp(1.6rem,3.4vw,2.3rem);}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-family:var(--font-body);
  font-weight:600;
  font-size:1rem;
  padding:14px 26px;
  border-radius:999px;
  border:2px solid transparent;
  cursor:pointer;
  text-decoration:none;
  white-space:nowrap;
  flex-shrink:0;
  transition:background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active{transform:translateY(1px);}
.btn-primary{background:var(--orange);color:#fff;}
.btn-primary:hover{background:var(--orange-hover);}
.btn-outline{background:transparent;color:var(--navy);border-color:var(--border);}
.btn-outline:hover{border-color:var(--navy);}
.btn-sm{padding:9px 18px;font-size:.9rem;}
.btn-lg{padding:16px 32px;font-size:1.05rem;}

/* Header */
header.site{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--border);
}
#navToggle{display:none;}
header.site .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-top:10px;
  padding-bottom:10px;
}
header.site img{height:42px;width:auto;flex-shrink:0;}
@media (min-width:480px){header.site img{height:50px;}}
.nav-right{display:flex;align-items:center;gap:28px;flex-shrink:0;}
.primary-nav{display:flex;align-items:center;gap:22px;list-style:none;}
.primary-nav a{
  font-weight:600;
  font-size:.9rem;
  text-decoration:none;
  color:var(--navy);
  white-space:nowrap;
}
.primary-nav a:hover{color:var(--orange);}
.site-nav{display:flex;align-items:center;gap:8px;flex-shrink:0;}
.nav-link{
  font-weight:600;
  font-size:.9rem;
  text-decoration:none;
  color:var(--navy);
  white-space:nowrap;
  padding:9px 10px;
  border-radius:999px;
}
.nav-link:hover{color:var(--orange);}
.nav-toggle-btn{
  display:none;
  align-items:center;
  justify-content:center;
  width:36px;height:36px;
  flex-shrink:0;
  cursor:pointer;
  color:var(--navy);
}
.mobile-nav{display:none;background:#fff;border-top:1px solid var(--border);}
#navToggle:checked ~ .mobile-nav{display:block;}
.mobile-nav .container{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  padding-top:8px;
  padding-bottom:8px;
}
.mobile-nav a{
  display:block;
  width:100%;
  padding:13px 2px;
  font-weight:600;
  font-size:.98rem;
  color:var(--navy);
  text-decoration:none;
  border-bottom:1px solid var(--border);
}
.mobile-nav a:last-child{border-bottom:none;}
@media (max-width:899px){
  .primary-nav{display:none;}
  .site-nav .nav-link{display:none;}
  .nav-toggle-btn{display:flex;}
}

/* Page hero (blog index / tag / author / page banner) */
.page-hero{
  background:var(--navy);
  color:#fff;
  padding:64px 0 56px;
  text-align:center;
}
.page-hero .container{max-width:760px;}
.page-hero h1{color:#fff;font-size:clamp(2rem,4.2vw,2.8rem);margin-bottom:.3em;}
.page-hero p{color:#CBD5E1;font-size:1.1rem;margin:0;}

/* Blog listing */
.blog-list{background:#fff;padding:64px 0;}
@media (min-width:800px){.blog-list{padding:96px 0;}}
.blog-list .container{max-width:1000px;}
.post-grid{display:grid;gap:24px;list-style:none;}
@media (min-width:700px){.post-grid{grid-template-columns:repeat(2,1fr);}}
.post-card{
  display:flex;
  flex-direction:column;
  background:var(--bg-page);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  text-decoration:none;
  color:inherit;
}
.post-card:hover{border-color:var(--orange);}
.post-card__cover{
  width:100%;
  aspect-ratio:1200/630;
  object-fit:cover;
  border-bottom:1px solid var(--border);
}
.post-card__body{display:flex;flex-direction:column;flex:1;padding:24px 26px 26px;}
.post-tag{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:.66rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--orange-hover);
  background:linear-gradient(180deg,#FFF7F3 0%,#FFEDE2 100%);
  border:1px solid rgba(255,69,0,.16);
  box-shadow:0 1px 2px rgba(255,69,0,.06);
  padding:3px 9px 3px 7px;
  border-radius:999px;
  line-height:1.4;
}
.post-tag svg{width:9px;height:9px;flex-shrink:0;}
.post-card h3{font-size:1.15rem;margin-bottom:8px;}
.post-card p{color:var(--text-muted);font-size:.92rem;margin-bottom:16px;flex:1;}
.post-card .post-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:.82rem;color:#94A3B8;}
.meta-dot{color:#CBD5E1;}
.post-card .read-more{color:var(--orange);font-weight:600;font-size:.9rem;margin-top:auto;}

/* Pagination (Ghost's {{pagination}} helper output) */
.pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-top:48px;
}
.pagination a, .pagination span{
  font-weight:600;
  font-size:.9rem;
  text-decoration:none;
  color:var(--navy);
  padding:10px 18px;
  border-radius:999px;
  border:1px solid var(--border);
}
.pagination a:hover{border-color:var(--orange);color:var(--orange);}
.pagination .page-number{border:none;color:var(--text-muted);}

/* Article (blog post) */
.article{background:#fff;padding:56px 0 0;}
.article .container{max-width:760px;}
.article-back{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.9rem;
  font-weight:600;
  color:var(--text-muted);
  text-decoration:none;
  margin-bottom:24px;
}
.article-back:hover{color:var(--orange);}
.article-tag{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:.66rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--orange-hover);
  background:linear-gradient(180deg,#FFF7F3 0%,#FFEDE2 100%);
  border:1px solid rgba(255,69,0,.16);
  box-shadow:0 1px 2px rgba(255,69,0,.06);
  padding:3px 10px 3px 7px;
  border-radius:999px;
  line-height:1.4;
  text-decoration:none;
  transition:background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.article-tag svg{width:9px;height:9px;flex-shrink:0;}
.article-tag:hover{
  background:var(--orange);
  border-color:var(--orange);
  color:#fff;
  box-shadow:0 6px 16px -6px rgba(255,69,0,.55);
}
.article-tag:active{transform:translateY(1px);}
.article h1{font-size:clamp(1.8rem,4vw,2.5rem);line-height:1.15;margin-bottom:14px;}
.article-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  font-size:.9rem;
  color:var(--text-muted);
  margin-bottom:36px;
  padding-bottom:24px;
  border-bottom:1px solid var(--border);
}
.article-meta .author{font-weight:600;color:var(--navy);}
.article-cover{
  width:100%;
  aspect-ratio:1200/630;
  object-fit:cover;
  border-radius:var(--radius);
  margin-bottom:12px;
}
.article-cover-caption{
  text-align:center;
  font-size:.85rem;
  color:#94A3B8;
  margin-top:-4px;
  margin-bottom:36px;
}
.article p{color:var(--navy);font-size:1.05rem;line-height:1.7;margin-bottom:1.3em;}
.article > .container > p:first-of-type{font-size:1.15rem;color:var(--text-muted);}
.article h2{font-family:var(--font-head);font-size:1.5rem;margin:2.2em 0 .7em;}
.article h3{font-family:var(--font-head);font-size:1.15rem;margin:1.6em 0 .5em;}
.article ul, .article ol{margin:0 0 1.3em;padding-left:22px;color:var(--navy);}
.article li{margin-bottom:.5em;font-size:1.02rem;line-height:1.6;list-style:revert;}
.article a{color:var(--orange);text-decoration:underline;font-weight:600;}
.article figure{margin:1.8em 0;}
.article figcaption{
  text-align:center;
  font-size:.85rem;
  color:#94A3B8;
  margin-top:10px;
}
.article blockquote{
  border-left:3px solid var(--orange);
  padding:4px 0 4px 20px;
  margin:1.6em 0;
  color:var(--text-muted);
  font-style:italic;
}
.article hr{border:none;border-top:1px solid var(--border);margin:2.4em 0;}
.article pre{
  background:var(--navy);
  color:#E2E8F0;
  border-radius:var(--radius-sm);
  padding:18px 20px;
  overflow-x:auto;
  font-size:.88rem;
  line-height:1.6;
  margin:1.6em 0;
}
.article code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.9em;
  background:var(--bg-page);
  padding:.15em .4em;
  border-radius:4px;
}
.article pre code{background:none;padding:0;color:inherit;}

/* Post-card CTA in article footer ("More from the blog") */
.article + .blog-list, .cta + .blog-list{padding-top:0;}

/* Data table (kept from redmantu.com blog.css, in case posts embed one via HTML) */
.table-wrap{overflow-x:auto;margin:1.6em 0;border:1px solid var(--border);border-radius:var(--radius);}
table.data-table{width:100%;border-collapse:collapse;font-size:.92rem;min-width:560px;}
table.data-table th, table.data-table td{padding:12px 16px;text-align:left;border-bottom:1px solid var(--border);}
table.data-table th{background:var(--bg-page);font-family:var(--font-head);font-weight:700;color:var(--navy);font-size:.82rem;text-transform:uppercase;letter-spacing:.03em;}
table.data-table td{color:var(--text-muted);}
table.data-table tr:last-child td{border-bottom:none;}

/* Ghost's native content tables get the same look without the extra markup */
.article table{width:100%;border-collapse:collapse;font-size:.92rem;margin:1.6em 0;}
.article table th, .article table td{padding:12px 16px;text-align:left;border-bottom:1px solid var(--border);}
.article table th{background:var(--bg-page);font-family:var(--font-head);font-weight:700;color:var(--navy);font-size:.82rem;text-transform:uppercase;letter-spacing:.03em;}
.article table td{color:var(--text-muted);}

/* Final CTA (member subscribe box on post pages) */
.cta{background:var(--navy);color:#fff;padding:64px 0;}
.cta .container{max-width:640px;text-align:center;}
.cta h2{color:#fff;font-size:clamp(1.6rem,3.4vw,2.2rem);}
.cta p.lead{color:#CBD5E1;font-size:1.08rem;}
.cta-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;margin-top:24px;}

/* Footer */
footer.site{background:#fff;border-top:1px solid var(--border);padding:48px 0 28px;}
.footer-top{display:flex;flex-wrap:wrap;gap:40px;justify-content:space-between;padding-bottom:32px;}
.footer-brand{max-width:260px;}
.footer-brand img{width:156px;height:auto;margin-bottom:10px;}
.footer-tag{font-size:.86rem;color:var(--text-muted);margin:0;}
.footer-social{display:flex;gap:10px;margin-top:18px;}
.social-link{
  display:flex;align-items:center;justify-content:center;
  width:36px;height:36px;
  border-radius:50%;
  border:1px solid var(--border);
  color:var(--text-muted);
  text-decoration:none;
  transition:color .15s ease, background-color .15s ease, border-color .15s ease;
}
.social-link svg{width:17px;height:17px;}
.social-link:hover{color:#fff;background:var(--orange);border-color:var(--orange);}
.footer-col h4{
  font-family:var(--font-body);
  font-size:.78rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--text-muted);
  margin:0 0 14px;
}
.footer-col{display:flex;flex-direction:column;}
.footer-col a{display:block;font-size:.92rem;color:var(--navy);text-decoration:underline;margin-bottom:12px;}
.footer-col a:hover{color:var(--orange);}
.footer-divider{height:1px;background:var(--border);margin:2px 0 14px;width:100%;max-width:150px;}
.footer-purpose{font-size:.68rem;line-height:1.5;color:#94A3B8;max-width:260px;margin:14px 0 0;}
.footer-bottom{
  border-top:1px solid var(--border);
  padding-top:22px;
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;
}
.footer-copy{font-size:.82rem;color:var(--text-muted);margin:0;}

/* Simple content page (Ghost static pages) */
.simple-page{background:#fff;padding:56px 0 96px;}
.simple-page .container{max-width:760px;}
.simple-page h2{font-size:1.5rem;margin-top:2em;}
.simple-page h2:first-child{margin-top:0;}
.simple-page p{color:var(--text-muted);font-size:1.02rem;}
.simple-page ul{list-style:disc;padding-left:22px;margin-bottom:1em;}
.simple-page li{color:var(--text-muted);font-size:1.02rem;margin-bottom:.5em;}

/* 404 */
.not-found{background:#fff;text-align:center;padding:110px 0;min-height:56vh;display:flex;align-items:center;}
.not-found .container{max-width:520px;margin:0 auto;}
.not-found__code{
  font-family:var(--font-head);
  font-weight:800;
  font-size:clamp(4.5rem,14vw,7.5rem);
  color:var(--orange);
  line-height:1;
  margin-bottom:8px;
}
.not-found h1{font-size:clamp(1.5rem,3.2vw,2rem);margin-bottom:12px;}
.not-found p{color:var(--text-muted);font-size:1.05rem;margin-bottom:28px;}
.not-found__actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;}

/* ==========================================================================
   Koenig content cards — styles for the rich-content blocks Ghost's editor
   can produce (image/gallery/bookmark/callout/button/embed/code/toggle),
   tokenized to match the rest of the theme instead of Ghost's defaults.
   ========================================================================== */
.kg-width-wide{margin-left:calc(50% - 50vw + 1px);margin-right:calc(50% - 50vw + 1px);max-width:1120px;width:calc(100vw - 2px);}
.kg-width-full{margin-left:calc(50% - 50vw + 1px);margin-right:calc(50% - 50vw + 1px);max-width:none;width:calc(100vw - 2px);}
.kg-width-full img{border-radius:0;}

.kg-gallery-container{display:flex;flex-direction:column;margin:1.8em 0;}
.kg-gallery-row{display:flex;flex-direction:row;justify-content:center;}
.kg-gallery-image img{display:block;width:100%;height:100%;border-radius:var(--radius-sm);}
.kg-gallery-row:not(:first-of-type){margin-top:.75em;}
.kg-gallery-row .kg-gallery-image:not(:first-of-type){margin-left:.75em;}

.kg-bookmark-card{margin:1.8em 0;}
.kg-bookmark-container{
  display:flex;
  min-height:120px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  text-decoration:none;
  color:inherit;
}
.kg-bookmark-content{display:flex;flex-direction:column;flex:1;padding:20px;order:1;}
.kg-bookmark-title{font-family:var(--font-head);font-weight:700;font-size:1rem;color:var(--navy);margin-bottom:6px;}
.kg-bookmark-description{
  font-size:.9rem;color:var(--text-muted);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  margin-bottom:14px;
}
.kg-bookmark-metadata{display:flex;align-items:center;gap:8px;font-size:.82rem;color:#94A3B8;margin-top:auto;}
.kg-bookmark-icon{width:18px;height:18px;border-radius:3px;}
.kg-bookmark-thumbnail{flex:0 0 220px;order:2;}
.kg-bookmark-thumbnail img{width:100%;height:100%;object-fit:cover;}
@media (max-width:600px){.kg-bookmark-container{flex-direction:column-reverse;}.kg-bookmark-thumbnail{flex:0 0 160px;}}

.kg-callout-card{
  display:flex;
  align-items:flex-start;
  gap:12px;
  background:var(--bg-page);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:18px 20px;
  margin:1.8em 0;
}
.kg-callout-emoji{font-size:1.3rem;line-height:1;flex:0 0 auto;}
.kg-callout-text{font-size:1rem;color:var(--navy);margin:0;}
.kg-callout-card-grey{background:#F1F5F9;}
.kg-callout-card-white{background:#fff;border-color:var(--border);}
.kg-callout-card-blue{background:#EFF6FF;}
.kg-callout-card-green{background:#F0FDF4;}
.kg-callout-card-yellow{background:#FEFCE8;}
.kg-callout-card-red{background:#FEF2F2;}
.kg-callout-card-pink{background:#FDF2F8;}
.kg-callout-card-purple{background:#FAF5FF;}
.kg-callout-card-accent{background:#FFF1EB;}

.kg-button-card{text-align:center;margin:1.8em 0;}
.kg-btn{
  display:inline-flex;align-items:center;justify-content:center;
  font-weight:600;font-size:1rem;padding:14px 26px;border-radius:999px;
  text-decoration:none;background:transparent;color:var(--navy);border:2px solid var(--border);
}
.kg-btn:hover{border-color:var(--navy);}
.kg-btn-accent{background:var(--orange);color:#fff;border-color:transparent;}
.kg-btn-accent:hover{background:var(--orange-hover);}

.kg-blockquote-alt{
  font-family:var(--font-head);
  font-size:1.3rem;
  font-weight:600;
  color:var(--navy);
  border:none;
  text-align:center;
  font-style:normal;
  padding:0;
  margin:2em 0;
}

.kg-embed-card{margin:1.8em 0;}
.kg-embed-card iframe{width:100%;border-radius:var(--radius-sm);}

.kg-toggle-card{
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:16px 20px;
  margin:1.8em 0;
}
.kg-toggle-heading{display:flex;align-items:center;justify-content:space-between;cursor:pointer;gap:12px;}
.kg-toggle-heading-text{font-family:var(--font-head);font-weight:600;font-size:1rem;color:var(--navy);margin:0;}
.kg-toggle-content{color:var(--text-muted);margin-top:12px;}

.kg-signup-card{
  background:var(--navy);
  color:#fff;
  border-radius:var(--radius);
  padding:32px;
  text-align:center;
  margin:2em 0;
}
.kg-signup-card-heading{color:#fff;font-family:var(--font-head);}
.kg-signup-card-subheading{color:#CBD5E1;}
