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

html, body {
    height: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

#map {
    height: 100%;
    width: 100%;
    background-color: #f0f0f0;
}

#logo {
    position: absolute;
    top: 25px;
    left: 25px;
    z-index: 10;
}

#logo img {
    height: 105px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35));
}

@media (min-width: 1024px) {
    #logo img {
        height: 150px;
    }
}

#geolocate-btn {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    background-color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

#geolocate-btn img {
    width: 24px;
    height: 24px;
}

.experience-overlay {
    position: absolute;
    top: 90px;
    right: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: min(500px, calc(100% - 80px));
    z-index: 15;
    pointer-events: auto;
    transition: max-width 0.3s ease, right 0.3s ease;
}

.experience-overlay.collapsed {
    max-width: 230px;
}

.overlay-card {
    padding: 0;
    background: transparent;
    border: none;
    color: #10203b;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding-right: 4px;
}

.overlay-card::-webkit-scrollbar {
    width: 8px;
}

.overlay-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
}

.overlay-card::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(140, 212, 255, 0.8), rgba(131, 234, 241, 0.8));
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(99, 164, 255, 0.45);
}

.overlay-card {
    scrollbar-width: thin;
    scrollbar-color: rgba(140, 212, 255, 0.7) transparent;
}

.overlay-sections {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.overlay-card h1 {
    font-size: 1.9rem;
    margin-bottom: 0.8rem;
    line-height: 1.2;
    color: #0b3d91;
}

.overlay-card .lede,
.overlay-section .lede {
    color: rgba(12, 32, 74, 0.82);
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    color: #1c6ddc;
    margin-bottom: 0.4rem;
}

.overlay-section {
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(243, 244, 250, 0.92));
    border-radius: 20px;
    padding: 20px 22px;
    border: 1px solid rgba(213, 217, 232, 0.8);
    box-shadow:
        10px 10px 28px rgba(12, 18, 34, 0.12),
        -6px -6px 20px rgba(255, 255, 255, 0.85);
}

.overlay-section.hero {
    padding: 24px 26px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(229, 236, 248, 0.95));
}

.overlay-section h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #0c4aa6;
}

.overlay-section p {
    font-size: 0.92rem;
    color: rgba(24, 29, 45, 0.85);
    margin-bottom: 0.5rem;
}

.overlay-section ul {
    list-style: none;
    font-size: 0.85rem;
    color: rgba(24, 29, 45, 0.72);
    line-height: 1.65;
}

.overlay-section ul li::before {
    content: "•";
    margin-right: 6px;
    color: #22a6b3;
}

.overlay-section.highlight {
    border-color: rgba(34, 166, 179, 0.35);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.97), rgba(215, 243, 243, 0.94));
}

.overlay-cta-block {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.overlay-cta-block button {
    background: linear-gradient(135deg, #63a4ff, #83eaf1);
    color: #0c1c2c;
    border: none;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(99, 164, 255, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.overlay-cta-block button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(99, 164, 255, 0.55);
}

.cta-heading {
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0c4aa6;
    margin-bottom: 4px;
    font-weight: 700;
}

.cta-subtext {
    font-size: 0.95rem;
    color: rgba(17, 23, 40, 0.85);
    margin: 0;
}

.cta-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.overlay-animated {
    opacity: 0;
    transform: translateY(24px);
}

.overlay-card.ready .overlay-animated {
    animation: overlayRise 0.7s cubic-bezier(0.23, 0.66, 0.31, 0.99) forwards;
    animation-delay: calc(var(--offset, 0) * 0.15s);
}

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

.overlay-toggle {
    position: absolute;
    top: 24px;
    right: 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(15, 50, 120, 0.18);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(237, 241, 252, 0.9));
    color: #0b3d91;
    padding: 10px 18px;
    border-radius: 999px;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 8px 8px 20px rgba(12, 18, 34, 0.15), -6px -6px 16px rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 18;
}

.overlay-toggle .toggle-icon {
    font-size: 0.9rem;
    color: inherit;
}

.overlay-toggle .toggle-text {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: inherit;
}

.experience-overlay.collapsed .overlay-card {
    display: none;
}

.overlay-toggle[aria-expanded="false"] {
    box-shadow: 6px 6px 14px rgba(12, 18, 34, 0.18), -5px -5px 14px rgba(255, 255, 255, 0.9);
}

.overlay-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 10px 10px 22px rgba(12, 18, 34, 0.2), -6px -6px 18px rgba(255, 255, 255, 0.95);
}

.scroll-indicator {
    margin: -4px auto 0;
    align-self: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(180deg, #5ea4ff, #12305e);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 6px 14px rgba(12, 18, 34, 0.2);
    cursor: default;
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: indicatorFloat 2s ease-in-out infinite;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes indicatorFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(6px); }
    100% { transform: translateY(0); }
}

#contact-panel {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 15, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 20;
    transition: opacity 0.3s ease;
}

#contact-panel[aria-hidden="true"] {
    opacity: 0;
    pointer-events: none;
}

.contact-card {
    width: min(420px, 100%);
    background: rgba(8, 12, 19, 0.95);
    border-radius: 24px;
    padding: 32px;
    color: #f5f7fb;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    position: relative;
}

#close-contact {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
}

.contact-card h2 {
    margin-bottom: 0.6rem;
    font-size: 1.6rem;
}

.contact-card .lede {
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(245, 247, 251, 0.8);
    margin-bottom: 1.4rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.9rem;
}

.form-row label {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    color: rgba(245, 247, 251, 0.7);
}

.form-row input,
.form-row textarea {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 12px;
    color: #f5f7fb;
    font-size: 0.95rem;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: rgba(245, 247, 251, 0.5);
}

button.primary {
    width: 100%;
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    color: #1b1f27;
    border: none;
    padding: 12px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.2rem;
}

.form-note {
    font-size: 0.85rem;
    color: #8cd4ff;
    margin-top: 0.6rem;
    min-height: 1em;
}

body.panel-open {
    overflow: hidden;
}

/* Info Panel Styling */
#info-panel {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: linear-gradient(160deg, rgba(255,255,255,0.97), rgba(235,240,255,0.95));
    padding: 18px 28px;
    border-radius: 24px;
    border: 1px solid rgba(210, 218, 240, 0.9);
    box-shadow: 14px 14px 32px rgba(15, 18, 32, 0.12), -10px -10px 26px rgba(255,255,255,0.85);
    text-align: center;
    min-width: 320px;
    transition: all 0.3s ease;
}

#code-display {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.code-2d { color: #D32F2F; }
.code-4d { color: #388E3C; }
.code-6d { color: #1976D2; }

#line1-display {
    font-size: 1rem;
    font-weight: 600;
    color: #0b3d91;
}

#line2-display {
    font-size: 0.92rem;
    color: rgba(16, 32, 64, 0.75);
}

#line3-display {
    font-size: 0.8rem;
    color: rgba(16, 32, 64, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

@media (max-width: 1024px) {
    .experience-overlay {
        top: 90px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: min(460px, calc(100% - 40px));
        align-items: center;
    }

    .overlay-toggle {
        top: 24px;
        right: 20px;
    }

    .overlay-card {
        max-height: calc(100vh - 200px);
    }
}

@media (max-width: 768px) {
    #logo {
        top: 12px;
        left: 16px;
    }

    .experience-overlay {
        top: 110px;
        right: 16px;
        left: 16px;
        transform: none;
        width: auto;
        max-width: none;
        align-items: stretch;
    }

    .overlay-card {
        max-height: calc(100vh - 240px);
    }

    .overlay-section {
        padding: 16px 18px;
    }

    .overlay-card h1 {
        font-size: 1.5rem;
    }

    .overlay-cta-block {
        flex-direction: column;
        align-items: flex-start;
    }

    .overlay-cta-block button {
        width: 100%;
        text-align: center;
    }
    .overlay-toggle {
        top: 16px;
        right: 16px;
    }

    #logo img {
        height: 80px;
    }

    #info-panel {
        width: calc(100% - 32px);
        left: 16px;
        bottom: 24px;
        transform: none;
    }
}
