/* =============================================
   longitude.day - Memphis Geographic Celebration
   ============================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.65;
    color: #1a2a30;
    background-color: #d4e8f0;
    overflow-x: hidden;
}

/* --- Typography --- */
.section-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: clamp(36px, 7vw, 84px);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #1a2a30;
    margin-bottom: 24px;
}

.section-body {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.65;
    color: #1a2a30;
    max-width: 32em;
    margin-bottom: 20px;
}

.coordinate-data {
    font-family: 'Courier Prime', monospace;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: #5a7080;
}

/* --- Sections --- */
.section {
    position: relative;
    padding: clamp(48px, 8vh, 100px) clamp(24px, 5vw, 80px);
    overflow: hidden;
}

/* --- Sharp Angle Grid Background --- */
/* Palette: #d4e8f0, #8cb8d0, #4a88a8, #e8a030, #c45050, #f8f4e8, #0a0a0a, #1a2a30, #5a7080 */
.sharp-angle-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(30deg, rgba(10,10,10,0.03) 1px, transparent 1px),
        linear-gradient(-30deg, rgba(10,10,10,0.03) 1px, transparent 1px),
        linear-gradient(60deg, rgba(10,10,10,0.02) 1px, transparent 1px),
        linear-gradient(-60deg, rgba(10,10,10,0.02) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px, 120px 120px, 120px 120px;
}

/* =============================================
   HERO SECTION
   ============================================= */
.section-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #d4e8f0;
    position: relative;
}

/* --- Memphis Decorations (scattered shapes) --- */
.memphis-decoration {
    position: absolute;
    z-index: 2;
    opacity: 0;
    transform: scale(0) rotate(0deg);
    transition: none;
}

.memphis-decoration.visible {
    opacity: 1;
    transform: scale(1) rotate(var(--rotate, 0deg));
}

.memphis-triangle {
    width: 0;
    height: 0;
}

.memphis-deco-1 {
    --rotate: 15deg;
    top: 12%;
    left: 8%;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-bottom: 38px solid #e8a030;
}

.memphis-deco-2 {
    --rotate: -20deg;
    top: 18%;
    right: 12%;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 32px solid #c45050;
}

.memphis-deco-3 {
    --rotate: 5deg;
    top: 25%;
    left: 5%;
}

.memphis-deco-4 {
    --rotate: 0deg;
    bottom: 20%;
    right: 8%;
}

.memphis-deco-5 {
    --rotate: -8deg;
    bottom: 15%;
    left: 12%;
}

.memphis-deco-6 {
    --rotate: 45deg;
    bottom: 25%;
    right: 15%;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-bottom: 28px solid #8cb8d0;
}

.memphis-deco-7 {
    --rotate: 10deg;
    top: 35%;
    right: 6%;
}

.memphis-deco-8 {
    --rotate: -30deg;
    bottom: 10%;
    left: 6%;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid #e8a030;
    opacity: 1;
    transform: scale(1) rotate(-30deg);
}

.memphis-deco-9 {
    bottom: 5%;
    right: 10%;
    opacity: 1;
    transform: scale(1);
}

.memphis-deco-10 {
    bottom: 12%;
    right: 25%;
    opacity: 1;
    transform: scale(1);
}

/* --- Globe --- */
.globe-container {
    position: relative;
    width: clamp(280px, 45vw, 400px);
    height: clamp(280px, 45vw, 400px);
    z-index: 3;
}

.globe-svg {
    width: 100%;
    height: 100%;
}

.globe-fill {
    transition: opacity 400ms ease;
}

/* --- Globe Title Overlay --- */
.globe-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 4;
    opacity: 0;
    transition: opacity 400ms ease;
    pointer-events: none;
}

.globe-title.visible {
    opacity: 1;
}

.globe-title-main {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 5.5vw, 56px);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1a2a30;
    text-shadow: 2px 2px 0 rgba(212, 232, 240, 0.8);
}

.globe-title-sub {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: clamp(18px, 3vw, 32px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #c45050;
    margin-top: -4px;
    text-shadow: 1px 1px 0 rgba(248, 244, 232, 0.8);
}

/* --- Scroll hint --- */
.hero-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    animation: bounceHint 2s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes bounceHint {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* =============================================
   ZIGZAG DIVIDERS
   ============================================= */
.zigzag-divider {
    position: relative;
    z-index: 5;
    line-height: 0;
    background: transparent;
    margin: -1px 0;
}

.zigzag-divider svg {
    display: block;
    width: 100%;
}

/* =============================================
   MERIDIANS SECTION
   ============================================= */
.section-meridians {
    background-color: #f8f4e8;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-meridians .section-content {
    display: flex;
    gap: clamp(40px, 6vw, 100px);
    align-items: center;
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
}

/* --- Meridian Hero --- */
.meridians-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 3vw, 40px);
    flex-shrink: 0;
    min-height: 350px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.meridians-hero.visible {
    opacity: 1;
    transform: translateY(0);
}

.meridian-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.meridian-shaft {
    width: 3px;
    height: 200px;
    background-color: #0a0a0a;
    transition: height 600ms ease;
}

.meridian-prime .meridian-shaft {
    width: 6px;
    height: 300px;
    background-color: #0a0a0a;
    position: relative;
}

.meridian-prime .meridian-shaft::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #e8a030, #c45050);
    opacity: 0.3;
}

.meridian-left-1 .meridian-shaft,
.meridian-right-1 .meridian-shaft {
    width: 4px;
    height: 240px;
}

.meridian-left-2 .meridian-shaft,
.meridian-right-2 .meridian-shaft {
    width: 2px;
    height: 160px;
}

.meridian-deco-top,
.meridian-deco-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

/* --- Meridians Text --- */
.meridians-text {
    max-width: 32em;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 600ms ease 200ms, transform 600ms ease 200ms;
}

.meridians-text.visible {
    opacity: 1;
    transform: translateX(0);
}

/* =============================================
   TIME ZONES SECTION
   ============================================= */
.section-timezones {
    background-color: #d4e8f0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-timezones .section-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
}

.section-timezones .section-title {
    margin-bottom: 16px;
}

.section-timezones .section-body {
    margin-bottom: 40px;
}

/* --- Timeline Hero --- */
.timeline-hero {
    display: flex;
    width: 100%;
    height: 120px;
    border: 3px solid #0a0a0a;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: scaleX(0.3);
    transition: opacity 600ms ease, transform 800ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-hero.visible {
    opacity: 1;
    transform: scaleX(1);
}

.timezone-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 1.5px solid rgba(10, 10, 10, 0.15);
    cursor: pointer;
    transition: filter 200ms ease, background-color 200ms ease;
}

.timezone-block:last-child {
    border-right: none;
}

.timezone-block:hover {
    filter: brightness(1.2);
}

.tz-label {
    font-family: 'Courier Prime', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #1a2a30;
    white-space: nowrap;
    opacity: 0.7;
    transition: opacity 200ms ease;
}

.timezone-block:hover .tz-label {
    opacity: 1;
}

/* --- Starburst decorations --- */
.tz-starburst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    transition: transform 200ms ease;
    pointer-events: none;
}

.tz-starburst svg {
    width: 100%;
    height: 100%;
}

.tz-starburst-greenwich {
    width: 40px;
    height: 40px;
}

.tz-starburst-dateline {
    width: 38px;
    height: 38px;
}

.timezone-block:hover .tz-starburst {
    transform: translate(-50%, -50%) scale(1.2);
}

.timezone-greenwich {
    border-left: 2.5px solid #c45050;
    border-right: 2.5px solid #c45050;
}

/* --- Timezone Tooltip --- */
.timezone-tooltip {
    position: fixed;
    background-color: #1a2a30;
    color: #f8f4e8;
    font-family: 'Courier Prime', monospace;
    font-size: 13px;
    letter-spacing: 0.03em;
    padding: 6px 12px;
    border-radius: 3px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 150ms ease;
    z-index: 100;
    white-space: nowrap;
}

.timezone-tooltip.visible {
    opacity: 1;
}

/* =============================================
   NAVIGATE (CLOSING) SECTION
   ============================================= */
.section-navigate {
    background-color: #f8f4e8;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* --- Compass Hero --- */
.compass-hero {
    position: relative;
    z-index: 2;
    width: clamp(250px, 40vw, 380px);
    height: clamp(250px, 40vw, 380px);
    margin-bottom: 40px;
    opacity: 0;
    transform: rotate(-30deg) scale(0.8);
    transition: opacity 600ms ease, transform 800ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.compass-hero.visible {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.compass-svg {
    width: 100%;
    height: 100%;
}

/* --- Closing Text --- */
.navigate-closing {
    position: relative;
    z-index: 2;
}

.closing-statement {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 5vw, 56px);
    letter-spacing: 0.02em;
    color: #1a2a30;
    margin-bottom: 16px;
    border-bottom: 3px solid #4a88a8;
    display: inline-block;
    padding-bottom: 8px;
}

/* =============================================
   ANIMATIONS
   ============================================= */

/* Globe drawing animation */
@keyframes drawGlobeOutline {
    to { stroke-dashoffset: 0; }
}

/* Memphis bounce in */
@keyframes memphisBounceIn {
    0% {
        opacity: 0;
        transform: scale(0) rotate(var(--rotate, 0deg)) translate(var(--tx, 0), var(--ty, 0));
    }
    60% {
        opacity: 1;
        transform: scale(1.15) rotate(var(--rotate, 0deg));
    }
    80% {
        transform: scale(0.95) rotate(var(--rotate, 0deg));
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(var(--rotate, 0deg));
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .section-meridians .section-content {
        flex-direction: column;
        text-align: center;
    }

    .meridians-text {
        transform: translateY(20px);
    }

    .meridians-text.visible {
        transform: translateY(0);
    }

    .meridian-prime .meridian-shaft {
        height: 200px;
    }

    .meridian-left-1 .meridian-shaft,
    .meridian-right-1 .meridian-shaft {
        height: 160px;
    }

    .meridian-left-2 .meridian-shaft,
    .meridian-right-2 .meridian-shaft {
        height: 110px;
    }

    .timeline-hero {
        height: 90px;
    }

    .tz-label {
        font-size: 9px;
    }

    .tz-starburst {
        width: 22px;
        height: 22px;
    }

    .tz-starburst-greenwich {
        width: 28px;
        height: 28px;
    }

    .tz-starburst-dateline {
        width: 26px;
        height: 26px;
    }

    .memphis-deco-3,
    .memphis-deco-5,
    .memphis-deco-7 {
        display: none;
    }
}

@media (max-width: 480px) {
    .globe-container {
        width: 260px;
        height: 260px;
    }

    .timeline-hero {
        height: 70px;
        flex-wrap: nowrap;
    }

    .tz-label {
        font-size: 7px;
    }

    .tz-starburst {
        width: 16px;
        height: 16px;
    }

    .compass-hero {
        width: 240px;
        height: 240px;
    }
}
