/* ═══════════════════════════════════════════
   DREAM LAB — Custom Styles
   ═══════════════════════════════════════════ */

/* ── 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 {
    overflow-x: hidden;
}

::selection {
    background: rgba(52, 212, 168, 0.2);
    color: #F8FAF9;
}

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

/* ── Loader ── */
.loader {
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-text {
    animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Custom Cursor ── */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: #34D4A8;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
    mix-blend-mode: difference;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(52, 212, 168, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

.cursor-dot.hovering {
    width: 12px;
    height: 12px;
    background: #34D4A8;
}

.cursor-ring.hovering {
    width: 60px;
    height: 60px;
    border-color: rgba(52, 212, 168, 0.8);
}

/* ── Navigation ── */
.nav {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.nav.scrolled {
    background: rgba(5, 13, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(52, 212, 168, 0.08);
}

.nav-logo {
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #34D4A8;
    transition: width 0.3s ease;
}

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

/* Hamburger */
#menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    transform-origin: center;
}

#menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(45%) rotate(45deg);
}

#menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-45%) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    background: rgba(5, 13, 26, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(52, 212, 168, 0.1);
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-menu.hidden {
    display: none;
}

.mobile-link {
    display: block;
    padding: 4px 0;
}

/* ── Hero ── */
.hero {
    position: relative;
}

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

.hero-img {
    transform: scale(1.05);
    transition: transform 8s ease;
}

.hero-loaded .hero-img {
    transform: scale(1);
}

.hero-overlay {
    background: linear-gradient(
        to right,
        rgba(5, 13, 26, 0.95) 0%,
        rgba(5, 13, 26, 0.85) 40%,
        rgba(5, 13, 26, 0.5) 70%,
        rgba(5, 13, 26, 0.2) 100%
    );
}

.hero-scroll {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.hero-scroll:hover {
    opacity: 1;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(52, 212, 168, 0.6), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.4; }
}

/* ── Stat Cards ── */
.stat-card {
    border: 1px solid rgba(52, 212, 168, 0.12);
    background: rgba(10, 22, 40, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, #34D4A8, transparent);
    opacity: 0.6;
}

.stat-card:hover {
    border-color: rgba(52, 212, 168, 0.3);
    transform: translateX(4px);
    box-shadow: -4px 0 20px rgba(52, 212, 168, 0.08);
}

.stat-card-inner {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    line-height: 1.1;
}

/* ── Buttons ── */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(52, 212, 168, 0.25);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(52, 212, 168, 0.1);
}

/* ── Section Titles ── */
.section-tag {
    display: inline-block;
}

.section-title {
    position: relative;
}

/* ── About ── */
.about-image-frame {
    position: relative;
}

.about-image-frame::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: 12px;
    bottom: 12px;
    border: 1px solid rgba(52, 212, 168, 0.15);
    z-index: -1;
}

.about-img {
    transition: transform 0.6s ease;
}

.about-image-frame:hover .about-img {
    transform: scale(1.02);
}

.about-badge {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.about-stat {
    display: flex;
    flex-direction: column;
}

/* ── Menu ── */
.menu-item {
    position: relative;
    padding-left: 1rem;
    border-left: 1px solid rgba(52, 212, 168, 0.1);
    transition: border-left-color 0.3s ease;
}

.menu-item:hover {
    border-left-color: rgba(52, 212, 168, 0.4);
}

.menu-item:hover .font-serif {
    color: #34D4A8;
    transition: color 0.3s ease;
}

/* ── Space Cards ── */
.space-card {
    border: 1px solid rgba(52, 212, 168, 0.08);
    background: rgba(10, 22, 40, 0.4);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.space-card:hover {
    border-color: rgba(52, 212, 168, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.space-card-img {
    height: 220px;
    overflow: hidden;
}

.space-card-img-inner {
    transition: transform 0.6s ease;
}

.space-card:hover .space-card-img-inner {
    transform: scale(1.05);
}

.space-card-body {
    border-top: 1px solid rgba(52, 212, 168, 0.08);
}

/* ── Visit / Form ── */
.visit-info {
    position: relative;
}

.form-input {
    background: rgba(15, 31, 54, 0.6);
    border: 1px solid rgba(52, 212, 168, 0.15);
    color: #F8FAF9;
    padding: 12px 16px;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.02em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    width: 100%;
    border-radius: 0;
    -webkit-appearance: none;
}

.form-input::placeholder {
    color: rgba(232, 237, 233, 0.3);
}

.form-input:focus {
    border-color: rgba(52, 212, 168, 0.5);
    box-shadow: 0 0 0 3px rgba(52, 212, 168, 0.08);
}

.form-input option {
    background: #0A1628;
    color: #F8FAF9;
}

.form-success {
    animation: fadeIn 0.4s ease forwards;
}

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

/* ── Map ── */
.map-section {
    position: relative;
}

.map-overlay {
    background: linear-gradient(to bottom, rgba(5, 13, 26, 0.3), transparent 20%, transparent 80%, rgba(10, 22, 40, 0.5));
}

/* ── Footer ── */
.footer {
    background: rgba(5, 13, 26, 0.8);
}

.footer-logo {
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 0.8;
}

/* ── Reveal Animations ── */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .stat-card {
        padding: 1.25rem 1.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .about-badge {
        width: 60px;
        height: 60px;
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
    }

    .about-badge span {
        font-size: 0.7rem !important;
    }

    .about-image-frame::before {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-headline {
        font-size: 2.75rem !important;
    }

    .section-title {
        font-size: 2.5rem !important;
    }
}
