:root {
    /* Colors */
    --ink: #24212b;
    --muted: #716b78;
    --paper: #fffaf7;
    --soft: #f3e9ec;
    --lav: #7b5aa6;
    --lav-dark: #3e2d55;
    --peach: #cd7ba0;
    --line: #ded2d7;

    /* Overlay Colors */
    --overlay-hero: rgba(62, 45, 85, 0.5);
    --overlay-card-dark: rgba(62, 45, 85, 0.65);
    --overlay-card-light: rgba(62, 45, 85, 0.55);

    /* Typography */
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing & Sizing */
    --gap-card: 24px;
    --radius-card: 24px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-reduced: 0.01ms linear;
}

/* Accessibility: Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    :root {
        --transition: 0.01ms linear;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.65;
}

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

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

button, a.button {
    border: 0;
    border-radius: 999px;
    padding: 13px 24px;
    font: 600 14px var(--sans);
    cursor: pointer;
    transition: var(--transition);
}

.button-primary {
    background: var(--lav);
    color: #fff;
}

.button-primary:hover {
    background: var(--lav-dark);
}

.micro-label {
    display: block;
    color: var(--peach);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.hero {
    position: relative;
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 60px;
}

.hero-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    will-change: transform;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay-hero);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 600px;
    padding: 0 24px;
}

.hero h1 {
    font: 500 clamp(32px, 7vw, 56px) / 1.1 var(--serif);
    color: #fff;
    margin: 12px 0 24px;
}

.hero .micro-label {
    color: #fff;
    opacity: 0.9;
}

.hero .button-primary {
    display: inline-block;
}

/* Mobile */
@media (max-width: 768px) {
    .hero {
        height: 35vh;
        margin-bottom: 48px;
    }

    .hero h1 {
        font-size: clamp(24px, 5vw, 40px);
    }

    .hero-content {
        text-align: left;
        padding: 0 20px;
    }
}

.cards-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-card);
}

/* Tablet: 2-column grid (769px–1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1-column grid (≤768px) */
@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px 60px;
    }
}

.card-link {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 400px;
    border-radius: var(--radius-card);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.card-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    will-change: transform;
}

.card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--overlay-card-dark) 0%, var(--overlay-card-light) 100%);
    transition: var(--transition);
}

.card-content {
    position: relative;
    z-index: 10;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

.card-label {
    display: block;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-title {
    font: 500 24px / 1.3 var(--serif);
    color: #fff;
    margin: 0 0 16px 0;
}

.card-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    opacity: 0;
    transition: var(--transition);
}

.card-cta {
    display: inline-block;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .card-link {
        height: 350px;
    }

    .card-desc {
        opacity: 1;
        font-size: 13px;
        margin-bottom: 16px;
    }

    .card-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
}

/* ============================================
   ANIMATIONS & INTERACTIONS
   ============================================ */

@keyframes reveal-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes reveal-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-link {
    /* Default: visible (fallback without JS) */
    opacity: 1;
}

/* Reveal animation when .revealed class is added */
.card-link.revealed {
    animation: reveal-fade 0.6s ease-out forwards;
}

.card-link.revealed:nth-child(1) {
    animation-delay: 0ms;
}

.card-link.revealed:nth-child(2) {
    animation-delay: 100ms;
}

.card-link.revealed:nth-child(3) {
    animation-delay: 200ms;
}

.card-link.revealed:nth-child(4) {
    animation-delay: 300ms;
}

/* Desktop: slide-up + fade */
@media (min-width: 769px) {
    .card-link.revealed {
        animation: reveal-slide-up 0.6s ease-out forwards;
    }
}

/* ============================================
   HOVER EFFECTS (Desktop)
   ============================================ */

@media (min-width: 769px) {
    .card-link:hover {
        transform: translateY(-12px);
        box-shadow: 0 30px 80px rgba(36, 33, 43, 0.2);
    }

    .card-link:hover .card-overlay {
        background: linear-gradient(135deg, rgba(62, 45, 85, 0.75) 0%, rgba(62, 45, 85, 0.65) 100%);
    }

    .card-link:hover .card-desc {
        opacity: 1;
    }

    .card-link:active {
        transform: scale(0.98);
    }
}

/* ============================================
   PARALLAX SETUP (classes for JS)
   ============================================ */

.hero-media {
    will-change: transform;
}

.card-bg {
    will-change: transform;
}
