/* ============================================
   courts.studio - Gold-Black-Luxury Maximalist
   Hexagonal Honeycomb Layout
   ============================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #0D0D0D;
    color: #F5ECD7;
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* --- Gold Shimmer Text Effect --- */
.gold-shimmer {
    background: linear-gradient(135deg, #C9A84C 0%, #8B7332 50%, #C9A84C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 200% 50%; }
}

/* --- Icon Pulse Animation --- */
.icon-pulse {
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* --- Underline Draw Animation --- */
.underline-draw {
    width: 0;
    height: 2px;
    background: #C9A84C;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.underline-draw.active {
    width: 100%;
}

/* --- Crosshatch Overlay (Netting Texture) --- */
.crosshatch-overlay {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(201, 168, 76, 0.04) 20px,
            rgba(201, 168, 76, 0.04) 21px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 20px,
            rgba(201, 168, 76, 0.04) 20px,
            rgba(201, 168, 76, 0.04) 21px
        );
    pointer-events: none;
    z-index: 1;
}

/* --- Herringbone Overlay --- */
.herringbone-overlay {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 15px,
            rgba(61, 43, 31, 0.3) 15px,
            rgba(61, 43, 31, 0.3) 16px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 15px,
            rgba(61, 43, 31, 0.3) 15px,
            rgba(61, 43, 31, 0.3) 16px
        );
    pointer-events: none;
    z-index: 1;
}

/* --- Scoreboard Navigation --- */
#scoreboard-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 2rem;
    height: 52px;
    background: linear-gradient(180deg, rgba(13, 13, 13, 0.95) 0%, rgba(13, 13, 13, 0.85) 100%);
    border-bottom: 1px solid #8B7332;
    backdrop-filter: blur(8px);
}

.nav-monogram {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-style: italic;
    font-size: 1.3rem;
    color: #C9A84C;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 1.8rem;
    position: relative;
}

.nav-link {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #A8A196;
    text-decoration: none;
    position: relative;
    padding: 16px 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #C9A84C;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-link:hover,
.nav-link.active {
    color: #C9A84C;
}

.nav-link.active::after {
    width: 100%;
}

.nav-underline {
    display: none;
}

/* --- Court Sections (Full Viewport) --- */
.court {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ============================================
   COURT 1: THE ENTRANCE
   ============================================ */
.court-entrance {
    background: #0D0D0D;
    flex-direction: column;
}

.entrance-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    animation: entranceFadeIn 1s ease-out 0.5s forwards;
}

@keyframes entranceFadeIn {
    to { opacity: 1; }
}

.hex-outline {
    width: clamp(200px, 30vw, 400px);
    height: auto;
    margin-bottom: 1rem;
}

.hex-draw {
    stroke-dasharray: 1600;
    stroke-dashoffset: 1600;
    animation: hexDraw 1.5s ease-in-out 0.8s forwards;
}

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

.site-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-align: center;
    opacity: 0;
    animation: titleReveal 1s ease-out 1.8s forwards;
}

@keyframes titleReveal {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.title-underline {
    width: 0;
    height: 2px;
    background: #C9A84C;
    animation: underlineSweep 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2.5s forwards;
    max-width: 300px;
}

@keyframes underlineSweep {
    to { width: 300px; }
}

.chevron-pattern {
    opacity: 0;
    animation: chevronFade 1s ease-out 3s forwards;
    width: 120px;
}

.chevron-pattern svg {
    width: 100%;
    animation: chevronPulse 2.5s ease-in-out infinite;
}

@keyframes chevronFade {
    to { opacity: 0.6; }
}

@keyframes chevronPulse {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(4px); }
}

/* ============================================
   COURT 2: THE GALLERY
   ============================================ */
.court-gallery {
    background: #0D0D0D;
}

.rosette-cluster {
    position: relative;
    z-index: 2;
    width: clamp(320px, 70vw, 800px);
    height: clamp(320px, 70vw, 800px);
    max-width: 800px;
    max-height: 800px;
}

/* Hexagonal Cell Base */
.hex-cell {
    position: absolute;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease, border-color 0.4s ease;
    opacity: 0;
    transform: scale(0.8);
}

.hex-cell.visible {
    opacity: 1;
    transform: scale(1);
}

.hex-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    text-align: center;
    width: 100%;
    height: 100%;
}

/* Center Hexagon */
.hex-center {
    width: 45%;
    height: 45%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: #3D2B1F;
    border: 2px solid #C9A84C;
    z-index: 3;
}

.hex-center.visible {
    transform: translate(-50%, -50%) scale(1);
}

.hero-icon {
    width: clamp(60px, 8vw, 120px);
    height: clamp(60px, 8vw, 120px);
    color: #C9A84C;
}

/* Satellite Hexagons */
.hex-satellite {
    width: 28%;
    height: 28%;
    background: #0D0D0D;
    border: 1px solid #8B7332;
    z-index: 2;
}

.hex-satellite:hover {
    border-color: #C67D4A;
    z-index: 4;
}

.hex-sat-1 { top: 2%; left: 50%; transform: translate(-50%, 0) scale(0.8); }
.hex-sat-1.visible { transform: translate(-50%, 0) scale(1); }

.hex-sat-2 { top: 18%; right: 5%; transform: translate(0, 0) scale(0.8); }
.hex-sat-2.visible { transform: translate(0, 0) scale(1); }

.hex-sat-3 { bottom: 18%; right: 5%; transform: translate(0, 0) scale(0.8); }
.hex-sat-3.visible { transform: translate(0, 0) scale(1); }

.hex-sat-4 { bottom: 2%; left: 50%; transform: translate(-50%, 0) scale(0.8); }
.hex-sat-4.visible { transform: translate(-50%, 0) scale(1); }

.hex-sat-5 { bottom: 18%; left: 5%; transform: translate(0, 0) scale(0.8); }
.hex-sat-5.visible { transform: translate(0, 0) scale(1); }

.hex-sat-6 { top: 18%; left: 5%; transform: translate(0, 0) scale(0.8); }
.hex-sat-6.visible { transform: translate(0, 0) scale(1); }

.cell-icon {
    width: 24px;
    height: 24px;
    color: #C9A84C;
    flex-shrink: 0;
}

.hex-label {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: clamp(0.55rem, 0.8vw, 0.75rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #F5ECD7;
}

/* ============================================
   COURT 3: THE CRAFT
   ============================================ */
.court-craft {
    background: #0D0D0D;
    padding: 80px 2rem;
}

.craft-hex-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: center;
}

.craft-hex-clip {
    display: flex;
    align-items: stretch;
    width: 100%;
    gap: 1.5rem;
    padding: 3rem 2rem;
}

.craft-border-left,
.craft-border-right {
    width: 30px;
    flex-shrink: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 8px,
            rgba(201, 168, 76, 0.15) 8px,
            rgba(201, 168, 76, 0.15) 9px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 8px,
            rgba(201, 168, 76, 0.15) 8px,
            rgba(201, 168, 76, 0.15) 9px
        );
    border-left: 1px solid #8B7332;
    border-right: 1px solid #8B7332;
}

.craft-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(2rem, 4.5vw, 4rem);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-align: center;
}

.heading-underline {
    max-width: 200px;
    margin: 0 auto;
}

.craft-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.body-text {
    color: #F5ECD7;
    margin-bottom: 1.2rem;
}

.pull-quote {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 2px solid #C9A84C;
    border-bottom: 1px solid #5C1A2A;
    background: rgba(61, 43, 31, 0.4);
}

.quote-mark {
    font-family: 'Abril Fatface', serif;
    font-size: 3rem;
    color: #C9A84C;
    line-height: 1;
    position: absolute;
    top: 0.5rem;
    left: 0.8rem;
    opacity: 0.4;
}

.quote-text {
    font-family: 'Abril Fatface', serif;
    font-weight: 400;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    line-height: 1.4;
}

/* ============================================
   COURT 4: THE COLLECTION
   ============================================ */
.court-collection {
    background: #0D0D0D;
    flex-direction: column;
    gap: 2rem;
    padding: 80px 2rem 4rem;
    min-height: 100vh;
    height: auto;
}

.collection-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(2rem, 4.5vw, 4rem);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-align: center;
    position: relative;
    z-index: 2;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    max-width: 1100px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.collection-hex {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: #3D2B1F;
    border: 1px solid #8B7332;
    aspect-ratio: 1 / 1.15;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.35s ease, background-color 0.35s ease;
    opacity: 0;
    transform: translateY(30px);
}

.collection-hex.visible {
    opacity: 1;
    transform: translateY(0);
}

.collection-hex:nth-child(odd) {
    background: #0D0D0D;
}

.collection-hex:hover {
    transform: scale(1.04);
}

.collection-hex:hover .collection-title-underline {
    width: 100%;
}

.collection-hex:hover .cell-icon {
    transform: scale(1.15);
}

.collection-hex-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.5rem 1rem;
    text-align: center;
}

.collection-hex-inner .cell-icon {
    width: 32px;
    height: 32px;
    transition: transform 0.35s ease;
}

.collection-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: clamp(0.6rem, 0.85vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #F5ECD7;
    white-space: nowrap;
}

.collection-title-underline {
    width: 0;
    height: 2px;
    background: #C9A84C;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.collection-desc {
    font-family: 'Lora', serif;
    font-size: clamp(0.55rem, 0.7vw, 0.7rem);
    color: #A8A196;
    line-height: 1.4;
}

/* ============================================
   COURT 5: THE CLOSING
   ============================================ */
.court-closing {
    background: #0D0D0D;
    flex-direction: column;
    position: relative;
}

.closing-tiles {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(6, 1fr);
    pointer-events: none;
}

.closing-tile {
    background: #0D0D0D;
    transition: transform 0.5s ease, background-color 0.5s ease;
    backface-visibility: hidden;
}

.closing-tile.flipped {
    background: #3D2B1F;
    transform: rotateY(180deg);
}

.closing-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding: 2rem;
}

.monogram-wreath {
    position: relative;
    width: clamp(150px, 25vw, 200px);
    height: clamp(150px, 25vw, 200px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wreath-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: #C9A84C;
}

.monogram {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(4rem, 8vw, 7rem);
    position: relative;
    z-index: 2;
}

.closing-details {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.contact-label {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: clamp(0.65rem, 0.8vw, 0.75rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #A8A196;
    margin-top: 1rem;
}

.contact-label:first-child {
    margin-top: 0;
}

.contact-info {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    color: #F5ECD7;
}

.closing-chevron {
    width: clamp(200px, 50vw, 400px);
    opacity: 0.6;
    animation: chevronPulse 2.5s ease-in-out infinite;
}

.closing-chevron svg {
    width: 100%;
}

/* ============================================
   HALFTONE DOT-SCREEN SECTION DIVIDER
   ============================================ */
.court::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-image: radial-gradient(circle, rgba(201, 168, 76, 0.2) 1px, transparent 1px);
    background-size: 12px 12px;
    pointer-events: none;
    z-index: 10;
}

/* ============================================
   RESPONSIVE: MOBILE (< 768px)
   ============================================ */
@media (max-width: 768px) {
    #scoreboard-nav {
        padding: 0 1rem;
        gap: 1rem;
    }

    .nav-links {
        gap: 0.8rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-link {
        font-size: 0.65rem;
        white-space: nowrap;
    }

    /* Court 2: Gallery - Vertical stack */
    .rosette-cluster {
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0 1rem;
    }

    .hex-cell {
        position: relative;
        clip-path: none;
        width: 100% !important;
        height: auto !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        border-top: 3px solid #C9A84C;
        background: #3D2B1F;
        padding: 1.5rem;
    }

    .hex-cell.visible {
        transform: none !important;
    }

    .hex-center {
        order: -1;
    }

    .hex-inner {
        flex-direction: row;
        gap: 1rem;
        justify-content: flex-start;
    }

    .hex-center .hex-inner {
        justify-content: center;
    }

    /* Court 3: Craft - Single column */
    .craft-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .craft-border-left,
    .craft-border-right {
        display: none;
    }

    .craft-hex-clip {
        padding: 2rem 0.5rem;
    }

    /* Court 4: Collection - 2 columns */
    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    /* Court 5: Closing */
    .closing-tiles {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hex-outline {
        width: 160px;
    }

    .site-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }
}
