/* ─────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────── */
:root {
  --bg: #f4f1eb;
  --bg-card: #ffffff;
  --ink: #111a11;
  --ink-muted: #5a6357;
  --ink-faint: #9ca899;
  --accent: #4DA8E7;
  --accent-light: #7dc2f0;
  --accent-dim: #ddeef9;
  --border: #e0dbd0;
  --border-light: #ece8df;
  --shadow-sm: 0 1px 3px rgba(17, 26, 17, .06), 0 1px 2px rgba(17, 26, 17, .04);
  --shadow-md: 0 4px 16px rgba(17, 26, 17, .08), 0 2px 6px rgba(17, 26, 17, .04);
  --shadow-lg: 0 16px 48px rgba(17, 26, 17, .10), 0 4px 12px rgba(17, 26, 17, .06);
  --radius: 12px;
  --radius-lg: 20px;
  --font-head: 'Source Serif 4', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --max-w: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

::selection { background: var(--accent-dim); color: var(--accent); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(244, 241, 235, 0.7);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.nav.scrolled {
  background: rgba(244, 241, 235, 0.92);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.7; }
.nav-logo-mark { width: 44px; height: auto; flex-shrink: 0; }
.nav-logo-mark img { width: 100%; height: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: rgba(17, 26, 17, .05);
}

.nav-cta {
  background: var(--accent) !important;
  color: white !important;
  padding: 0.5rem 1.125rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.15s var(--ease-spring), box-shadow 0.2s !important;
}

.nav-cta:hover {
  background: #3a8cc4 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(77, 168, 231, .3) !important;
}

.nav-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-direction: column;
  gap: 5px;
  transition: background 0.2s;
}
.nav-hamburger:hover { background: rgba(17, 26, 17, .06); }
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}

.mobile-menu {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: rgba(244, 241, 235, 0.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem 1.5rem;
  z-index: 99;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--ease-out), opacity 0.25s;
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-menu-links a {
  display: block;
  padding: 0.75rem 0.875rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-muted);
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}
.mobile-menu-links a:hover { color: var(--ink); background: rgba(17, 26, 17, .05); }

.mobile-menu-links .mobile-cta {
  background: var(--accent);
  color: white !important;
  text-align: center;
  margin-top: 0.5rem;
  font-weight: 600 !important;
}
.mobile-menu-links .mobile-cta:hover { background: #3a8cc4; }

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s var(--ease-spring), box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(77, 168, 231, .25);
}
.btn-primary:hover {
  background: #3a8cc4;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(77, 168, 231, .3);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  transition: color 0.2s, border-color 0.2s, transform 0.15s var(--ease-spring);
  background: transparent;
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink-faint);
  transform: translateY(-1px);
}

.btn-arrow { width: 16px; height: 16px; transition: transform 0.2s var(--ease-spring); }
.btn-primary:hover .btn-arrow,
.btn-ghost:hover .btn-arrow { transform: translateX(3px); }

/* ─────────────────────────────────────────
   BLOG HERO
───────────────────────────────────────── */
.blog-hero {
  padding: 10rem 2rem 5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.blog-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.blog-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.blog-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--accent);
}

.blog-hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1rem;
  max-width: 24ch;
}

.blog-hero-sub {
  font-size: 1.1rem;
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 58ch;
}

/* ─────────────────────────────────────────
   BLOG LIST
───────────────────────────────────────── */
.blog-list-section {
  padding: 5rem 2rem 7rem;
}

.blog-list-inner {
  max-width: 860px;
  margin: 0 auto;
}

.blog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-card {
  display: block;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: border-color 0.25s var(--ease-out), background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.blog-card:hover {
  border-color: var(--border);
  background: var(--bg-card);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.75rem;
}

.blog-card-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.blog-card-title {
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.blog-card:hover .blog-card-title { color: var(--accent); }

.blog-card-excerpt {
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.65;
  max-width: 62ch;
  margin-bottom: 1rem;
}

.blog-card-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.blog-card-read svg { transition: transform 0.2s var(--ease-spring); }
.blog-card:hover .blog-card-read svg { transform: translateX(3px); }

.blog-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0;
}

/* ─────────────────────────────────────────
   ARTICLE
───────────────────────────────────────── */
.article-hero {
  padding: 9rem 2rem 3rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.article-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.article-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.article-breadcrumb:hover { color: var(--accent); }
.article-breadcrumb svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s var(--ease-spring);
}
.article-breadcrumb:hover svg { transform: translateX(-3px); }

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.25rem;
}

.article-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.article-lede {
  font-size: 1.2rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

.article-byline {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.article-byline-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.article-byline-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

.article-byline-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.article-byline-author {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.article-body-section {
  padding: 4rem 2rem 6rem;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.075rem;
  color: var(--ink);
  line-height: 1.75;
}

.article-body p {
  margin-bottom: 1.35rem;
  color: var(--ink);
}

.article-body p + p { margin-top: 0; }

.article-body h2 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ink);
  margin: 3rem 0 1rem;
}

.article-body h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin: 2.25rem 0 0.875rem;
}

.article-body h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 1.75rem 0 0.625rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.5rem 1.25rem;
  padding-left: 0.5rem;
}

.article-body li {
  margin-bottom: 0.6rem;
  line-height: 1.7;
}

.article-body ul li::marker { color: var(--accent); }
.article-body ol li::marker { color: var(--accent); font-weight: 600; }

.article-body strong { font-weight: 700; color: var(--ink); }
.article-body em { font-style: italic; }

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-dim);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.article-body a:hover { text-decoration-color: var(--accent); }

.article-body blockquote {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.6;
}

.article-body hr {
  border: 0;
  height: 1px;
  background: var(--border-light);
  margin: 3rem 0;
}

/* CTA card at end of article */
.article-cta {
  margin: 3.5rem auto 0;
  max-width: 720px;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.article-cta-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.625rem;
}

.article-cta-desc {
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

/* ─────────────────────────────────────────
   RELATED POSTS
───────────────────────────────────────── */
.related {
  padding: 4rem 2rem 6rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
}

.related-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.related-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.related-card {
  display: block;
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.related-card:hover {
  transform: translateY(-3px);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.related-card-meta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}

.related-card-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  transition: color 0.2s;
}

.related-card:hover .related-card-title { color: var(--accent); }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.footer {
  background: var(--ink);
  padding: 4rem 2rem 2.5rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(77, 168, 231, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 168, 231, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(77, 168, 231, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 168, 231, 0.04) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  z-index: 0;
}

.footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, var(--ink) 80%);
  z-index: 0;
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  margin-bottom: 1rem;
}

.footer-brand-logo-mark { width: 44px; height: auto; flex-shrink: 0; }
.footer-brand-logo-mark img { width: 100%; height: auto; display: block; }

.footer-brand-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.65;
  max-width: 40ch;
}

.footer-col-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}
.footer-links a:hover { color: white; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy { font-size: 0.8rem; color: rgba(255, 255, 255, 0.3); }

.footer-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  font-style: normal;
}

.footer-location svg {
  width: 14px;
  height: 14px;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   FADE ANIMATIONS
───────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .blog-hero { padding: 8rem 1.25rem 3.5rem; }
  .blog-list-section { padding: 3rem 1.25rem 5rem; }

  .article-hero { padding: 7rem 1.25rem 2.5rem; }
  .article-body-section { padding: 3rem 1.25rem 4rem; }

  .related { padding: 3rem 1.25rem 5rem; }
  .related-grid { grid-template-columns: 1fr; }

  .footer { padding: 3rem 1.25rem 2rem; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

@media (max-width: 600px) {
  .blog-card { padding: 1.5rem 1rem; }
  .article-body { font-size: 1rem; }
  .article-cta { padding: 2rem 1.25rem; margin-left: -0.25rem; margin-right: -0.25rem; }
}
