/* Ecogleam blog (/blog/, /si/blog/, /ta/blog/). Same colours, fonts, header and footer as about.html. */
:root {
  --mist: #f3f7f6; --paper: #ffffff; --ink: #0f2a31; --ink-soft: #4a6168; --line: #d6e2e0;
  --water: #0a86b4; --water-2: #00a7a6; --leaf: #4da146; --leaf-2: #8fc23a;
  --deep: #0b2a34; --on-deep: #e8f4f3; --on-deep-soft: #a9c4c6;
  --warn: #c2410c;
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Mukta", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 14px; --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mist: #08191e; --paper: #0e242b; --ink: #e4efee; --ink-soft: #9db4b7; --line: #1f3a41;
    --water: #3db4e3; --water-2: #2fd0c6; --leaf: #7cc46e; --leaf-2: #b3dc63;
    --deep: #0f3541; --warn: #fb923c; color-scheme: dark;
  }
}
.lang-si { --font-body: "Noto Sans Sinhala", "Mukta", system-ui, sans-serif; --font-display: "Noto Sans Sinhala", Georgia, serif; }
.lang-ta { --font-body: "Noto Sans Tamil", "Mukta", system-ui, sans-serif; --font-display: "Noto Sans Tamil", Georgia, serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 400 17px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--water); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
.eyebrow { font: 500 12px/1.3 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--water); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px; border-radius: 999px; font: 600 15px/1.1 var(--font-body); text-decoration: none; transition: transform .2s ease, background .2s ease, color .2s ease; border: 1px solid transparent; text-align: center; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--water); color: #fff; }
.btn-primary:hover { background: var(--water-2); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--water); color: var(--water); }

/* Header */
header.site { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--mist) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .b-mark { height: 40px; width: auto; }
.brand .b-word { height: 25px; width: auto; }
.brand small { display: block; font: 500 10px/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
nav.main { display: flex; align-items: center; gap: 26px; font-family: "Mukta", system-ui, sans-serif; }
nav.main a.lnk { text-decoration: none; font-size: 15px; color: var(--ink-soft); }
nav.main a.lnk:hover, nav.main a.lnk[aria-current] { color: var(--ink); }
nav.main a.lnk[aria-current] { font-weight: 600; }
nav.main .btn { padding: 11px 18px; font-size: 14px; }
@media (max-width: 900px) { nav.main a.lnk { display: none; } }
@media (max-width: 420px) { .brand small { display: none; } }

/* Hero */
.post-hero { background: var(--deep); color: var(--on-deep); padding-block: clamp(40px, 6vw, 72px) clamp(36px, 5vw, 56px); position: relative; overflow: hidden; }
.post-hero::before { content: ""; position: absolute; width: 900px; height: 900px; right: -420px; top: -520px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, #00a7a6 24%, transparent), transparent 62%); pointer-events: none; }
.post-hero .wrap { position: relative; }
.post-hero .eyebrow { color: #b3dc63; margin-top: 18px; }
.post-hero h1 { font-size: clamp(34px, 4.6vw, 60px); margin-top: 14px; max-width: 22ch; color: #fff; }
.post-hero h1 em { font-style: italic; color: #8fe0f5; }
.post-hero .lede { margin-top: 18px; max-width: 40em; color: var(--on-deep-soft); font-size: clamp(17px, 1.5vw, 19px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font: 400 13px/1.4 var(--font-body); color: var(--on-deep-soft); }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.crumbs a { color: #8fe0f5; text-decoration: none; }
.crumbs li:last-child { max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.langs { margin-bottom: 16px; font-size: 14px; color: var(--on-deep-soft); }
.langs a { color: #8fe0f5; text-decoration: none; }
.langs a[aria-current] { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font: 400 13px/1.4 var(--font-mono); color: var(--on-deep-soft); }
.post-cover { margin: 32px 0 0; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(232,244,243,.18); box-shadow: 0 28px 80px rgba(0,0,0,.35); }
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; }

/* Article */
.post-main { padding-block: clamp(44px, 6vw, 80px); }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.post-body { max-width: 760px; min-width: 0; }
.post-body > * + * { margin-top: 20px; }
.post-body h2 { margin-top: 48px; font-size: clamp(28px, 2.8vw, 38px); }
.post-body h3 { margin-top: 30px; font: 600 19px/1.35 var(--font-body); color: var(--water); }
.post-body p, .post-body li { font-size: 17px; line-height: 1.8; color: var(--ink-soft); }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body a { color: var(--water); text-underline-offset: 3px; }
.post-body ul, .post-body ol { padding-left: 22px; display: grid; gap: 8px; margin-bottom: 0; }
.post-body .h2o-post__lead { font-size: 20px; line-height: 1.7; color: var(--ink); }
.post-body figure { margin: 34px 0 0; }
.post-body figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.post-body figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.h2o-post__callout { padding: 20px 22px; border-left: 3px solid var(--leaf); border-radius: 0 12px 12px 0; background: color-mix(in srgb, var(--leaf) 9%, var(--paper)); }
.h2o-post__callout--warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--paper)); }
.h2o-post__callout p { font-size: 16px; }
.h2o-post__table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.h2o-post__table { width: 100%; border-collapse: collapse; }
.h2o-post__table th, .h2o-post__table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.h2o-post__table tr:last-child td { border-bottom: 0; }
.h2o-post__table th { color: var(--ink); font: 500 11.5px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; background: color-mix(in srgb, var(--water) 6%, var(--paper)); }
.h2o-post__sources { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.h2o-post__sources h2 { margin-top: 0; font: 500 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--water); }
.h2o-post__sources ul { margin-top: 14px; }
.h2o-post__sources li { font-size: 14px; line-height: 1.6; }
.post-origin { margin-top: 40px; padding-top: 18px; border-top: 1px dashed var(--line); font-size: 14px !important; color: var(--ink-soft); }

/* Sidebar */
.post-aside { position: sticky; top: 96px; display: grid; gap: 18px; }
.cta-card { border-radius: calc(var(--radius) + 4px); padding: 26px; background: var(--deep); color: var(--on-deep); display: grid; gap: 14px; }
.cta-card .eyebrow { color: #b3dc63; }
.cta-card h2 { font-size: 24px; color: #fff; }
.cta-card .btns { display: grid; gap: 10px; }
.cta-card .btn-primary { background: var(--on-deep); color: #0b2a34; }
.cta-card .btn-primary:hover { background: #b3dc63; }
.cta-card .btn-ghost { color: var(--on-deep); border-color: rgba(232,244,243,.3); }
.cta-card .more a { color: #8fe0f5; font-size: 14px; text-decoration: none; }
.related { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.related ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.related a { color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.45; }
.related a:hover { color: var(--water); }
@media (max-width: 960px) { .post-layout { grid-template-columns: 1fr; } .post-aside { position: static; } }

/* Blog index */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--water) 50%, var(--line)); box-shadow: 0 20px 50px rgba(11,42,52,.12); }
.card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--deep); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body .eyebrow { color: var(--leaf); }
.card h2 { font-size: 24px; }
.card-body p:not(.eyebrow) { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.card-more { margin-top: auto; padding-top: 6px; font: 600 14px/1 var(--font-body); color: var(--water); }
.card--feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.card--feature .card-img { aspect-ratio: auto; min-height: 320px; }
.card--feature .card-body { padding: clamp(26px, 3vw, 44px); justify-content: center; }
.card--feature h2 { font-size: clamp(28px, 3vw, 40px); }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } .card--feature { grid-template-columns: 1fr; } .card--feature .card-img { min-height: 0; aspect-ratio: 16 / 10; } }

/* Footer */
footer { background: var(--deep); color: var(--on-deep-soft); padding-block: 56px 36px; font: 400 15px/1.65 "Mukta", system-ui, sans-serif; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.foot h4 { margin: 0 0 14px; font: 500 11px/1 "IBM Plex Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--on-deep); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; color: var(--on-deep-soft); }
.foot a:hover { color: var(--on-deep); }
.wordmark { font: 600 26px/1 "Mukta", sans-serif; }
.wordmark .eco { color: #b3dc63; } .wordmark .gleam { color: #5cc6ee; }
.foot .tagline { margin-top: 14px; max-width: 28em; }
.legal { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(232,244,243,.16); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font: 400 12.5px/1.5 "IBM Plex Mono", monospace; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > div:first-child { grid-column: 1 / -1; } }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.wa-float:hover { transform: scale(1.05); }
@media (max-width: 640px) { .crumbs li:last-child { display: none; } }
