/* Gorilla Surplus blog: modern custom design on top of Ghost Source (built/screen.css).
   Loaded after Source's CSS. Templates using these classes: home.hbs, post.hbs,
   partials/post-card.hbs, partials/gorilla-shop-band.hbs, partials/components/footer.hbs.

   Brand: OD Green #4B5320, Urban Grey #8A8D8F, Navy #000080.
   From www.gorillasurplus.com: charcoal #1c1d1f / #383634, off-white #f3f3f1, condensed
   uppercase headings (Oswald stands in for the store's licensed Refrigerator Deluxe), Work Sans
   body, Roboto Mono labels. */

:root {
    --gs-od-green: #4B5320;
    --gs-od-green-dark: #3a4019;
    --gs-od-green-tint: #c9d19a;
    --gs-od-green-wash: #eef0e4;
    --gs-urban-grey: #8A8D8F;
    --gs-grey-text: #5f6264;       /* Urban Grey darkened for WCAG AA on white */
    --gs-navy: #000080;
    --gs-charcoal: #1c1d1f;
    --gs-charcoal-2: #2a2b2d;
    --gs-charcoal-3: #383634;
    --gs-offwhite: #f5f5f2;
    --gs-line: #e4e4de;
    --gs-radius: 14px;
    --gs-radius-sm: 8px;
    --gs-shadow: 0 1px 2px rgba(20, 22, 18, .06), 0 8px 24px rgba(20, 22, 18, .06);
    --gs-shadow-hover: 0 2px 4px rgba(20, 22, 18, .08), 0 18px 40px rgba(20, 22, 18, .14);

    --gs-font-display: "Oswald", "Arial Narrow", sans-serif;
    --gs-font-label: "Roboto Mono", Menlo, monospace;

    /* Source hooks */
    --gh-font-heading: var(--gs-font-display);
    --ghost-accent-color: var(--gs-od-green);
    --font-sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --color-primary-text: var(--gs-charcoal);
    --color-secondary-text: var(--gs-grey-text);
    --color-border: var(--gs-line);
    --background-color: #fff;
}

body {
    font-family: var(--font-sans);
    color: var(--gs-charcoal);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.is-title,
.gh-card-title,
.gh-article-title,
.gh-content :is(h2, h3, h4) {
    font-family: var(--gs-font-display);
    letter-spacing: 0.005em !important;
}

/* ============ Buttons and pills ============ */
.gs-button {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    padding: 1.2rem 2.2rem;
    border-radius: 999px;
    background: var(--gs-od-green);
    color: #fff;
    font-family: var(--gs-font-display);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: background-color .2s ease, transform .2s ease;
}
.gs-button:hover { background: var(--gs-od-green-dark); color: #fff; opacity: 1; transform: translateY(-1px); }
.gs-button-light { background: #fff; color: var(--gs-charcoal); }
.gs-button-light:hover { background: var(--gs-od-green-tint); color: var(--gs-charcoal); }
.gs-button-outline { background: transparent; color: var(--gs-charcoal); box-shadow: inset 0 0 0 2px var(--gs-charcoal); }
.gs-button-outline:hover { background: var(--gs-charcoal); color: #fff; }

.gs-pill {
    display: inline-block;
    padding: .45rem 1rem;
    border-radius: 999px;
    background: var(--gs-od-green);
    color: #fff;
    font-family: var(--gs-font-label);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: .14em;
    line-height: 1.4;
    text-transform: uppercase;
}
.gs-pill-light { background: rgba(255, 255, 255, .92); color: var(--gs-od-green-dark); }
.gs-eyebrow {
    margin: 0 0 .8rem;
    font-family: var(--gs-font-label);
    font-size: 1.2rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gs-od-green-tint);
}

/* ============ Navigation: sticky, translucent charcoal ============ */
.gh-navigation {
    position: sticky;
    top: 0;
    z-index: 90;
    background-color: rgba(28, 29, 31, .92);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    color: #fff;
    border-bottom: 3px solid var(--gs-od-green);
}
.gh-navigation-inner { min-height: 76px; }
.gh-navigation-actions,
.gh-navigation-menu,
.gh-navigation-brand { background-color: transparent; }
.gh-navigation-logo img { max-height: 50px; }
.gh-navigation-logo,
.gh-navigation .gh-icon-button,
.gh-navigation-menu .nav a { color: #fff; }
.gh-navigation-menu .nav a {
    font-family: var(--gs-font-display);
    font-size: 1.55rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .85;
}
.gh-navigation-menu .nav a:hover,
.gh-navigation-menu .nav .nav-current a { color: var(--gs-od-green-tint); opacity: 1; }
/* "Shop" is the last menu item: make it a button */
.gh-navigation-menu .nav li:last-child a {
    padding: .7rem 1.6rem;
    border-radius: 999px;
    background: var(--gs-od-green);
    color: #fff;
    opacity: 1;
}
.gh-navigation-menu .nav li:last-child a:hover { background: var(--gs-od-green-tint); color: var(--gs-charcoal); }
@media (max-width: 767px) {
    .gh-navigation.is-open,
    .gh-navigation.is-open .gh-navigation-menu,
    .gh-navigation.is-open .gh-navigation-actions { background-color: var(--gs-charcoal); }
    .gh-navigation-menu .nav li:last-child a { display: inline-block; margin-top: .8rem; }
}

/* ============ Home: intro ============ */
.gs-home-intro {
    padding-top: max(5vmin, 32px);
    padding-bottom: max(3vmin, 20px);
}
.gs-home-intro-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2.4rem 4rem;
}
.gs-home-title {
    margin: 0;
    font-family: var(--gs-font-display);
    font-size: clamp(3.4rem, 5vw, 6rem);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    color: var(--gs-charcoal);
}
.gs-home-description {
    max-width: 560px;
    margin: 1.2rem 0 0;
    font-size: 1.75rem;
    line-height: 1.55;
    color: var(--gs-grey-text);
}
.gs-topics { display: flex; flex-wrap: wrap; gap: .8rem; }
.gs-topic {
    padding: .8rem 1.5rem;
    border-radius: 999px;
    background: var(--gs-offwhite);
    box-shadow: inset 0 0 0 1px var(--gs-line);
    color: var(--gs-charcoal);
    font-size: 1.4rem;
    font-weight: 500;
    transition: background-color .2s, color .2s, box-shadow .2s;
}
.gs-topic:hover { background: var(--gs-od-green); color: #fff; box-shadow: none; opacity: 1; }

/* ============ Home: lead story + side cards ============ */
.gs-lead { padding-top: 1.6rem; }
.gs-lead-inner {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2.4rem;
}
.gs-lead-story { position: relative; }
.gs-lead-link {
    position: relative;
    display: block;
    height: 100%;
    min-height: 520px;
    overflow: hidden;
    border-radius: var(--gs-radius);
    background: var(--gs-charcoal);
    box-shadow: var(--gs-shadow);
}
.gs-lead-link:hover { opacity: 1; }
.gs-lead-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.gs-lead-link:hover .gs-lead-image { transform: scale(1.04); }
.gs-lead-overlay {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    padding: max(4vmin, 28px);
    padding-top: 18rem;
    background: linear-gradient(180deg, rgba(20, 21, 20, 0) 0%, rgba(20, 21, 20, .72) 45%, rgba(20, 21, 20, .94) 100%);
    color: #fff;
}
.gs-lead-title {
    margin: 0;
    font-family: var(--gs-font-display);
    font-size: clamp(3rem, 3.6vw, 4.8rem);
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
    color: #fff;
}
.gs-lead-excerpt { max-width: 620px; margin: 0; font-size: 1.7rem; line-height: 1.55; color: rgba(255, 255, 255, .86); }
.gs-lead-meta { font-size: 1.35rem; color: rgba(255, 255, 255, .7); }
.gs-lead-side { display: grid; gap: 2.4rem; }

/* ============ Cards ============ */
.gs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3.2rem 2.4rem;
}
.gs-card { display: block; }
.gs-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--gs-radius);
    background: #fff;
    box-shadow: var(--gs-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
}
.gs-card-link:hover { box-shadow: var(--gs-shadow-hover); transform: translateY(-3px); opacity: 1; }
.gs-card-image {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gs-offwhite);
}
.gs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.gs-card-link:hover .gs-card-image img { transform: scale(1.05); }
.gs-card-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gs-charcoal-3), var(--gs-od-green));
}
.gs-card-image .gs-pill { position: absolute; top: 1.2rem; left: 1.2rem; }
.gs-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 2.2rem 2.2rem;
}
.gs-card-title {
    margin: 0;
    font-size: 2.2rem !important;
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
    color: var(--gs-charcoal);
    transition: color .2s;
}
.gs-card-link:hover .gs-card-title { color: var(--gs-od-green); }
.gs-card-excerpt {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 1.5rem;
    line-height: 1.55;
    color: var(--gs-grey-text);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.gs-card-meta {
    display: flex;
    gap: 1.2rem;
    margin-top: auto;
    padding-top: .6rem;
    font-size: 1.3rem;
    color: var(--gs-grey-text);
}
.gs-card-meta span::before { content: "\00b7"; margin-right: 1.2rem; }

/* side variant: compact, image left */
.gs-card-side .gs-card-link { flex-direction: row; }
.gs-card-side .gs-card-image { flex: 0 0 42%; aspect-ratio: auto; min-height: 100%; }
.gs-card-side .gs-card-image .gs-pill { top: .9rem; left: .9rem; font-size: .95rem; }
.gs-card-side .gs-card-body { padding: 1.8rem; justify-content: center; }
.gs-card-side .gs-card-title { font-size: 1.9rem !important; }

/* ============ Sections ============ */
.gs-latest { padding-top: max(8vmin, 56px); }
.gs-section-head {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    margin-bottom: 2.8rem;
}
.gs-section-head::after { content: ""; flex: 1; height: 2px; background: var(--gs-line); }
.gs-section-title {
    margin: 0;
    font-family: var(--gs-font-display);
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.gs-section-title::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 1rem;
    border-radius: 3px;
    background: var(--gs-od-green);
    vertical-align: middle;
}
.gs-more { margin-top: 4rem; }

/* ============ Shop band ============ */
.gs-shop-band { padding-top: max(10vmin, 64px); }
.gs-shop-band-inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2.4rem;
    overflow: hidden;
    padding: max(5vmin, 36px) max(5vmin, 32px);
    border-radius: var(--gs-radius);
    background:
        radial-gradient(circle at 85% 20%, rgba(201, 209, 154, .22), transparent 45%),
        linear-gradient(120deg, var(--gs-od-green-dark), var(--gs-od-green));
    color: #fff;
}
.gs-shop-title {
    margin: 0;
    font-family: var(--gs-font-display);
    font-size: clamp(2.8rem, 3.4vw, 4.2rem);
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
    color: #fff;
}
.gs-shop-text { max-width: 560px; margin: 1rem 0 0; font-size: 1.65rem; color: rgba(255, 255, 255, .85); }

/* ============ Article ============ */
.gs-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 4px;
    pointer-events: none;
}
.gs-progress-bar {
    display: block;
    height: 100%;
    background: var(--gs-od-green-tint);
    transform: scaleX(0);
    transform-origin: 0 50%;
}
.gh-article-header { margin-top: max(6vmin, 40px); }
.gh-article-tag {
    display: inline-block;
    align-self: flex-start;
    width: fit-content;
    padding: .45rem 1.1rem;
    border-radius: 999px;
    background: var(--gs-od-green-wash);
    color: var(--gs-od-green) !important;
    font-family: var(--gs-font-label);
    font-size: 1.15rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.gh-article-title {
    font-size: clamp(3.6rem, 5.2vw, 6.4rem) !important;
    font-weight: 700;
    line-height: 1.02;
    text-transform: uppercase;
}
.gh-article-meta-date,
.gh-article-meta-content { color: var(--gs-grey-text); }
.gh-article-author-name { font-family: var(--font-sans) !important; font-weight: 600; }
.gh-article-image img { border-radius: var(--gs-radius); }
.gh-content { font-size: 1.85rem; line-height: 1.75; }
.gh-content > h2 { font-size: 3rem; font-weight: 600; text-transform: uppercase; }
.gh-content > h3 { font-size: 2.3rem; font-weight: 600; }
.gh-content img { border-radius: var(--gs-radius-sm); }
.gh-content a {
    color: var(--gs-navy);
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 128, .35);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.gh-content a:hover { color: var(--gs-od-green); text-decoration-color: currentColor; opacity: 1; }
.gh-content blockquote:not([class]) { border-left: 4px solid var(--gs-od-green); }
.gh-content .kg-embed-card iframe,
.gh-content iframe { border-radius: var(--gs-radius-sm); }
.gh-button,
.kg-btn-accent { background-color: var(--gs-od-green); color: #fff; }
.gh-button:hover { background-color: var(--gs-od-green-dark); }

/* Tag, author and archive pages use Source's feed: give its cards the same feel */
.gh-container-title {
    font-family: var(--gs-font-display);
    text-transform: uppercase;
    border-bottom: 3px solid var(--gs-od-green);
}
.gh-card-tag {
    font-family: var(--gs-font-label);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gs-od-green);
}

/* ============ Footer ============ */
.gs-footer {
    margin-top: max(10vmin, 64px);
    padding-top: max(7vmin, 48px);
    padding-bottom: 3rem;
    background: var(--gs-charcoal);
    color: rgba(255, 255, 255, .8);
}
.gs-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 4rem;
}
.gs-footer-logo img { max-height: 92px; }
.gs-footer-about { max-width: 380px; margin: 1.6rem 0; font-size: 1.5rem; line-height: 1.6; }
.gs-footer-heading {
    margin: 0 0 1.4rem;
    font-family: var(--gs-font-display);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
}
.gs-footer ul { margin: 0; padding: 0; list-style: none; }
.gs-footer li { margin: 0 0 .9rem; }
.gs-footer .nav { display: block; }
.gs-footer a { color: rgba(255, 255, 255, .8); font-size: 1.5rem; }
.gs-footer a:hover { color: var(--gs-od-green-tint); opacity: 1; }
.gs-footer .gs-footer-shop { margin-top: 1rem; color: #fff; font-size: 1.4rem; }
.gs-footer .gs-footer-shop:hover { color: #fff; }
.gs-social { justify-content: flex-start; }
.gs-social svg { fill: currentColor; }
.gs-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 5rem;
    padding-top: 2.4rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 1.3rem;
    color: rgba(255, 255, 255, .55);
}

/* ============ Responsive ============ */
@media (max-width: 1023px) {
    .gs-lead-inner { grid-template-columns: 1fr; }
    .gs-lead-link { min-height: 440px; }
    .gs-lead-side { grid-template-columns: 1fr 1fr; }
    .gs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gs-footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
    .gs-lead-link { min-height: 400px; }
    .gs-lead-side,
    .gs-grid { grid-template-columns: 1fr; }
    .gs-card-side .gs-card-image { flex-basis: 38%; }
    .gs-lead-excerpt { display: none; }
    .gs-footer-inner { grid-template-columns: 1fr; gap: 3rem; }
    .gs-shop-band-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .gs-card-link,
    .gs-card-image img,
    .gs-lead-image,
    .gs-button { transition: none; }
}
