/* ============================================
   conc.quest — Frutiger Aero Botanical Scholar
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    line-height: 1.72;
    color: #3d2e1f;
    background-color: #faf5ee;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Libre Baskerville', 'Georgia', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.15;
    color: #3d2e1f;
}

/* --- Radial Navigation --- */
.radial-nav {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
}

.nav-trigger {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    border: 1px solid rgba(194, 120, 52, 0.25);
    background: rgba(250, 245, 238, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 10;
}

.nav-trigger:hover {
    background: rgba(250, 245, 238, 0.95);
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(194, 120, 52, 0.15);
}

.nav-trigger svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.nav-links {
    position: absolute;
    top: 22px;
    right: 22px;
    pointer-events: none;
}

.nav-link {
    position: absolute;
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c27834;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 12px;
    background: rgba(250, 245, 238, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(194, 120, 52, 0.2);
    opacity: 0;
    transform: translate(0, 0) scale(0.5);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.radial-nav.open .nav-link {
    opacity: 1;
    pointer-events: auto;
}

.radial-nav.open .nav-link[data-index="0"] {
    transform: translate(-120px, -10px) scale(1);
    transition-delay: 0ms;
}

.radial-nav.open .nav-link[data-index="1"] {
    transform: translate(-105px, 35px) scale(1);
    transition-delay: 40ms;
}

.radial-nav.open .nav-link[data-index="2"] {
    transform: translate(-70px, 75px) scale(1);
    transition-delay: 80ms;
}

.radial-nav.open .nav-link[data-index="3"] {
    transform: translate(-20px, 105px) scale(1);
    transition-delay: 120ms;
}

.radial-nav.open .nav-link[data-index="4"] {
    transform: translate(30px, 120px) scale(1);
    transition-delay: 160ms;
}

.nav-link:hover {
    background: rgba(194, 120, 52, 0.12);
    color: #3d2e1f;
    box-shadow: 0 2px 12px rgba(194, 120, 52, 0.2);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #faf5ee;
    overflow: hidden;
}

.hero-venation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-venation.drawn {
    opacity: 0.15;
}

/* Vein drawing animation */
.vein {
    stroke-dasharray: var(--vein-length, 1000);
    stroke-dashoffset: var(--vein-length, 1000);
    opacity: 0;
}

.vein.animate {
    opacity: 1;
    animation: drawVein var(--vein-duration, 2s) var(--vein-delay, 0s) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes drawVein {
    to {
        stroke-dashoffset: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem;
    margin-top: -12vh;
}

.hero-title {
    font-family: 'Libre Baskerville', 'Georgia', serif;
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 6rem);
    color: #3d2e1f;
    letter-spacing: 0.02em;
    line-height: 1.15;
    opacity: 0;
    transform: translateY(20px);
}

.hero-title.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-title .char.show {
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #8a7560;
    margin-top: 1.5rem;
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translateY(10px);
}

.hero-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}

/* --- Spiral Background --- */
.spiral-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 200vh;
    z-index: 0;
    pointer-events: none;
}

/* --- Card Grid Section --- */
.cards-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

/* --- Cards --- */
.card {
    position: relative;
    background: rgba(250, 245, 238, 0.72);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid rgba(194, 120, 52, 0.25);
    border-radius: 12px 8px 16px 6px;
    padding: 2rem 1.75rem;
    overflow: hidden;
    opacity: 0.85;
    transition: opacity 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
    cursor: default;
}

.card.in-view {
    opacity: 1;
}

.card:hover {
    box-shadow: 0 8px 40px rgba(194, 120, 52, 0.12), 0 0 60px rgba(244, 208, 143, 0.08);
    border-color: #e6a04c;
}

.card:active {
    border-color: #f4d08f;
}

.card-wide {
    grid-column: span 2;
}

.card-tall {
    grid-row: span 2;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.card-vein-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.card-label {
    display: inline-block;
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c27834;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.card-label::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6b7c3f;
    margin-left: 0.5em;
    vertical-align: middle;
    opacity: 0.6;
}

.card-title {
    font-family: 'Libre Baskerville', 'Georgia', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #3d2e1f;
    letter-spacing: 0.02em;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.card-desc {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    line-height: 1.72;
    color: #8a7560;
    position: relative;
    z-index: 1;
}

/* Hover micro-vein effect container */
.card .hover-veins {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.card .hover-veins line {
    stroke: #c27834;
    stroke-width: 0.5;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover .hover-veins line {
    opacity: 0.15;
}

/* --- Interstitial Veins --- */
.interstitial-vein {
    position: relative;
    width: 100%;
    padding: 2rem 0;
    overflow: hidden;
}

.interstitial-svg {
    width: 100%;
    height: 120px;
    display: block;
}

.draw-vein {
    stroke-dasharray: var(--vein-length, 1500);
    stroke-dashoffset: var(--vein-length, 1500);
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.draw-vein.drawn {
    stroke-dashoffset: 0;
}

/* --- Footer --- */
.footer {
    background: #1e1510;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-vein {
    width: 200px;
    height: 30px;
    margin: 0 auto 2rem;
    display: block;
}

.footer-text {
    font-family: 'Libre Baskerville', 'Georgia', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #f0e6d8;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    color: #8a7560;
    letter-spacing: 0.06em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .card-wide {
        grid-column: span 1;
    }

    .card-tall {
        grid-row: span 1;
        min-height: auto;
    }

    .card:nth-child(odd) {
        margin-left: 0;
        margin-right: 8%;
    }

    .card:nth-child(even) {
        margin-left: 8%;
        margin-right: 0;
    }

    .cards-section {
        padding: 3rem 1rem;
    }

    .hero-content {
        margin-top: -8vh;
    }

    /* Radial nav becomes vertical drawer */
    .radial-nav.open .nav-link[data-index="0"] {
        transform: translate(-10px, 50px) scale(1);
    }

    .radial-nav.open .nav-link[data-index="1"] {
        transform: translate(-10px, 90px) scale(1);
    }

    .radial-nav.open .nav-link[data-index="2"] {
        transform: translate(-10px, 130px) scale(1);
    }

    .radial-nav.open .nav-link[data-index="3"] {
        transform: translate(-10px, 170px) scale(1);
    }

    .radial-nav.open .nav-link[data-index="4"] {
        transform: translate(-10px, 210px) scale(1);
    }

    .interstitial-svg {
        height: 80px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .card-title {
        font-size: 1.25rem;
    }

    .card {
        padding: 1.5rem 1.25rem;
    }
}
