/* ============================================================
   The Check-in Guide — Blog theme
   "Modern Concierge" — porcelain canvas · brass accent · evergreen
   Tokens mirror the main site (src/assets/styles.css) so /blog feels native.
   ============================================================ */

:root {
  --bg:          #f7f4ee;
  --bg-soft:     #fffdf9;
  --ink:         #19160f;
  --ink-soft:    #565047;
  --ink-faint:   #938b7c;
  --line:        #e7e0d2;
  --line-strong: #d6cdba;

  --accent:      #b6883e;
  --accent-deep: #8a6526;
  --accent-tint: #f3ead6;
  --accent-ink:  #1a1710;

  --dark:        #14241f;
  --dark-soft:   #1d3229;

  --serif: "Georgia", "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius:     14px;
  --radius-btn: 9px;
  --maxw:       1160px;
  --gutter:     clamp(20px, 5vw, 48px);

  --shadow-sm: 0 1px 2px rgba(25, 22, 15, .05);
  --shadow-md: 0 6px 20px -6px rgba(25, 22, 15, .14);
  --shadow-lg: 0 28px 60px -18px rgba(25, 22, 15, .26);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -0.015em; color: var(--ink); }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--accent-deep); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.cg-wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* brass eyebrow with a short leading rule */
.cg-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent-deep); font-family: var(--sans);
}
.cg-eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--accent); display: inline-block; }

/* ---------- Buttons ---------- */
.cg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  border: 1.5px solid transparent; border-radius: var(--radius-btn);
  padding: 11px 20px; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.cg-btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.cg-btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.cg-btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.cg-btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ---------- Brand mark ---------- */
.cg-brand {
  font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: -0.01em;
  color: var(--ink); display: inline-flex; align-items: center;
}
.cg-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; margin-left: 4px; margin-bottom: -2px; }

/* ---------- Nav ---------- */
.cg-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 238, .82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.cg-nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.cg-nav-links { display: flex; align-items: center; gap: 26px; margin-left: 8px; flex: 1; }
.cg-nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  transition: color .16s ease; position: relative;
}
.cg-nav-links a:hover { color: var(--ink); }
.cg-nav-links a.cg-nav-active { color: var(--accent-deep); font-weight: 600; }
.cg-nav-cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ---------- Blog index hero ---------- */
.cg-blog-hero { padding: clamp(48px, 8vw, 92px) 0 clamp(28px, 4vw, 44px); }
.cg-blog-title { font-size: clamp(34px, 6vw, 56px); margin-top: 16px; max-width: 16ch; }
.cg-blog-sub { margin-top: 18px; font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-soft); max-width: 52ch; }

/* ---------- Post grid + cards ---------- */
.cg-post-grid {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  padding-bottom: 20px;
}
.cg-card {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.cg-card-link { display: flex; flex-direction: column; height: 100%; }
.cg-card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--accent-tint); }
.cg-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cg-card:hover .cg-card-img img { transform: scale(1.03); }
.cg-card-img--placeholder { display: flex; align-items: center; justify-content: center; }
.cg-card-img--placeholder span { font-family: var(--serif); color: var(--accent-deep); font-size: 18px; opacity: .7; }
.cg-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cg-card-tag {
  align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-deep); background: var(--accent-tint);
  padding: 4px 10px; border-radius: 999px;
}
.cg-card-title { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.cg-card-excerpt { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.cg-card-meta { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-faint); padding-top: 8px; }
.cg-dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); display: inline-block; }

/* ---------- Single article ---------- */
.cg-article { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.cg-article-head { max-width: 760px; margin-inline: auto; text-align: center; }
.cg-article-head .cg-eyebrow { justify-content: center; }
.cg-article-title { font-size: clamp(32px, 5vw, 50px); margin-top: 18px; }
.cg-article-sub { margin-top: 20px; font-size: clamp(17px, 2.4vw, 20px); color: var(--ink-soft); }
.cg-article-meta { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; color: var(--ink-faint); }
.cg-article-figure { margin: clamp(32px, 5vw, 52px) auto 0; max-width: 960px; }
.cg-article-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.cg-article-figure figcaption { text-align: center; font-size: 13.5px; color: var(--ink-faint); margin-top: 12px; }
.cg-article-content { max-width: 720px; margin-inline: auto; margin-top: clamp(36px, 5vw, 56px); }

/* ---------- Prose (Ghost content) ---------- */
.cg-prose { font-size: 18px; line-height: 1.8; color: #26221a; text-align: justify; text-justify: inter-word; text-align-last: left; }
.cg-prose > * + * { margin-top: 1.5em; }
/* A calmer, larger opening paragraph with a brass drop cap sets an editorial tone */
.cg-prose > p:first-of-type { font-size: 20px; line-height: 1.6; color: var(--ink); }
.cg-prose > p:first-of-type::first-letter {
  float: left; font-family: var(--serif); font-weight: 600; font-size: 3.4em;
  line-height: .72; padding: 8px 12px 0 0; color: var(--brass-deep);
}
.cg-prose h2 { font-family: var(--serif); font-size: 30px; line-height: 1.2; margin-top: 1.8em; }
.cg-prose h3 { font-family: var(--sans); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; margin-top: 1.6em; }
.cg-prose h4 { font-family: var(--sans); font-weight: 700; font-size: 18px; margin-top: 1.4em; }
.cg-prose a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; text-decoration-color: var(--line-strong); }
.cg-prose a:hover { text-decoration-color: var(--accent); }
.cg-prose ul, .cg-prose ol { padding-left: 1.3em; }
.cg-prose li + li { margin-top: .5em; }
.cg-prose blockquote {
  border-left: 3px solid var(--accent); background: var(--accent-tint);
  margin: 1.6em 0; padding: 14px 22px; border-radius: 0 8px 8px 0;
  font-family: var(--serif); font-size: 20px; font-style: italic; color: var(--accent-ink);
}
.cg-prose img, .cg-prose .kg-image { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.cg-prose figure { margin: 1.8em 0; }
.cg-prose figcaption { text-align: center; font-size: 13.5px; color: var(--ink-faint); margin-top: 10px; }
.cg-prose hr { border: none; border-top: 1px solid var(--line); margin: 2.4em 0; }
.cg-prose code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em;
  background: #efe9dc; padding: 2px 6px; border-radius: 5px;
}
.cg-prose pre {
  background: var(--dark); color: #eef2ee; padding: 20px 22px;
  border-radius: var(--radius); overflow-x: auto; font-size: 14.5px; line-height: 1.6;
}
.cg-prose pre code { background: none; padding: 0; color: inherit; }

/* Koenig full/wide-width cards break out of the text column */
.cg-prose :is(.kg-width-wide) { margin-inline: -80px; }
.cg-prose :is(.kg-width-full) { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.cg-prose .kg-embed-card, .cg-prose .kg-card { margin-top: 1.8em; }

.cg-article-foot {
  margin-top: clamp(40px, 6vw, 64px); padding-top: 28px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
}

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 40px 0 12px; font-size: 14px; color: var(--ink-soft); }
.pagination a { color: var(--accent-deep); font-weight: 600; }
.pagination .page-number { color: var(--ink-faint); }

/* ---------- Footer ---------- */
.cg-footer { margin-top: clamp(48px, 8vw, 88px); border-top: 1px solid var(--line); background: var(--bg-soft); }
.cg-foot-inner { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; padding-block: clamp(40px, 6vw, 64px); }
.cg-foot-brand { max-width: 300px; }
.cg-foot-brand p { margin-top: 14px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; }
.cg-foot-cols { display: flex; gap: clamp(32px, 6vw, 72px); flex-wrap: wrap; }
.cg-foot-col { display: flex; flex-direction: column; gap: 12px; }
.cg-foot-col h5 { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.cg-foot-col a { font-size: 14.5px; color: var(--ink-soft); transition: color .16s ease; }
.cg-foot-col a:hover { color: var(--accent-deep); }
.cg-foot-bot { border-top: 1px solid var(--line); padding: 20px 0; text-align: center; font-size: 13px; color: var(--ink-faint); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cg-nav-links { display: none; }
}
@media (max-width: 600px) {
  .cg-nav-cta .cg-btn { padding: 9px 14px; }
  .cg-prose { font-size: 17px; text-align: left; }
  .cg-prose > p:first-of-type::first-letter { font-size: 3em; }
  .cg-prose :is(.kg-width-wide) { margin-inline: 0; }
  .cg-article-foot { flex-direction: column; align-items: stretch; }
  .cg-article-foot .cg-btn { width: 100%; }
}
