:root {
    --bg: #cc7865;
    --bg-2: #9f3f32;
    --ink: #151515;
    --muted: #5f5a52;
    --accent: #cb3f1c;
    --accent-dark: #96280f;
    --card: #fffaf2;
    --line: #e7d7c2;
    --shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    --timeline-1: #03071e;
    --timeline-2: #370617;
    --timeline-3: #6a040f;
    --timeline-4: #9d0208;
    --timeline-5: #d00000;
    --timeline-6: #dc2f02;
    --timeline-7: #e85d04;
    --timeline-8: #f48c06;
    --timeline-9: #faa307;
    --timeline-10: #ffba08;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at 12% 18%, rgba(112, 25, 14, 0.42) 0%, transparent 42%),
        radial-gradient(circle at 88% 82%, #e7a18d 0%, transparent 44%),
        linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
    color: var(--ink);
    font-family: "Manrope", sans-serif;
    line-height: 1.5;
    min-height: 100vh;
}

.bg-shape {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    border-radius: 999px;
    filter: blur(40px);
    opacity: 0.38;
}

.bg-shape-a {
    width: 360px;
    height: 360px;
    background: #b64230;
    top: -120px;
    right: -100px;
}

.bg-shape-b {
    width: 290px;
    height: 290px;
    background: #7f1d14;
    bottom: -110px;
    left: -60px;
}

.wrap {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
    background: rgba(244, 239, 230, 0.82);
    border-bottom: 1px solid rgba(90, 70, 50, 0.13);
}

.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
}

.brand {
    color: var(--ink);
    text-decoration: none;
    display: inline-block;
    position: relative;
    line-height: 1;
    padding-bottom: 12px;
}

.brand-kicker {
    font-family: "Fugaz One", cursive;
    font-size: 2.25rem;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
}

.brand-name {
    color: #222;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: none;
    position: absolute;
    top: 31px;
    right: 0;
    width: 107px;
    text-align: center;
    line-height: normal;
}

.menu-toggle {
    margin-left: auto;
    cursor: pointer;
    border: 1px solid var(--line);
    background: #fff8ef;
    color: var(--ink);
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 700;
    display: none;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.carbid-header-link {
    display: none;
}

.menu-toggle:hover {
    background: #fff2df;
    border-color: var(--accent);
    transform: translateY(-1px);
}

.menu {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.menu-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    transition: transform 160ms ease, background-color 160ms ease;
}

.menu-link:hover {
    background: #fff2df;
    transform: translateY(-1px);
}

.menu-link.is-active {
    background: var(--accent);
    color: #fff;
}

.page {
    padding: 34px 0 52px;
    display: grid;
    gap: 20px;
}

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: clamp(18px, 3vw, 28px);
    box-shadow: var(--shadow);
    animation: rise 420ms ease both;
}

.hero h1,
h1 {
    margin: 0;
    font-family: "Fugaz One", cursive;
    letter-spacing: 0.5px;
    font-size: clamp(2rem, 3.8vw, 3.2rem);
}

h2 {
    margin: 18px 0 8px;
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

.eyebrow {
    color: var(--accent-dark);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 8px;
    font-size: 0.82rem;
}

.lead {
    margin: 12px 0 0;
    max-width: 72ch;
    color: #2f2b26;
}

.small {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.btn {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 800;
}

.carbid-sale {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
    align-items: center;
    gap: 28px;
    background: #b72b16;
    border-color: #801d0e;
    color: #fff;
    scroll-margin-top: 100px;
}

.carbid-sale .eyebrow {
    color: #ffe1a0;
    font-size: 0.95rem;
}

.carbid-sale h2 {
    margin: 0;
    font-family: "Fugaz One", cursive;
    font-size: 3rem;
    line-height: 1;
    text-transform: uppercase;
}

.carbid-sale-quantity {
    display: inline-block;
    margin: 18px 0 0;
    padding: 6px 12px;
    background: #ffd44f;
    color: #20170d;
    border-radius: 6px;
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
}

.carbid-sale-copy > p:not(.eyebrow, .carbid-sale-quantity, .carbid-sale-email) {
    margin: 12px 0 0;
    font-size: 1.05rem;
}

.carbid-sale .carbid-sale-button {
    background: #fff;
    color: #8d230f;
}

.carbid-sale .carbid-sale-button:hover {
    background: #ffe8c7;
}

.carbid-sale-email {
    margin: 7px 0 0;
    font-weight: 700;
}

.carbid-sale-figure {
    margin: 0;
}

.carbid-sale-figure img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(255, 229, 154, 0.45)) drop-shadow(0 0 18px rgba(255, 190, 53, 0.25));
    animation: carbid-edge-glow 4s ease-in-out infinite;
}

@keyframes carbid-edge-glow {
    0%,
    100% {
        filter: drop-shadow(0 0 8px rgba(255, 229, 154, 0.45)) drop-shadow(0 0 18px rgba(255, 190, 53, 0.25));
    }

    50% {
        filter: drop-shadow(0 0 13px rgba(255, 242, 190, 0.85)) drop-shadow(0 0 30px rgba(255, 195, 65, 0.55));
    }
}

@media (prefers-reduced-motion: reduce) {
    .carbid-sale-figure img {
        animation: none;
    }
}

.timeline {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}

.timeline-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
}

.timeline-item h2 {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.timeline-item p {
    margin: 0;
}

.timeline--metro {
    position: relative;
    gap: 18px;
    padding: 8px 0;
}

.timeline--metro::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 8px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        var(--timeline-1) 0%,
        var(--timeline-2) 11%,
        var(--timeline-3) 22%,
        var(--timeline-4) 33%,
        var(--timeline-5) 44%,
        var(--timeline-6) 56%,
        var(--timeline-7) 67%,
        var(--timeline-8) 78%,
        var(--timeline-9) 89%,
        var(--timeline-10) 100%
    );
}

.timeline--metro .timeline-item {
    position: relative;
    width: calc(50% - 38px);
    border: 2px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
}

.timeline--metro .timeline-item::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 38px;
    height: 4px;
    background: var(--timeline-8);
    transform: translateY(-50%);
}

.timeline--metro .timeline-item::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 4px solid #fff;
    transform: translateY(-50%);
    box-shadow: 0 0 0 2px rgba(18, 18, 18, 0.07);
}

.timeline--metro .timeline-item:nth-child(odd) {
    margin-right: auto;
}

.timeline--metro .timeline-item:nth-child(odd)::before {
    right: -38px;
}

.timeline--metro .timeline-item:nth-child(odd)::after {
    right: -53px;
}

.timeline--metro .timeline-item:nth-child(even) {
    margin-left: auto;
}

.timeline--metro .timeline-item:nth-child(even)::before {
    left: -38px;
}

.timeline--metro .timeline-item:nth-child(even)::after {
    left: -53px;
}

.timeline--metro .timeline-item:nth-child(10n + 1)::after {
    background: var(--timeline-1);
}

.timeline--metro .timeline-item:nth-child(10n + 2)::after {
    background: var(--timeline-2);
}

.timeline--metro .timeline-item:nth-child(10n + 3)::after {
    background: var(--timeline-3);
}

.timeline--metro .timeline-item:nth-child(10n + 4)::after {
    background: var(--timeline-4);
}

.timeline--metro .timeline-item:nth-child(10n + 5)::after {
    background: var(--timeline-5);
}

.timeline--metro .timeline-item:nth-child(10n + 6)::after {
    background: var(--timeline-6);
}

.timeline--metro .timeline-item:nth-child(10n + 7)::after {
    background: var(--timeline-7);
}

.timeline--metro .timeline-item:nth-child(10n + 8)::after {
    background: var(--timeline-8);
}

.timeline--metro .timeline-item:nth-child(10n + 9)::after {
    background: var(--timeline-9);
}

.timeline--metro .timeline-item:nth-child(10n + 10)::after {
    background: var(--timeline-10);
}

.check-list,
.source-list {
    margin: 12px 0 0;
    padding-left: 20px;
}

.check-list li,
.source-list li {
    margin: 7px 0;
}

.source-list a {
    color: var(--accent-dark);
    font-weight: 700;
}

.contact-box {
    margin-top: 14px;
    font-style: normal;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    max-width: 390px;
}

.contact-box a {
    color: var(--accent-dark);
    text-decoration: none;
    font-weight: 700;
}

.map-embed-wrap {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.map-embed {
    display: block;
    width: 100%;
    height: min(52vw, 380px);
    min-height: 260px;
    border: 0;
}

.team-hero-photo-wrap {
    margin-top: 14px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
}

.team-hero-photo {
    display: block;
    width: 100%;
    max-height: 680px;
    object-fit: cover;
}

.gallery {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.photo {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f1ed;
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.photo:hover img {
    transform: scale(1.04);
}

.gallery--logos {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.photo--logo {
    aspect-ratio: 3 / 2;
    background: #fff;
    padding: 10px;
}

.photo--logo img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.photo--logo:hover img {
    transform: none;
}

.gallery--technical {
    grid-template-columns: minmax(0, 1fr);
}

.photo--technical {
    aspect-ratio: auto;
    padding: clamp(8px, 2vw, 20px);
    background: #fff;
}

.photo--technical img {
    display: block;
    height: auto;
    object-fit: contain;
}

.photo--technical:hover img {
    transform: none;
}

.team-hero-link {
    display: block;
}

.site-footer {
    padding-bottom: 36px;
    color: var(--muted);
    font-weight: 700;
}

body.menu-open,
body.lightbox-open {
    overflow: hidden;
}

.sponsor-strip {
    margin-bottom: 20px;
    overflow: hidden;
}

.sponsor-marquee {
    margin-top: 12px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.sponsor-track {
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    padding: 12px;
    animation: sponsor-scroll 140s linear infinite;
}

.sponsor-logo {
    width: 132px;
    height: 74px;
    border-radius: 10px;
    background: #fffaf2;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    flex-shrink: 0;
}

.sponsor-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    align-items: center;
    justify-content: center;
    padding: 76px 22px 22px;
    background: rgba(10, 10, 10, 0.86);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease;
}

.lightbox[open] {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: min(1200px, 94vw);
    max-height: min(88vh, calc(100dvh - 98px));
    width: auto;
    height: auto;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: #fff;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    z-index: 1;
    top: 14px;
    right: 18px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px solid #151515;
    background: #fff;
    color: #151515;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover {
    background: #fff2df;
}

.lightbox-close:focus-visible {
    outline: 3px solid #ffba08;
    outline-offset: 3px;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sponsor-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 900px) {
    .carbid-sale {
        grid-template-columns: 1fr;
    }

    .carbid-sale h2 {
        font-size: 2.25rem;
    }

    .carbid-sale-figure {
        max-width: 520px;
    }

    .menu-toggle {
        display: inline-flex;
        position: relative;
        z-index: 45;
        margin-left: 0;
    }

    .carbid-header-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        padding: 8px 10px;
        border-radius: 8px;
        background: var(--accent);
        color: #fff;
        font-size: 0.8rem;
        font-weight: 800;
        text-decoration: none;
        white-space: nowrap;
    }

    .carbid-header-link:hover {
        background: var(--accent-dark);
    }

    .topbar {
        gap: 8px;
    }

    .menu {
        position: fixed;
        top: 70px;
        left: 12px;
        right: 12px;
        width: auto;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 6px;
        margin-left: 0;
        padding: 12px;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: rgba(255, 250, 242, 0.98);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 180ms ease, transform 220ms ease, visibility 180ms ease;
        z-index: 40;
    }

    .menu.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .brand-kicker {
        font-size: 1.7rem;
    }

    .brand-name {
        top: 25px;
        width: 90px;
        font-size: 13px;
    }

    .menu-link {
        width: 100%;
        justify-content: flex-start;
        background: #fff;
        border: 1px solid var(--line);
    }

    .sponsor-logo {
        width: 110px;
        height: 64px;
    }

    .timeline--metro::before {
        left: 18px;
        transform: none;
    }

    .timeline--metro .timeline-item,
    .timeline--metro .timeline-item:nth-child(odd),
    .timeline--metro .timeline-item:nth-child(even) {
        width: calc(100% - 42px);
        margin-left: 42px;
        margin-right: 0;
    }

    .timeline--metro .timeline-item::before,
    .timeline--metro .timeline-item:nth-child(even)::before,
    .timeline--metro .timeline-item:nth-child(odd)::before {
        left: -24px;
        right: auto;
        width: 24px;
    }

    .timeline--metro .timeline-item::after,
    .timeline--metro .timeline-item:nth-child(even)::after,
    .timeline--metro .timeline-item:nth-child(odd)::after {
        left: -34px;
        right: auto;
    }
}

@media (max-width: 500px) {
    .topbar {
        gap: 6px;
    }

    .brand-kicker {
        font-size: 1.5rem;
    }

    .brand-name {
        top: 23px;
        width: 80px;
        font-size: 12px;
    }

    .carbid-header-link {
        padding: 7px;
        font-size: 0.72rem;
    }

    .menu-toggle {
        padding: 7px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .brand-kicker {
        font-size: 1.3rem;
    }

    .brand-name {
        top: 21px;
        width: 70px;
        font-size: 10px;
    }

    .carbid-header-link {
        padding: 6px;
        font-size: 0.68rem;
    }

    .menu-toggle {
        padding: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
