:root {
    --fg-bg: #111111;
    --fg-bg-soft: #181818;
    --fg-panel: #202020;
    --fg-panel-hover: #282828;
    --fg-text: #f2f2f2;
    --fg-muted: #b8b8b8;
    --fg-line: #333333;
    --fg-accent: #9c7c38;
    --fg-accent-light: #c6a95e;
    --fg-max-width: 1120px;
    --fg-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #252018 0, var(--fg-bg) 38rem);
    color: var(--fg-text);
}

body.fg-lightbox-open {
    overflow: hidden;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.fg-shell {
    width: min(var(--fg-max-width), calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 4rem;
}

.fg-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    min-height: 1.4rem;
    padding: 0.5rem 0 1.6rem;
}

.fg-brand {
    color: var(--fg-accent);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.fg-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--fg-muted);
    font-size: 0.94rem;
}

.fg-breadcrumbs a {
    color: var(--fg-text);
    text-decoration: none;
}

.fg-breadcrumbs a:hover,
.fg-back a:hover {
    color: var(--fg-accent);
}

.fg-intro {
    max-width: 860px;
    margin-bottom: 2.15rem;
}

.fg-back {
    margin: 0 0 1rem;
}

.fg-back a,
.fg-button {
    color: var(--fg-accent);
    text-decoration: none;
}

h1,
h2,
h3 {
    line-height: 1.12;
    margin: 0;
}

h1 {
    font-size: clamp(1.9rem, 4.6vw, 3.4rem);
    letter-spacing: -0.04em;
}

h1 span,
h3 span {
    color: var(--fg-accent);
    font-weight: 500;
}

h2 {
    margin-bottom: 1rem;
    color: var(--fg-accent);
    font-size: clamp(1.3rem, 2vw, 1.75rem);
}

.fg-description {
    margin-top: 1.2rem;
    color: var(--fg-muted);
    font-size: 1.08rem;
    line-height: 1.72;
}

.fg-description p,
.fg-card-description p {
    margin: 0 0 0.75rem;
}

.fg-description p:last-child,
.fg-card-description p:last-child {
    margin-bottom: 0;
}

.fg-section {
    margin-top: 2.25rem;
}

.fg-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 350px));
    justify-content: start;
    gap: 1rem;
}

.fg-card {
    overflow: hidden;
    border: 1px solid var(--fg-line);
    border-radius: 1.1rem;
    background: linear-gradient(180deg, var(--fg-panel), #171717);
    box-shadow: var(--fg-shadow);
}

.fg-card-link {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    text-decoration: none;
}

.fg-card-image {
    position: relative;
    aspect-ratio: 1.45 / 1;
    overflow: hidden;
    background: #101014;
}

.fg-card-image img,
.fg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease, filter 180ms ease;
}

.fg-card:hover img,
.fg-image:hover img {
    transform: scale(1.025);
    filter: brightness(1.08);
}

.fg-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: rgba(255, 255, 255, 0.34);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fg-card-body {
    padding: 1rem;
}

.fg-card-body h3 {
    font-size: 1.25rem;
}

.fg-meta {
    margin: 0.55rem 0 0;
    color: var(--fg-accent);
    font-size: 0.9rem;
}

.fg-card-description {
    margin-top: 0.75rem;
    color: var(--fg-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.fg-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    justify-content: start;
    gap: 0.8rem;
}

.fg-image {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--fg-line);
    border-radius: 0.85rem;
    aspect-ratio: 1 / 1;
    background: var(--fg-panel);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}


.fg-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    margin-top: 3rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--fg-line);
    color: var(--fg-muted);
    font-size: 0.95rem;
}

.fg-footer a {
    color: var(--fg-muted);
    text-decoration: none;
}

.fg-footer a:hover,
.fg-footer a:focus-visible {
    color: var(--fg-accent-light);
}

.fg-empty {
    border: 1px dashed var(--fg-line);
    border-radius: 1rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.035);
    color: var(--fg-muted);
}

.fg-empty h1,
.fg-empty h2 {
    margin-bottom: 0.8rem;
    color: var(--fg-text);
}


.fg-back-to-top {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 30;
    display: grid;
    width: 3.05rem;
    height: 3.05rem;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(242, 242, 242, 0.22);
    border-radius: 999px;
    background: rgba(24, 24, 24, 0.82);
    color: var(--fg-text);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(10px);
    transform: translateY(0.4rem);
    transition: opacity 180ms ease, transform 180ms ease, background 160ms ease, border-color 160ms ease;
}

.fg-back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.fg-back-to-top:hover,
.fg-back-to-top:focus-visible {
    background: rgba(156, 124, 56, 0.88);
    border-color: rgba(198, 169, 94, 0.75);
}

.fg-back-to-top svg {
    display: block;
    width: 1.55rem;
    height: 1.55rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.55;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

body.fg-lightbox-open .fg-back-to-top {
    opacity: 0;
    pointer-events: none;
}

.fg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    background: #000;
}

.fg-lightbox:focus {
    outline: none;
}

.fg-lightbox.is-open {
    display: flex;
}

.fg-lightbox figure {
    display: grid;
    width: 100vw;
    height: 100vh;
    place-items: center;
    margin: 0;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.fg-lightbox-stage {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.fg-lightbox img {
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0 auto;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
    transform: scale(1);
    transform-origin: center;
    will-change: transform;
    -webkit-user-drag: none;
}

.fg-lightbox.is-zoomed figure {
    cursor: grab;
}

.fg-lightbox.is-panning figure {
    cursor: grabbing;
}

.fg-lightbox button {
    position: fixed;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(242, 242, 242, 0.28);
    background: rgba(14, 14, 14, 0.76);
    color: var(--fg-text);
    cursor: pointer;
    opacity: 1;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
    transition: opacity 220ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.fg-lightbox button svg {
    display: block;
    width: 1.75rem;
    height: 1.75rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.55;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.fg-lightbox button:hover,
.fg-lightbox button:focus-visible {
    background: rgba(156, 124, 56, 0.88);
    border-color: rgba(198, 169, 94, 0.75);
}

.fg-lightbox.controls-hidden {
    cursor: none;
}

.fg-lightbox.controls-hidden button {
    opacity: 0;
    pointer-events: none;
}

.fg-lightbox-close,
.fg-lightbox-fullscreen {
    top: max(1rem, env(safe-area-inset-top));
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 999px;
}

.fg-lightbox-close {
    right: max(1rem, env(safe-area-inset-right));
}

.fg-lightbox-close svg {
    width: 1.7rem;
    height: 1.7rem;
    stroke-width: 2.75;
}

.fg-lightbox-fullscreen {
    right: calc(max(1rem, env(safe-area-inset-right)) + 3.65rem);
}

.fg-lightbox-fullscreen svg {
    width: 1.72rem;
    height: 1.72rem;
    stroke-width: 2.35;
}

.fg-lightbox-fullscreen .fg-icon-exit,
.fg-lightbox.is-fullscreen .fg-lightbox-fullscreen .fg-icon-enter {
    display: none;
}

.fg-lightbox.is-fullscreen .fg-lightbox-fullscreen .fg-icon-exit {
    display: block;
}

.fg-lightbox-prev,
.fg-lightbox-next {
    top: 50%;
    width: 3.8rem;
    height: 5.2rem;
    transform: translateY(-50%);
    border-radius: 0.9rem;
}

.fg-lightbox-prev svg,
.fg-lightbox-next svg {
    width: 2.35rem;
    height: 2.35rem;
    stroke-width: 2.85;
}

.fg-lightbox-prev {
    left: max(1rem, env(safe-area-inset-left));
}

.fg-lightbox-next {
    right: max(1rem, env(safe-area-inset-right));
}

.fg-lightbox.is-single .fg-lightbox-prev,
.fg-lightbox.is-single .fg-lightbox-next {
    display: none;
}

@media (max-width: 720px) {
    .fg-shell {
        width: min(100% - 1rem, var(--fg-max-width));
    }

    .fg-header {
        padding-bottom: 1.1rem;
    }

    .fg-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    }

    .fg-image-grid {
        grid-template-columns: 1fr;
    }

    .fg-card-grid,
    .fg-image-grid {
        gap: 0.75rem;
    }

    .fg-lightbox-prev,
    .fg-lightbox-next {
        top: auto;
        bottom: max(1rem, env(safe-area-inset-bottom));
        transform: none;
    }
}

@media (min-width: 560px) and (max-width: 720px) {
    .fg-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
