/* =====================================================================
   GROW-CODE — site components (built on carbon.css tokens)
   ===================================================================== */

/* ---------------- top bar / nav ---------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--border-subtle); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: var(--sp-06); }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-serif); font-weight: 600; font-size: 1.35rem; color: var(--text-primary); letter-spacing: -0.01em; text-decoration: none; }
.brand:hover { text-decoration: none; color: var(--text-primary); }
.brand-mark { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--khaki)); color: #fff; font-weight: 700; font-family: var(--font-sans); }
.brand small { display: block; font-family: var(--font-sans); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-helper); font-weight: 600; }
.brand-mark-img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #fff; flex: none; box-shadow: 0 0 0 1px rgba(42,32,25,.06); }
.site-footer .brand-mark-img { width: 44px; height: 44px; }
.admin-brand .brand-mark-img { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: var(--sp-06); list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text-secondary); font-size: .95rem; font-weight: 500; padding: 6px 0; position: relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--brand); text-decoration: none; }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--khaki); }
.nav-actions { display: flex; align-items: center; gap: var(--sp-04); }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; background: transparent; border: none; color: var(--text-secondary); cursor: pointer; }
.icon-btn:hover { background: var(--layer-hover); color: var(--brand); }
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .nav-links { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--layer-01); border-bottom: 1px solid var(--border-subtle); padding: var(--sp-04) var(--sp-06); box-shadow: var(--shadow-md); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity var(--dur-fast), transform var(--dur-fast); }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
  .nav .btn { display: none; }
}

/* ---------------- hero (recent post) ---------------- */
.hero { position: relative; background: var(--layer-02); border-bottom: 1px solid var(--border-subtle); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 560px; }
.hero-copy { padding: var(--sp-11) var(--sp-09); display: flex; flex-direction: column; justify-content: center; }
.hero-media { position: relative; background: var(--layer-03); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content:""; position:absolute; inset:0; background: linear-gradient(120deg, var(--layer-02) 0%, transparent 22%); }
.hero .kicker { display:inline-flex; align-items:center; gap:8px; margin-bottom: var(--sp-05); }
.hero h1 { margin: var(--sp-03) 0 var(--sp-05); }
.hero .meta { display: flex; gap: var(--sp-05); flex-wrap: wrap; color: var(--text-helper); font-size: .85rem; margin-bottom: var(--sp-06); }
.hero-actions { display: flex; gap: var(--sp-04); flex-wrap: wrap; margin-top: var(--sp-05); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-media { min-height: 260px; order: -1; }
  .hero-copy { padding: var(--sp-09) var(--sp-06); }
}

/* ---------------- founder welcome band ---------------- */
.founder { background: var(--khaki); color: #fdfaf3; }
:root[data-theme="dark"] .founder { background: var(--khaki-deep); }
.founder-grid { display: grid; grid-template-columns: 220px 1fr; gap: var(--sp-09); align-items: center; }
.founder-photo { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,.35); background: rgba(255,255,255,.15); display:grid; place-items:center; font-family: var(--font-serif); font-size: 3rem; color:#fff; }
.founder blockquote { font-family: var(--font-serif); font-size: clamp(1.2rem, 2.2vw, 1.7rem); line-height: 1.45; margin: 0 0 var(--sp-05); font-style: italic; }
.founder .who { font-weight: 600; font-size: 1.05rem; }
.founder .who span { display:block; font-weight: 400; opacity: .85; font-size: .9rem; }
.founder .quote-mark { font-family: var(--font-serif); font-size: 4rem; line-height: .5; opacity: .5; }
@media (max-width: 760px) { .founder-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

/* ---------------- section heading ---------------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-06); margin-bottom: var(--sp-08); flex-wrap: wrap; }
.sec-head p { margin: var(--sp-03) 0 0; max-width: 42rem; }

/* ---------------- article cards ---------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-06); }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; background: var(--layer-01); border: 1px solid var(--border-subtle); overflow: hidden; transition: box-shadow var(--dur-mod) var(--ease-standard), transform var(--dur-mod) var(--ease-standard); height: 100%; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-media { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--layer-03), var(--layer-02)); overflow: hidden; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-standard); }
.card:hover .card-media img { transform: scale(1.04); }
.card-media .placeholder { position:absolute; inset:0; display:grid; place-items:center; color:var(--khaki); font-family:var(--font-serif); font-size:2.4rem; }
.card-cat { position: absolute; top: 12px; left: 12px; }
.card-body { padding: var(--sp-06); display: flex; flex-direction: column; gap: var(--sp-04); flex: 1; }
.card-body h3 { font-family: var(--font-serif); font-size: 1.28rem; line-height: 1.22; }
.card-body h3 a { color: var(--text-primary); }
.card-body h3 a:hover { color: var(--brand); text-decoration: none; }
.card-excerpt { color: var(--text-secondary); font-size: .95rem; flex: 1; }
.card-meta { display: flex; align-items: center; gap: var(--sp-04); color: var(--text-helper); font-size: .8rem; margin-top: auto; padding-top: var(--sp-03); border-top: 1px solid var(--border-subtle); }

/* feature (large) card */
.card-feature { grid-column: span 2; grid-row: span 2; }
.card-feature .card-media { aspect-ratio: auto; height: 100%; min-height: 320px; }
.card-feature .card-body h3 { font-size: 1.8rem; }
@media (max-width: 900px) { .card-feature { grid-column: span 2; grid-row: auto; } .card-feature .card-media { min-height: 220px; } }
@media (max-width: 600px) { .card-feature { grid-column: span 1; } }

/* ---------------- initiatives ---------------- */
.init-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-06); }
@media (max-width: 900px) { .init-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .init-grid { grid-template-columns: 1fr; } }
.init { padding: var(--sp-07); background: var(--layer-01); border: 1px solid var(--border-subtle); border-top: 3px solid var(--khaki); }
.init .ic { width: 44px; height: 44px; color: var(--brand); margin-bottom: var(--sp-05); }
.init h3 { font-size: 1.15rem; margin-bottom: var(--sp-03); }
.init p { color: var(--text-secondary); font-size: .92rem; margin: 0; }

/* ---------------- newsletter band ---------------- */
.newsletter { background: var(--forest); color: #f3f0e6; position: relative; overflow: hidden; }
.newsletter::before { content:""; position:absolute; right:-80px; top:-80px; width:320px; height:320px; border-radius:50%; background: rgba(255,255,255,.05); }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-09); align-items: center; position: relative; }
.newsletter h2 { color: #fff; }
.newsletter p { color: rgba(255,255,255,.82); }
.subscribe-form { display: flex; flex-direction: column; gap: var(--sp-04); }
.subscribe-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-04); }
.subscribe-form .input { background: rgba(255,255,255,.12); border-bottom-color: rgba(255,255,255,.5); color: #fff; }
.subscribe-form .input::placeholder { color: rgba(255,255,255,.7); }
.subscribe-form .input:focus { outline-color: #fff; background: rgba(255,255,255,.18); }
.subscribe-note { font-size: .8rem; color: rgba(255,255,255,.65); }
@media (max-width: 760px) { .newsletter-inner { grid-template-columns: 1fr; } .subscribe-form .row { grid-template-columns: 1fr; } }

/* ---------------- page hero (interior) ---------------- */
.page-hero { background: var(--layer-02); border-bottom: 1px solid var(--border-subtle); padding: var(--sp-10) 0 var(--sp-09); }
.page-hero .t-eyebrow { margin-bottom: var(--sp-04); display:block; }

/* ---------------- article (single) ---------------- */
.article-head { max-width: 48rem; margin: 0 auto; }
.article-hero-img { max-width: 60rem; margin: var(--sp-08) auto 0; aspect-ratio: 16/8; overflow: hidden; background: var(--layer-03); }
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.prose { max-width: 44rem; margin: 0 auto; font-size: 1.12rem; line-height: 1.75; color: var(--text-primary); }
.prose p { margin: 0 0 var(--sp-06); }
.prose h2 { font-family: var(--font-serif); font-size: 1.7rem; margin: var(--sp-08) 0 var(--sp-04); }
.prose h3 { font-family: var(--font-serif); font-size: 1.35rem; margin: var(--sp-07) 0 var(--sp-04); }
.prose img, .prose figure { margin: var(--sp-07) auto; }
.prose figure img { width: 100%; }
.prose blockquote { margin: var(--sp-07) 0; padding: var(--sp-04) var(--sp-06); border-left: 4px solid var(--khaki); background: var(--layer-02); font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; color: var(--text-secondary); }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 var(--sp-06); padding-left: 1.5em; }
.prose li { margin-bottom: var(--sp-03); }
.prose strong { color: var(--text-primary); }
.prose hr { margin: var(--sp-08) 0; }
.article-byline { display: flex; align-items: center; gap: var(--sp-04); margin-top: var(--sp-06); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--khaki)); color:#fff; display:grid; place-items:center; font-weight:600; font-size:.9rem; flex:none; overflow:hidden; }
.avatar img { width:100%; height:100%; object-fit:cover; }
.share-row { display:flex; gap: var(--sp-03); align-items:center; }
.share-row a { width:40px; height:40px; display:grid; place-items:center; border:1px solid var(--border-subtle); color: var(--text-secondary); }
.share-row a:hover { border-color: var(--brand); color: var(--brand); text-decoration:none; }

/* ---------------- comments ---------------- */
.comment { padding: var(--sp-05) 0; border-bottom: 1px solid var(--border-subtle); display: flex; gap: var(--sp-04); }
.comment .who { font-weight: 600; font-size: .95rem; }
.comment .when { color: var(--text-helper); font-size: .8rem; }
.comment p { margin: var(--sp-02) 0 0; color: var(--text-secondary); }

/* ---------------- pagination ---------------- */
.pagination { display: flex; gap: var(--sp-02); justify-content: center; margin-top: var(--sp-09); flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: .9rem; text-decoration: none; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ---------------- filter bar ---------------- */
.filter-bar { display: flex; gap: var(--sp-04); flex-wrap: wrap; align-items: center; margin-bottom: var(--sp-08); }
.chips { display: flex; gap: var(--sp-03); flex-wrap: wrap; }
.chip { padding: 8px 14px; border: 1px solid var(--border-subtle); background: var(--layer-01); color: var(--text-secondary); font-size: .875rem; text-decoration: none; }
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.search-box { position: relative; margin-left: auto; }
.search-box .input { padding-right: 44px; min-width: 240px; }
.search-box button { position: absolute; right: 4px; top: 4px; }

/* ---------------- footer ---------------- */
.site-footer { background: #241a12; color: #cbb99f; margin-top: var(--sp-11); }
:root[data-theme="light"] .site-footer { background: #2A2019; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: var(--sp-08); padding: var(--sp-10) 0 var(--sp-08); }
.site-footer .brand, .site-footer h4 { color: #f3ead9; }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--sp-05); color:#b7a276; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-03); }
.site-footer a { color: #cbb99f; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.site-footer p { color: #a3906f; font-size: .92rem; }
.footer-social { display:flex; gap: var(--sp-03); margin-top: var(--sp-05); }
.footer-social a { width:40px; height:40px; border:1px solid #45372a; display:grid; place-items:center; color:#cbb99f; }
.footer-social a:hover { border-color:#8c7b4c; color:#fff; }
.footer-bottom { border-top: 1px solid #3a2c1f; padding: var(--sp-06) 0; display: flex; justify-content: space-between; gap: var(--sp-04); flex-wrap: wrap; align-items:center; }
.footer-bottom .dev { color:#8c7b4c; font-size:.85rem; }
.footer-bottom .dev strong { color:#c9a978; font-weight:600; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------- empty state ---------------- */
.empty { text-align: center; padding: var(--sp-11) var(--sp-06); color: var(--text-secondary); }
.empty svg { color: var(--border-strong); margin: 0 auto var(--sp-05); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease-entrance), transform .6s var(--ease-entrance); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
