/* ============================================================
   GG Construction & Design — shared blog/article styles
   Mirrors the design tokens of the main site so blog pages
   feel native. Inline CSS in main index.html stays the source
   of truth for the homepage; this file extends it for /blog/*.
   ============================================================ */

:root {
  --bg: #F4F1EB;
  --bg-alt: #EAE5DB;
  --bg-inset: #E1DBCE;
  --surface: #FFFFFF;
  --text: #0E0E0E;
  --text-soft: #2A2A28;
  --text-muted: #6A655E;
  --border: rgba(14,14,14,0.12);
  --border-strong: rgba(14,14,14,0.22);
  --accent: #0E0E0E;
  --accent-contrast: #F4F1EB;
  --accent-warm: #6B5A3E;
  --shadow-md: 0 8px 30px rgba(14,14,14,0.06);
  --shadow-lg: 0 24px 60px rgba(14,14,14,0.18);
  --radius-sm: 2px;
  --radius-md: 4px;
  --maxw: 1320px;
  --maxw-article: 760px;
  --container-pad: clamp(20px, 4vw, 56px);
  --section-pad: clamp(64px, 8vw, 120px);
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}
[data-theme="dark"] {
  --bg: #0E0E0E;
  --bg-alt: #161614;
  --bg-inset: #1C1C19;
  --surface: #161614;
  --text: #EDE8DD;
  --text-soft: #D6D1C5;
  --text-muted: #8E887E;
  --border: rgba(237,232,221,0.12);
  --border-strong: rgba(237,232,221,0.22);
  --accent: #EDE8DD;
  --accent-contrast: #0E0E0E;
  --accent-warm: #B79768;
  --shadow-md: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .4s ease, color .4s ease;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: transparent; border: 0; color: inherit; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: var(--radius-sm); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}
.container--narrow { max-width: calc(var(--maxw-article) + var(--container-pad) * 2); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 300; }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); font-weight: 500; letter-spacing: -0.005em; }
h4 { font-size: 1rem; font-weight: 500; font-family: var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
p { margin: 0 0 1em; color: var(--text-soft); max-width: 62ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--border-strong); }
.lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 60ch;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: transparent; color: var(--text); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--text); background: var(--text); color: var(--bg); }
.btn--sm { padding: 10px 18px; font-size: 11px; }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--text);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--serif);
}
.logo-word {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
}
/* NAV — identical font properties across every state.
   Underline is a real border-bottom on the link itself.
   Hover and active produce the SAME visible line. */
.nav { display: flex; align-items: center; gap: 6px; }
.nav a,
.nav a:visited {
  display: inline-block;
  padding: 8px 10px 6px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 200;
  color: var(--text);
  letter-spacing: 0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
  white-space: nowrap;
}
.nav a:hover,
.nav a.is-active {
  border-bottom-color: currentColor;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  transition: border-color .2s, background-color .2s;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--text); }
.social-dropdown { position: relative; }
.social-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
  border-radius: var(--radius-md);
  z-index: 110;
}
.social-dropdown.is-open .social-panel { opacity: 1; pointer-events: auto; transform: translateY(0); }
.social-panel a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color .2s, background-color .2s;
}
.social-panel a:hover { color: var(--text); background: var(--bg-alt); }
.menu-toggle { display: none; }
@media (max-width: 1000px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  body.mobile-open { overflow: hidden; }
  body.mobile-open .nav {
    display: flex;
    position: fixed;
    inset: 70px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px var(--container-pad);
    gap: 4px;
    z-index: 90;
  }
  body.mobile-open .nav a { font-family: var(--serif); font-size: 28px; padding: 12px 0; font-weight: 300; }
}

/* Footer */
.site-footer {
  background: var(--text);
  color: var(--bg);
  padding: clamp(64px, 8vw, 96px) 0 32px;
  margin-top: clamp(80px, 8vw, 120px);
}
.site-footer h4 { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(32px, 3vw, 48px);
  padding-bottom: 56px;
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 16%, transparent);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 18px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 6px 0; }
.footer-grid a { font-size: 14px; color: color-mix(in srgb, var(--bg) 80%, transparent); transition: color .2s; }
.footer-grid a:hover { color: var(--bg); }
.footer-brand .logo { color: var(--bg); margin-bottom: 18px; }
.footer-brand .logo .logo-mark { border-color: var(--bg); color: var(--bg); }
.footer-brand p { color: color-mix(in srgb, var(--bg) 70%, transparent); font-size: 14px; max-width: 36ch; }
.footer-base {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: color-mix(in srgb, var(--bg) 60%, transparent);
}
.footer-base .socials { display: flex; gap: 6px; }
.footer-base .socials a {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  color: color-mix(in srgb, var(--bg) 70%, transparent);
  transition: color .2s;
}
.footer-base .socials a:hover { color: var(--bg); }

/* WhatsApp */
.wa { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.wa-button {
  width: 58px; height: 58px;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  transition: transform .25s ease;
}
.wa-button:hover { transform: translateY(-2px); }

/* Skip link */
.skip-link { position: absolute; top: -40px; left: 16px; background: var(--text); color: var(--bg); padding: 8px 14px; z-index: 1000; }
.skip-link:focus { top: 16px; }

/* ============================================================
   BLOG HUB
   ============================================================ */
.blog-hero {
  padding-top: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--border);
}
.blog-hero h1 { max-width: 18ch; }
.blog-hero p { max-width: 60ch; margin-top: 12px; }
.blog-hero .meta {
  display: flex; flex-wrap: wrap; gap: 20px;
  margin-top: 28px;
  font-size: 12px; letter-spacing: 0.04em; color: var(--text-muted);
}

.topic-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: clamp(28px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--border);
}
.topic-bar a {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 7px 14px;
  border: 1px solid var(--border);
  transition: color .2s, border-color .2s;
}
.topic-bar a:hover { color: var(--text); border-color: var(--text); }

.blog-section { padding: clamp(56px, 6vw, 88px) 0; }
.blog-section + .blog-section { border-top: 1px solid var(--border); }
.blog-section .section-eyebrow {
  font-family: var(--sans);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 500;
  margin: 0 0 clamp(28px, 3vw, 40px);
}

.featured-block {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding-bottom: clamp(48px, 5vw, 72px);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(48px, 5vw, 72px);
}
@media (max-width: 900px) { .featured-block { grid-template-columns: 1fr; } }
.featured-block .frame {
  aspect-ratio: 4/3;
  background: var(--bg-inset);
  overflow: hidden;
  position: relative;
}
.featured-block .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s ease; }
.featured-block:hover .frame img { transform: scale(1.04); }
.featured-block .featured-tag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  background: var(--text); color: var(--bg);
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 6px 10px; font-weight: 500;
}
.featured-block .meta-row {
  display: flex; gap: 16px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.featured-block h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.featured-block .byline {
  font-family: var(--serif); font-style: italic;
  font-size: 13px; color: var(--text-muted);
  margin: 16px 0 24px;
}
.featured-block a.title-link { color: inherit; text-decoration: none; }
.featured-block a.title-link:hover h2 { color: var(--text-muted); }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
}
@media (max-width: 900px) { .posts-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .posts-grid { grid-template-columns: 1fr; } }

.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.post-card a.post-link {
  display: flex; flex-direction: column;
  height: 100%;
  color: inherit; text-decoration: none;
}
.post-card .frame {
  aspect-ratio: 16/10;
  background: var(--bg-inset);
  overflow: hidden;
}
.post-card .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s ease; }
.post-card:hover .frame img { transform: scale(1.04); }
.post-card .body {
  padding: clamp(24px, 2.5vw, 32px);
  display: flex; flex-direction: column; gap: 12px;
  flex: 1;
}
.post-card .meta-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted);
}
.post-card h3 {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.005em;
}
.post-card p { font-size: 14px; color: var(--text-soft); margin: 0; max-width: 50ch; }
.post-card .byline {
  font-family: var(--serif); font-style: italic;
  font-size: 12px; color: var(--text-muted);
  margin: 4px 0 0;
}
.post-card .read {
  margin-top: auto; padding-top: 16px;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text); font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.post-card .read .arrow { transition: transform .3s ease; }
.post-card:hover .read .arrow { transform: translateX(4px); }

.cta-block {
  margin: clamp(64px, 8vw, 96px) 0 0;
  padding: clamp(48px, 6vw, 72px);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  text-align: center;
}
.cta-block h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 16px;
}
.cta-block p { margin: 0 auto 24px; max-width: 56ch; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-hero {
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--border);
}
.breadcrumbs {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.breadcrumbs a { color: var(--text-muted); transition: color .2s; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span.sep { margin: 0 10px; color: var(--border-strong); }
.article-hero .category {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.article-hero h1 {
  max-width: 22ch;
  margin: 0 0 28px;
}
.article-hero .lead { max-width: 60ch; margin-top: 8px; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.article-meta .author {
  font-family: var(--serif); font-style: italic;
  font-size: 14px; color: var(--text);
}
.article-meta .sep {
  width: 4px; height: 4px; border-radius: 999px;
  background: var(--border-strong);
}

.article-cover {
  margin: 0;
  padding: clamp(32px, 4vw, 48px) 0;
}
.article-cover .frame {
  aspect-ratio: 16/9;
  background: var(--bg-inset);
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-cover .frame img { width: 100%; height: 100%; object-fit: cover; }
.article-cover figcaption {
  font-size: 12px; color: var(--text-muted);
  margin-top: 12px;
  font-style: italic;
}

.article-body {
  padding-top: clamp(40px, 5vw, 64px);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-soft);
}
.article-body > * { max-width: var(--maxw-article); margin-left: auto; margin-right: auto; }
.article-body p { margin: 0 0 1.4em; }
.article-body h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 2em 0 .6em;
  padding-top: .4em;
}
.article-body h3 {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  font-weight: 500;
  color: var(--text);
  margin: 1.6em 0 .5em;
}
.article-body blockquote {
  margin: 1.5em 0;
  padding: 24px 28px;
  border-left: 2px solid var(--text);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-alt);
}
.article-body blockquote p { margin: 0; }
.article-body ul, .article-body ol {
  padding-left: 1.4em;
  margin: 0 0 1.4em;
  max-width: var(--maxw-article);
}
.article-body li { margin-bottom: .6em; }
.article-body li::marker { color: var(--text-muted); }
.article-body a { color: var(--text); border-bottom: 1px solid var(--border-strong); transition: border-color .2s; }
.article-body a:hover { border-color: var(--text); }
.article-body strong { color: var(--text); font-weight: 500; }
.article-body figure {
  margin: 2em auto;
}
.article-body figure img { width: 100%; height: auto; }
.article-body figcaption {
  font-size: 12px; color: var(--text-muted);
  margin-top: 10px; font-style: italic; text-align: center;
}

/* Author bio */
.author-bio {
  margin: clamp(56px, 6vw, 88px) auto 0;
  max-width: var(--maxw-article);
  padding: clamp(28px, 3vw, 40px);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: center;
}
@media (max-width: 600px) {
  .author-bio { grid-template-columns: 1fr; text-align: left; }
}
.author-bio .avatar {
  width: 80px; height: 80px;
  border-radius: 999px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 24px;
  color: var(--text);
}
.author-bio .role {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.author-bio h4 {
  font-family: var(--serif); text-transform: none; letter-spacing: -0.005em;
  color: var(--text); font-size: 1.2rem; font-weight: 500;
  margin: 0 0 6px;
}
.author-bio p { font-size: 14px; color: var(--text-soft); margin: 0; max-width: none; }

/* Related articles */
.related {
  padding: clamp(64px, 7vw, 96px) 0;
  border-top: 1px solid var(--border);
  margin-top: clamp(64px, 7vw, 96px);
}
.related-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; margin-bottom: clamp(32px, 3vw, 48px);
  flex-wrap: wrap;
}
.related-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 300;
  margin: 0;
}
.related-head a {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--text);
  padding-bottom: 4px;
  transition: opacity .2s;
}
.related-head a:hover { opacity: .6; }

/* Article foot CTA */
.article-end-cta {
  margin: clamp(48px, 5vw, 72px) auto 0;
  max-width: var(--maxw-article);
  padding: clamp(40px, 5vw, 64px);
  border: 1px solid var(--border);
  text-align: center;
  background: var(--bg);
}
.article-end-cta h3 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.article-end-cta p { margin: 0 auto 24px; max-width: 50ch; }

/* Section anchors offset for sticky header */
[id^="topic-"] { scroll-margin-top: 80px; }

@media (max-width: 600px) {
  .featured-block .meta-row,
  .post-card .meta-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}
