/* Evolution brand layer — overrides Source tokens with the Evolution design system.
 * Source of truth: Evolution Design System (Claude Design), tokens/brand.css.
 * Light theme only. Loaded after screen.css so these values win. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap");

:root {
    --brand: #1FA971;
    --brand-deep: #14563B;
    --brand-soft: rgba(31, 169, 113, .13);
    --on-brand: #08130D;
    --sage: #93C0A4;
    --clay: #E4C4A0;

    --bg: #F3F4EF;
    --surface: #EAEDE4;
    --surface-2: #DCE5DD;
    --ink: #232B27;
    --ink-soft: #5C665F;
    --line: #D6DBD0;

    --ghost-accent-color: var(--brand);

    --color-white: var(--bg);
    --color-primary-text: var(--ink);
    --color-secondary-text: var(--ink-soft);
    --color-border: var(--line);
    --color-dark-border: var(--ink-soft);
    --color-light-gray: var(--surface-2);
    --color-lighter-gray: var(--surface);
    --color-mid-gray: var(--sage);
    --color-darker-gray: var(--ink);

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --font-serif: "Inter", Georgia, serif;
    --font-serif-alt: "Inter", Georgia, serif;

    --gh-font-heading: "Inter", sans-serif;
    --gh-font-body: "Inter", sans-serif;

    --background-color: var(--bg);
}

body {
    background-color: var(--bg);
    color: var(--ink);
}

a {
    color: var(--brand-deep);
}

.gh-head,
.gh-navigation {
    background-color: var(--bg);
    border-bottom: 1px solid var(--line);
}

.gh-card,
.post-card {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
}

blockquote {
    border-left: 3px solid var(--brand);
}

code,
pre {
    font-family: var(--font-mono);
}

:not(pre) > code {
    background-color: var(--brand-soft);
    color: var(--brand-deep);
    border-radius: 6px;
}

.gh-button,
button.gh-button,
.kg-btn {
    background-color: var(--brand);
    color: var(--on-brand);
    border-radius: 8px;
}

.gh-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
}

/* ---------- Evolution hero ---------- */
.gh-header,
.gh-header.is-classic {
    background: var(--bg) !important;
    background-image: none !important;
    color: var(--ink);
    margin-top: 0 !important;
    padding-top: clamp(24px, 3vw, 44px) !important;
    padding-bottom: 0 !important;
    display: block !important;
    overflow: hidden;
}

.gh-header.is-classic .gh-header-inner {
    align-items: stretch;
    text-align: left;
    max-width: var(--container-width);
    gap: 0;
}

.evo-hero {
    align-items: end;
}
.evo-hero-copy {
    padding-bottom: clamp(40px, 6vw, 72px);
}

.gh-header .gh-header-image {
    display: none !important;
}

.evo-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: clamp(24px, 5vw, 72px);
    width: 100%;
}

.evo-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.evo-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand-deep);
    background: var(--brand-soft);
    padding: 6px 12px;
    border-radius: 100px;
    margin-bottom: 22px;
}

.evo-hero-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(36px, 5.4vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 18px;
    text-wrap: balance;
}

.evo-hero-title .evo-accent {
    color: var(--brand);
}

.evo-hero-sub {
    font-family: var(--font-sans);
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 46ch;
    margin: 0 0 28px;
}

.evo-hero .gh-form {
    width: 100%;
    max-width: 460px;
    display: flex;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
}

.evo-hero .gh-form-input {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-sans);
    padding: 0 12px;
}

.evo-hero .gh-form .gh-button {
    background: var(--brand);
    color: var(--on-brand);
    border: 0;
    border-radius: 8px;
    font-weight: 600;
    padding: 12px 20px;
    white-space: nowrap;
}

.evo-hero-note {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-soft);
    margin: 12px 0 0;
}

.evo-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.evo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 15px;
    padding: 13px 22px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform .12s ease, background-color .12s ease;
}
.evo-btn svg { width: 15px; height: 15px; }
.evo-btn:hover { transform: translateY(-1px); }

.evo-btn-primary {
    background: var(--brand);
    color: var(--on-brand);
}
.evo-btn-primary:hover { background: var(--brand-deep); color: #fff; }

.evo-btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.evo-btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); }

.evo-hero-art {
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 440px;
}

.evo-hero-art img {
    position: relative;
    z-index: 2;
    width: auto;
    max-width: 92%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 30px 55px rgba(20, 86, 59, .20));
}

.evo-blob {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}
.evo-blob-1 {
    width: 340px; height: 340px;
    background: var(--sage);
    opacity: .28;
    top: 10px; right: -40px;
}
.evo-blob-2 {
    width: 190px; height: 190px;
    background: var(--clay);
    opacity: .38;
    bottom: 20px; left: 0;
}
.evo-blob-3 {
    width: 120px; height: 120px;
    background: var(--brand);
    opacity: .12;
    top: 120px; left: 60px;
}

.evo-hero-chip {
    position: absolute;
    z-index: 3;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 12px 28px rgba(20, 86, 59, .12);
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 210px;
}
.evo-hero-chip strong {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}
.evo-hero-chip span {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--ink-soft);
}
.evo-hero-chip-1 { top: 54%; left: -6%; }
.evo-hero-chip-2 { top: 0; right: -2%; }

@media (max-width: 880px) {
    .evo-hero-art { min-height: 300px; }
    .evo-hero-art img { height: 300px; }
    .evo-hero-chip { display: none; }
    .evo-blob-1 { width: 220px; height: 220px; }
}

@media (max-width: 880px) {
    .evo-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .evo-hero-copy {
        align-items: center;
        text-align: center;
    }
    .evo-hero-sub {
        margin-left: auto;
        margin-right: auto;
    }
    .evo-hero-art {
        order: -1;
    }
    .evo-hero-art img {
        max-width: 240px;
    }
}

/* Header logo sizing */
.gh-head-logo img,
.gh-navigation-logo img {
    max-height: 30px;
    width: auto;
}

/* ---------- Language switcher ---------- */
.evo-lang {
    position: relative;
    font-family: var(--font-sans);
}

.evo-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: border-color .12s ease, background-color .12s ease;
}
.evo-lang-toggle:hover { border-color: var(--brand); }
.evo-lang.is-open .evo-lang-toggle { border-color: var(--brand); background: var(--brand-soft); }

.evo-lang-flag { font-size: 16px; line-height: 1; }

.evo-lang-caret {
    width: 11px;
    height: 8px;
    color: var(--ink-soft);
    transition: transform .15s ease;
}
.evo-lang.is-open .evo-lang-caret { transform: rotate(180deg); }

.evo-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    list-style: none;
    margin: 0;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(20, 86, 59, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s;
    z-index: 40;
}
.evo-lang.is-open .evo-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.evo-lang-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}
.evo-lang-menu a:hover { background: var(--brand-soft); }
.evo-lang-menu a.is-active { color: var(--brand-deep); font-weight: 700; }

/* ---------- Search button ---------- */
.gh-navigation-brand .gh-search {
    display: none;
}
.gh-navigation-actions .gh-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    transition: color .12s ease, border-color .12s ease, background-color .12s ease;
}
.gh-navigation-actions .gh-search:hover {
    color: var(--brand-deep);
    border-color: var(--brand);
    background: var(--brand-soft);
}
.gh-navigation-actions .gh-search svg {
    width: 17px;
    height: 17px;
}

/* ---------- Evolution dark footer ---------- */
.evo-footer {
    background: #0d3f2b;
    color: #cfe6da;
    margin-top: clamp(40px, 6vw, 72px);
    padding-top: clamp(48px, 6vw, 72px);
    padding-bottom: 32px;
}

.evo-footer-inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.evo-footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(32px, 6vw, 80px);
    align-items: start;
}

.evo-footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.evo-footer-logo {
    width: 88px;
    height: auto;
}

.evo-footer-tagline {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
    max-width: 22ch;
    margin: 0;
}

.evo-footer-social {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}
.evo-footer-social a {
    color: #8fc9ac;
    display: inline-flex;
    transition: color .12s ease;
}
.evo-footer-social a:hover { color: #fff; }
.evo-footer-social svg { width: 20px; height: 20px; }

.evo-footer-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.evo-footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evo-footer-col-title {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #6fae8d;
    margin-bottom: 4px;
}

.evo-footer-col a {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #cfe6da;
    text-decoration: none;
    transition: color .12s ease;
}
.evo-footer-col a:hover { color: #35C489; }

.evo-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.evo-footer-wordmark {
    height: 24px;
    width: auto;
}

.evo-footer-copy {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #7fb99b;
}

@media (max-width: 760px) {
    .evo-footer-top { grid-template-columns: 1fr; }
    .evo-footer-bar { flex-direction: column; align-items: flex-start; }
}

/* ---------- Layout width ---------- */
:root {
    --container-width: 1120px;
    --grid-gap: 32px;
}

/* ---------- Post feed / grid ---------- */
.gh-container {
    padding-top: clamp(32px, 5vw, 56px);
    padding-bottom: clamp(56px, 8vw, 96px);
}

.gh-container-title {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
    margin-bottom: 8px;
}

.gh-container.is-grid .gh-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    row-gap: calc(var(--grid-gap) * 1.4);
}

@media (max-width: 1000px) {
    .gh-container.is-grid .gh-feed { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .gh-container.is-grid .gh-feed { grid-template-columns: 1fr; }
}

/* remove Source's divider pseudo-elements on grid cards */
.gh-container.is-grid .gh-card:before,
.gh-container.is-grid .gh-card:after {
    display: none;
}

.gh-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.gh-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(20, 86, 59, .10);
}

.gh-card .gh-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.gh-card .gh-card-image {
    aspect-ratio: 16 / 9;
    width: 100%;
    margin: 0;
    overflow: hidden;
}
.gh-card .gh-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gh-card .gh-card-wrapper {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.gh-card .gh-card-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-deep);
    margin: 0;
}

.gh-card .gh-card-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.25;
    color: var(--ink);
    margin: 0;
}
.gh-card:hover .gh-card-title { color: var(--brand-deep); }

.gh-card .gh-card-excerpt {
    color: var(--ink-soft);
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0;
}

.gh-card .gh-card-meta {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-soft);
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
    line-height: 1.4;
}
.gh-card .gh-card-author { white-space: nowrap; }
.gh-card .gh-card-date { white-space: nowrap; }
.gh-card-author + .gh-card-date::before {
    content: "·" !important;
    margin: 0 6px 0 2px !important;
}

.gh-article-title,
.post-card-title {
    color: var(--ink);
}
.gh-article-title:hover,
.post-card-title a:hover {
    color: var(--brand-deep);
}
