:root {
    --bg: #0b0b0b;
    --text: #f5f1ea;
    --text-dark: #111111;
    --muted-dark: #6f6a63;
    --line-light: #e9e3db;
    --surface: #ffffff;
    --surface-soft: #f7f4ef;
    --container: 1180px;
    --radius: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--surface);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

.container {
    width: min(100% - 48px, var(--container));
    margin: 0 auto;
}

.section {
    padding: 110px 0;
}

h1,
h2,
h3,
h4 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(3.8rem, 8vw, 7rem);
    color: var(--text);
}

h2 {
    font-size: clamp(2.4rem, 4vw, 4rem);
}

h3 {
    font-size: 1.8rem;
}

.accent-italic {
    font-style: italic;
    font-weight: 500;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted-dark);
}

.eyebrow.light {
    color: rgba(255, 255, 255, 0.62);
}

.btn-row,
.resources-hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.25s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: #fff;
    color: #111;
}

.btn-primary:hover {
    background: #f1f1f1;
}

.btn-secondary {
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.center-btns {
    justify-content: center;
}

.light-title {
    color: #fff;
}

.reveal,
.reveal-left,
.reveal-right,
.reveal-up {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-60px);
}

.reveal-right {
    transform: translateX(60px);
}

.reveal-up {
    transform: translateY(22px);
}

.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-up.active {
    opacity: 1;
    transform: translate(0, 0);
}

.resources-hero {
    background: #060606;
    padding: 118px 0 126px;
    text-align: center;
}

.resources-hero-inner {
    max-width: 820px;
}

.resources-hero-title {
    margin-bottom: 22px;
}

.resources-hero-text {
    max-width: 660px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.74);
    font-size: 1.04rem;
}

.resources-hero-actions {
    justify-content: center;
}

.resource-intro-section,
.library-section {
    background: var(--surface-soft);
}

.resource-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 54px;
    align-items: center;
}

.intro-title {
    margin-bottom: 22px;
}

.intro-text {
    max-width: 650px;
    color: var(--muted-dark);
}

.resource-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.resource-focus-card {
    min-height: 172px;
    background: #fff;
    border: 1px solid var(--line-light);
    border-radius: 8px;
    padding: 22px;
}

.resource-focus-card span {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
}

.resource-focus-card h3 {
    margin-bottom: 10px;
    font-size: 1.55rem;
}

.resource-focus-card p {
    color: var(--muted-dark);
    font-size: 0.94rem;
}

.section-heading {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 54px;
}

.resource-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}

.resource-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line-light);
    border-radius: 8px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.resource-image-button {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: #eee;
    cursor: zoom-in;
}

.resource-image-button:focus-visible {
    outline: 3px solid #8a1f2c;
    outline-offset: -3px;
}

.resource-card img,
.lightbox-image {
    display: block;
    width: 100%;
    background: #eee;
}

.resource-card img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.resource-image-button:hover img {
    transform: scale(1.025);
}

.image-zoom-label {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.resource-image-button:hover .image-zoom-label,
.resource-image-button:focus-visible .image-zoom-label {
    opacity: 1;
    transform: translateY(0);
}

.resource-card-body {
    padding: 20px 22px 22px;
}

.resource-card-kicker {
    display: block;
    margin-bottom: 10px;
    color: #8a1f2c;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.resource-card h3 {
    margin-bottom: 0;
}

.roadmap-section {
    background: #fff;
}

.roadmap {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.roadmap::before {
    content: "";
    position: absolute;
    top: 35px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: linear-gradient(90deg, #111, #8a1f2c, #111);
    opacity: 0.22;
}

.roadmap-step {
    position: relative;
    z-index: 1;
    padding: 0 20px 24px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line-light);
    border-radius: 8px;
}

.roadmap-dot {
    width: 70px;
    height: 70px;
    margin: -1px auto 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #111;
    color: #fff;
    border: 8px solid #fff;
    box-shadow: 0 0 0 1px var(--line-light);
    font-size: 0.92rem;
    font-weight: 600;
}

.roadmap-step h3 {
    margin-bottom: 8px;
}

.roadmap-step p {
    max-width: 210px;
    margin: 0 auto;
    color: var(--muted-dark);
    font-size: 0.94rem;
}

.resources-cta-section {
    background: #060606;
}

.resources-cta {
    max-width: 820px;
    text-align: center;
}

.resources-cta .cta-title {
    margin-bottom: 18px;
}

.resources-cta .cta-text {
    max-width: 620px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.72);
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 34px;
    background: rgba(0, 0, 0, 0.86);
}

.image-lightbox.open {
    display: flex;
}

.lightbox-content {
    width: min(100%, 1180px);
    max-height: calc(100vh - 88px);
}

.lightbox-image {
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.lightbox-caption {
    margin-top: 14px;
    color: #fff;
    text-align: center;
    font-size: 0.95rem;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 1.8rem;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease;
}

.lightbox-close:hover {
    background: #f1f1f1;
    transform: scale(1.04);
}

html[lang="fa"] .resources-hero,
html[lang="fa"] .section-heading,
html[lang="fa"] .resources-cta {
    direction: rtl;
}

html[lang="fa"] .resource-card-body,
html[lang="fa"] .resource-intro-copy,
html[lang="fa"] .roadmap {
    direction: rtl;
}

html[lang="fa"] .image-zoom-label {
    right: auto;
    left: 14px;
}

@media (max-width: 900px) {
    .resource-intro-grid,
    .resource-gallery {
        grid-template-columns: 1fr;
    }

    .roadmap {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .roadmap::before {
        top: 34px;
        bottom: 34px;
        left: 35px;
        right: auto;
        width: 2px;
        height: auto;
        background: linear-gradient(180deg, #111, #8a1f2c, #111);
    }

    .roadmap-step {
        display: grid;
        grid-template-columns: 70px 1fr;
        column-gap: 18px;
        align-items: center;
        text-align: left;
        padding: 18px;
    }

    .roadmap-dot {
        grid-row: 1 / span 2;
        margin: 0;
    }

    .roadmap-step p {
        max-width: none;
        margin: 0;
    }

    html[lang="fa"] .roadmap::before {
        left: auto;
        right: 35px;
    }

    html[lang="fa"] .roadmap-step {
        text-align: right;
    }

    .resources-hero {
        padding: 92px 0 100px;
    }

    .section {
        padding: 84px 0;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 32px, var(--container));
    }

    .resources-hero-actions,
    .btn-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .image-lightbox {
        padding: 18px;
    }

    .lightbox-content {
        max-height: calc(100vh - 72px);
    }

    .lightbox-image {
        max-height: calc(100vh - 120px);
    }

    .resource-focus-grid {
        grid-template-columns: 1fr;
    }
}
