/* AskDeck blog theme — minimal, gaya.ai-style editorial with AskDeck brand.
   Persistent pill nav (Blog / Guides / AskDeck.ai + CTA, current highlighted),
   single-column image-forward post list, narrow reading column. Light, warm. */

:root {
  --paper:       #faf7f0;
  --surface:     #ffffff;
  --surface-2:   #f3eee3;
  --ink:         #1c1a14;
  --ink-2:       #57534a;
  --ink-3:       #837d70;
  --accent:      #ff3b17;
  --accent-deep: #c42a0a;
  --accent-soft: #ffe7df;
  --line:        #e7e0d2;
  --line-2:      #d8d0bf;

  --wrap:    1080px;
  --list:    760px;
  --measure: 720px;

  --sans:    'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: 'Bricolage Grotesque', 'Archivo', sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Defeat any legacy Code Injection that hardcodes `body{background-color:#faf7f0}`.
   It loads after this file (via {{ghost_head}}) and would pin a light background in
   BOTH themes, breaking dark mode. `html body` (specificity 0,0,2) beats a bare
   injected `body{}` (0,0,1) regardless of source order, so the variable wins. */
html body { background-color: var(--paper); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 0.5em;
}

.viewport { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; padding: 48px 0 80px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- header + pill nav ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.site-logo { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; }
.site-logo span { color: var(--accent); }
.site-logo:hover { color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.site-nav .nav { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-nav .nav-item > a {
  display: inline-flex; align-items: center;
  padding: 7px 13px; border-radius: 9px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.site-nav .nav-item > a:hover { color: var(--ink); background: color-mix(in srgb, var(--surface-2) 70%, transparent); }

/* current-section highlight (driven by Ghost body_class) */
.tag-template.tag-blog .nav-blog > a,
.post-template .nav-blog > a { color: var(--ink); background: var(--surface-2); }
.tag-template.tag-guides .nav-guides > a { color: var(--ink); background: var(--surface-2); }

.nav-cta {
  margin-left: 8px; padding: 9px 16px; border-radius: 999px;
  background: var(--accent); color: #fff !important; font-size: 14.5px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 40%, transparent); color: #fff !important; }

/* ---------- section header (blog index, tag pages) ---------- */
.section-head { max-width: var(--list); margin: 12px auto 44px; }
.section-kicker { font-family: var(--sans); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-deep); margin: 0 0 10px; }
.section-title { font-size: clamp(34px, 6vw, 52px); font-weight: 800; margin: 0 0 12px; }
.section-desc { font-size: 19px; color: var(--ink-2); margin: 0; }

/* ---------- post list (single column, image-forward) ---------- */
.post-list { max-width: var(--list); margin: 0 auto; display: flex; flex-direction: column; gap: 30px; }
.no-posts { max-width: var(--list); margin: 0 auto; color: var(--ink-2); }

.post-card-link { display: block; color: var(--ink); }
.post-card-link:hover { color: var(--ink); }

/* image cards */
.post-card-cover {
  aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.post-card-link:hover .post-card-cover img { transform: scale(1.03); }
.post-card--image .post-card-body { padding-top: 16px; }

/* typographic cards (no feature image) — branded panels, varied by position */
.post-card-panel {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 220px; padding: 26px 28px; border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 72%);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:nth-child(3n+2) .post-card-panel { background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 75%); }
.post-card:nth-child(3n+3) .post-card-panel { background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface-2) 80%); }
.post-card-link:hover .post-card-panel { transform: translateY(-2px); box-shadow: 0 14px 30px color-mix(in srgb, var(--ink) 8%, transparent); }
.post-card--text .post-card-title { font-size: 27px; }

.post-card-tag {
  display: inline-block; margin-bottom: 10px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-deep);
}
.post-card-title { font-size: 23px; font-weight: 700; margin: 0 0 8px; transition: color .15s ease; }
.post-card-link:hover .post-card-title { color: var(--accent-deep); }
.post-card-date { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- pagination ---------- */
.pagination { max-width: var(--list); margin: 44px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14.5px; font-weight: 600; }
.pagination a { color: var(--ink-2); }
.pagination a:hover { color: var(--accent); }
.pagination .page-number { color: var(--ink-3); font-weight: 500; }

/* ---------- single post / page ---------- */
.post-image { margin: 0 auto 40px; width: 100%; max-width: 1200px; padding: 0 24px; }
.post-image img { width: 100%; border-radius: 14px; max-height: 560px; object-fit: cover; }
.post-wrap { max-width: var(--measure); }
.post-back { display: inline-block; margin-bottom: 26px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.post-back:hover { color: var(--accent); }
.post-head { margin-bottom: 32px; }
.post-tag { display: inline-block; margin-bottom: 14px; font-family: var(--sans); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-deep); }
.post-title { font-size: clamp(30px, 5vw, 44px); font-weight: 800; margin-bottom: 16px; }
.post-meta { font-size: 15px; color: var(--ink-3); }
.post-meta .post-author { color: var(--ink-2); font-weight: 600; }
.post-meta .post-author::after { content: " · "; color: var(--ink-3); font-weight: 400; }

/* ---------- post content ---------- */
.gh-content { font-size: 18.5px; line-height: 1.75; color: #2a2720; }
.gh-content > * { margin: 0 0 1.5em; }
.gh-content h2 { font-size: 28px; margin-top: 1.7em; }
.gh-content h3 { font-size: 22px; margin-top: 1.5em; }
.gh-content a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.gh-content a:hover { color: var(--accent); }
.gh-content ul, .gh-content ol { padding-left: 1.3em; }
.gh-content li { margin: 0.4em 0; }
.gh-content strong { font-weight: 700; color: var(--ink); }
.gh-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); color: var(--ink-2); font-style: italic; }
.gh-content img, .gh-content .kg-card { border-radius: 10px; }
.gh-content figure { margin: 2em 0; }
.gh-content figcaption { font-size: 14px; color: var(--ink-3); text-align: center; margin-top: 0.6em; }
.gh-content hr { border: 0; border-top: 1px solid var(--line-2); margin: 2.4em 0; }
.gh-content code { font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; background: var(--surface-2); padding: 0.15em 0.4em; border-radius: 5px; }
.gh-content pre { background: #1c1a14; color: #f6f1e6; padding: 18px 20px; border-radius: 10px; overflow-x: auto; font-size: 14.5px; line-height: 1.6; }
.gh-content pre code { background: none; padding: 0; color: inherit; }
.gh-content .kg-width-wide { width: min(1080px, 92vw); margin-left: 50%; transform: translateX(-50%); }
.gh-content .kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); max-width: 100vw; border-radius: 0; }
.gh-content iframe { width: 100%; border: 0; border-radius: 10px; }

/* ---------- post footer CTA ---------- */
.post-foot { margin-top: 52px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.post-foot-cta { padding: 11px 20px; border-radius: 999px; background: var(--accent); color: #fff !important; font-weight: 700; font-size: 15px; box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 30%, transparent); }
.post-foot-cta:hover { color: #fff !important; transform: translateY(-1px); }
.post-foot-back { font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.post-foot-back:hover { color: var(--accent); }

/* ---------- footer ---------- */
.site-foot { flex-shrink: 0; border-top: 1px solid var(--line); background: var(--surface-2); padding: 48px 0; margin-top: 40px; }
.site-foot-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.site-foot-logo { font-size: 19px; }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.foot-nav a { font-size: 14.5px; color: var(--ink-2); font-weight: 500; }
.foot-nav a:hover { color: var(--accent); }
.site-foot-copy { font-size: 13.5px; color: var(--ink-3); margin: 0; }
.site-foot-copy a { color: var(--ink-2); }
.site-foot-copy a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .site-main { padding: 32px 0 56px; }
  .site-head-inner { gap: 10px; }
  .site-nav { gap: 2px; }
  .site-nav .nav-item.nav-product { display: none; }   /* keep Blog + Guides + CTA on mobile */
  .site-nav .nav-item > a { padding: 6px 9px; font-size: 13.5px; }
  .nav-cta { margin-left: 4px; padding: 8px 13px; font-size: 13.5px; }
  .section-head { margin-bottom: 32px; }
  .post-card--text .post-card-title { font-size: 23px; }
  .post-image { padding: 0; }
  .post-image img { border-radius: 0; }
  .gh-content { font-size: 17.5px; }
}
@media (max-width: 420px) {
  .site-logo { font-size: 19px; }
  .site-nav .nav-item.nav-guides { display: none; }     /* very small: Blog + CTA only */
}

/* ===================================================================
   Dark mode (toggle + prefers-color-scheme, set on <html> by default.hbs)
   =================================================================== */
:root.dark {
  --paper:       #15130e;
  --surface:     #201d16;
  --surface-2:   #2a2619;
  --ink:         #f6f1e6;
  --ink-2:       #c1bbac;
  --ink-3:       #aaa392;
  --accent:      #ff5230;
  --accent-deep: #ff7a5e;
  --accent-soft: #3a201a;
  --line:        #322d20;
  --line-2:      #3d3729;
}
:root.dark .gh-content { color: #e7e1d3; }
/* panels are var-based above, so they follow the palette in both themes + the
   inverted Guides surface — no hardcoded dark overrides needed. */
:root.dark .post-card-cover,
:root.dark .nav-cta { box-shadow: none; }

/* theme toggle button */
.theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-left: 4px;
  border: 0; background: transparent; color: var(--ink-2); border-radius: 9px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.theme-toggle:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); color: var(--ink); }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root.dark .theme-toggle .icon-moon { display: none; }
:root.dark .theme-toggle .icon-sun { display: block; }

/* ===================================================================
   Landing (home.hbs) — left menu rail + hero, gaya-style splash
   =================================================================== */
.home-template .site-head,
.home-template .site-foot { display: none; }
.home-template .site-main { padding: 0; }

.landing { display: grid; grid-template-columns: 300px 1fr; min-height: 100vh; }

.landing-aside {
  display: flex; flex-direction: column; padding: 40px 34px;
  border-right: 1px solid var(--line); background: var(--surface);
}
.landing-logo { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; color: var(--ink); }
.landing-logo span { color: var(--accent); }
.landing-menu { display: flex; flex-direction: column; gap: 2px; margin-top: 38px; }
.landing-menu-link { padding: 10px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.landing-menu-link:hover { background: var(--surface-2); color: var(--ink); }
.landing-aside-foot { margin-top: auto; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.landing-aside-cta { font-size: 15px; font-weight: 700; color: var(--accent-deep); }

.landing-hero { display: flex; flex-direction: column; justify-content: center; padding: 64px clamp(32px, 6vw, 96px); max-width: 900px; }
.landing-eyebrow { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent-deep); margin: 0 0 18px; }
.landing-title { font-family: var(--display); font-size: clamp(38px, 6.4vw, 66px); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 22px; }
.landing-lede { font-size: 20px; line-height: 1.6; color: var(--ink-2); margin: 0 0 40px; max-width: 640px; }
.landing-actions { display: flex; gap: 18px; flex-wrap: wrap; }
.landing-btn {
  display: flex; flex-direction: column; gap: 5px; padding: 20px 26px; min-width: 240px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.landing-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); border-color: var(--line-2); }
.landing-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.landing-btn--primary:hover { color: #fff; box-shadow: 0 16px 36px color-mix(in srgb, var(--accent) 36%, transparent); }
/* Secondary "Browse guides" button: solid + inverted vs the theme so it stays
   clearly visible in both modes — dark button + light text in light mode, light
   button + dark text in dark mode. */
.landing-btn:not(.landing-btn--primary) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.landing-btn:not(.landing-btn--primary):hover { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 0 16px 36px color-mix(in srgb, var(--ink) 22%, transparent); }
.landing-btn-label { font-family: var(--display); font-weight: 700; font-size: 20px; }
.landing-btn-sub { font-size: 13.5px; opacity: .82; }

@media (max-width: 820px) {
  .landing { grid-template-columns: 1fr; }
  .landing-aside { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-right: 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(8px); }
  .landing-menu { flex-direction: row; margin-top: 0; }
  .landing-menu-link { padding: 8px 10px; font-size: 14px; }
  .landing-aside-foot { margin-top: 0; flex-direction: row; align-items: center; gap: 8px; }
  .landing-aside-cta { display: none; }
  .landing-hero { padding: 52px 24px; justify-content: flex-start; }
  .landing-btn { min-width: 0; flex: 1 1 240px; }
}
@media (max-width: 520px) {
  .landing-menu .landing-menu-link { display: none; }   /* logo + toggle stay; sections via the hero buttons */
  .landing-actions { flex-direction: column; }
  .landing-btn { width: 100%; }
}
