main > section[id] {
    min-height: auto;
    padding-top: 20px;
    padding-bottom: 75px;
}

#about,
#who,
#roadmap {
    margin-top: var(--section-gap);
}

#roadmap {
    min-height: auto;
    padding-bottom: 50px;
    margin-bottom: 0;
}

main > section.stack-layer {
    --stack-y: 0px;
    --stack-scale: 1;
    --stack-opacity: 1;
    --stack-z: 1;
    --lift: 0px;
    position: relative;
    z-index: var(--stack-z);
    opacity: var(--stack-opacity);
    transform: translateY(calc(var(--stack-y) + var(--lift))) scale(var(--stack-scale));
    transform-origin: center top;
    will-change: transform, opacity;
}

.hero-screen {
    display: flex;
    align-items: center;
    background: transparent;
}

.hero {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid var(--border);
}

.hero.hero--landing {
    padding: 26px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
    align-items: center;
}

.hero-stack {
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    color: rgba(15, 23, 42, 0.70);
    font-weight: 700;
    font-size: 14px;
    width: fit-content;
}

.badge-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--accent-2);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.18);
}

.hero-title {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.9px;
    line-height: 1.06;
}

.hero-title .accent {
    color: var(--accent);
}

.hero-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    max-width: 58ch;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.stat-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border);
    text-align: center;
}

.stat-number {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.92);
}

.stat-label {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.62);
}

.hero-visual {
    position: relative;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--border);
    padding: 14px;
    overflow: hidden;
    width: 100%;
    max-width: 650px;
    box-shadow: 0 15px 50px rgba(34, 197, 94, 0.3);
}

.hero-visual img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.hero-chip {
    position: absolute;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    min-width: 190px;
    animation: float 4s ease-in-out infinite;
}

.chip-icon {
    width: 34px;
    height: 34px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-weight: 900;
}

.chip-title {
    margin: 0;
    font-size: 13px;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.90);
    line-height: 1.1;
}

.chip-sub {
    margin: 2px 0 0;
    font-size: 11px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.55);
}

.chip-top-left { top: 14px; left: 14px; }
.chip-top-right { top: 18px; right: 14px; min-width: 180px; animation-delay: 1s; }
.chip-bottom-left { bottom: 18px; left: 14px; animation-delay: 2s; }
.chip-bottom-right { bottom: 14px; right: 14px; min-width: 180px; animation-delay: 3s; }

.hero h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.4px;
}

.hero p { margin: 0; color: var(--muted); font-size: 18px; }

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.section-title {
    margin: 26px 0 8px;
    font-size: 22px;
}

.section-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

#about {
    text-align: center;
    padding-top: 0 !important;
}

#about .section-title {
    font-size: clamp(34px, 4.5vw, 48px);
    color: var(--accent);
    letter-spacing: -0.6px;
    margin: 10px 0 6px;
}

#about .section-subtitle {
    font-size: 18px;
    max-width: 58ch;
    margin: 0 auto;
}

#about .pricing-wrap {
    margin-top: 26px;
    padding: 18px 16px 8px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(181, 241, 232, 0.50) 0%, rgba(181, 241, 232, 0.20) 100%);
}

#about .pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

#about .pricing-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 22px;
    padding: 22px 22px 20px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
    text-align: left;
    position: relative;
}

#about .pricing-card--featured {
    transform: translateY(-10px);
    border-color: rgba(15, 118, 110, 0.34);
}

#about .pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 900;
    color: #ffffff;
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.30);
}

#about .pricing-badge::before {
    content: "*";
    font-weight: 900;
}

#about .pricing-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--accent);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px auto 16px;
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.25);
}

#about .pricing-title {
    margin: 0;
    text-align: center;
    font-size: 35px;
    color: rgba(15, 23, 42, 0.84);
}

#about .pricing-price {
    margin: 8px 0 6px;
    text-align: center;
    font-size: clamp(36px, 3.4vw, 48px);
    line-height: 1.15;
    color: var(--accent);
    font-weight: 900;
}

#about .pricing-note {
    margin: 0 0 12px;
    text-align: center;
    font-size: 15px;
    color: rgba(15, 23, 42, 0.66);
    font-weight: 700;
}

#about .pricing-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

#about .pricing-list li {
    position: relative;
    padding-left: 18px;
    color: rgba(15, 23, 42, 0.78);
    font-size: 15px;
    line-height: 1.35;
}

#about .pricing-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: rgba(20, 184, 166, 0.9);
    font-weight: 900;
}

#features {
    text-align: center;
    padding-top: 20px;
    padding-bottom: 66px;
    background: transparent;
}

#features.section-lift {
    --lift: 16px;
    position: relative;
    z-index: 2;
    margin-top: -48px;
    padding-top: 34px !important;
    transition: transform 140ms linear, opacity 140ms linear;
    will-change: transform;
}

#features .features-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

#features .feature-card {
    grid-column: auto;
    padding: 26px 18px;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08) !important;
}

#features .feature-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    margin-bottom: 14px;
}

#features .feature-card h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

#features .feature-card p {
    margin: 0;
    font-size: 14px;
}

@keyframes features-card-pulse {
    0% { transform: scale(1); }
    60% { transform: scale(1.06); }
    100% { transform: scale(1.03); }
}

#features .card {
    transform: translateZ(0);
    will-change: transform;
}

#features .card:hover,
#features .card:focus-within {
    transform: scale(1.03);
    animation: features-card-pulse 420ms ease-in-out;
}

#who {
    text-align: center;
    padding-top: 0 !important;
}

#who .section-title {
    font-size: clamp(34px, 4.2vw, 48px);
    color: var(--accent);
    letter-spacing: -0.6px;
    margin: 10px 0 6px;
}

#who .section-subtitle {
    font-size: 18px;
    margin: 0 auto;
}

#who .how-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

#who .how-card {
    text-align: left;
    padding: 24px 26px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 118, 110, 0.16);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.10);
}

#who .how-step {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 900;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.24);
}

#who .how-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: rgba(15, 23, 42, 0.86);
}

#who .how-card p {
    margin: 0;
    font-size: 16px;
    color: rgba(15, 23, 42, 0.68);
    line-height: 1.45;
}

#roadmap {
    text-align: center;
    padding-top: 0 !important;
}

#roadmap .section-title {
    font-size: clamp(34px, 4.2vw, 48px);
    color: var(--accent);
    letter-spacing: -0.6px;
    margin: 10px 0 6px;
}

#roadmap .section-subtitle {
    font-size: 18px;
    margin: 0 auto;
}

#roadmap .testimonials-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

#roadmap .testimonial-card {
    padding: 22px 22px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(15, 118, 110, 0.14);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.10);
    text-align: left;
}

#roadmap .testimonial-stars {
    margin: 0 0 10px;
    color: #17b6a8;
    letter-spacing: 1px;
    font-size: 18px;
    font-weight: 900;
}

#roadmap .testimonial-quote {
    margin: 0;
    color: rgba(15, 23, 42, 0.78);
    font-size: 16px;
    line-height: 1.5;
    font-style: italic;
    font-weight: 700;
}

#roadmap .testimonial-divider {
    border: 0;
    border-top: 1px solid rgba(15, 118, 110, 0.20);
    margin: 14px 0 12px;
}

#roadmap .testimonial-name {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.88);
}

#roadmap .testimonial-meta {
    margin: 2px 0 0;
    font-size: 14px;
    color: rgba(15, 23, 42, 0.62);
}

.stat-card, .button, .hero-chip, .hero-badge, .feature-icon {
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3) !important;
    transition: box-shadow 0.3s ease, transform 0.18s ease;
}

.button:hover {
    box-shadow: 0 12px 35px rgba(34, 197, 94, 0.5) !important;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@media (max-width: 720px) {
    #features .features-grid {
        gap: 12px;
    }

    #features .feature-card {
        padding: 16px 12px;
        border-radius: 18px;
    }

    #features .feature-icon {
        width: 50px;
        height: 50px;
        border-radius: 16px;
        margin-bottom: 10px;
    }

    #features .feature-card h3 { font-size: 14px; }
    #features .feature-card p { font-size: 12px; }
}

@media (max-width: 980px) {
    #about .pricing-grid {
        grid-template-columns: 1fr;
    }

    #about .pricing-card--featured {
        transform: none;
    }

    #who .how-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #roadmap .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .card { grid-column: span 12; }
}

@media (max-width: 640px) {
    :root {
        --section-peek: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #features.section-lift {
        transform: none;
        transition: none;
    }

    #features .card:hover,
    #features .card:focus-within {
        animation: none;
    }
}

/* Landing Page Map Styles */
.dorm-map-container {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(15, 118, 110, 0.12);
    background: #ffffff;
    border: 1px solid var(--border);
}

.landing-map {
    width: 100%;
    height: clamp(400px, 60vh, 600px);
    background: #f0f9f8;
    position: relative;
    z-index: 1;
}

.landing-map .leaflet-container {
    height: 100%;
    width: 100%;
    background: #ffffff;
}

/* Dorm Popup */
.dorm-popup {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    border: 1px solid var(--border);
    z-index: 1000;
    max-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.dorm-popup[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dorm-popup-content {
    position: relative;
    padding: 16px;
}

.dorm-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    color: #6b7b88;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.dorm-popup-close:hover {
    background: #f0f9f8;
    color: #0f766e;
}

.dorm-popup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.dorm-popup-name {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
    flex: 1;
}

.dorm-popup-price {
    white-space: nowrap;
    padding: 4px 8px;
    background: #ccfbf1;
    color: #0f766e;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

.dorm-popup-body {
    margin-bottom: 12px;
}

.dorm-popup-address {
    margin: 0 0 8px;
    font-size: 13px;
    color: #6b7b88;
    line-height: 1.4;
}

.dorm-popup-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.info-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #0d9488;
}

.dorm-popup-footer {
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.dorm-popup-action {
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: #0f766e;
    color: #ffffff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dorm-popup-action:hover {
    background: #0d6b62;
    transform: translateY(-1px);
}

/* Map Overlay (for unauthenticated users) */
.dorm-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.dorm-map-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.dorm-map-overlay-content {
    text-align: center;
    padding: 40px 20px;
}

.dorm-map-overlay-content p {
    margin: 0 0 20px;
    font-size: 16px;
    font-weight: 600;
    color: #4b5563;
}

#dorm-find-btn {
    padding: 12px 32px;
    font-size: 15px;
    border-radius: 10px;
}

/* Leaflet Marker Customization */
.landing-map .leaflet-marker-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0f766e;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-map .leaflet-marker-icon::after {
    content: '🏠';
    font-size: 18px;
}

.landing-map .leaflet-marker-icon.viewed {
    background: #14b8a6;
}

.landing-map .leaflet-marker-shadow {
    display: none;
}

/* Leaflet Control Customization */
.landing-map .leaflet-control-zoom {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
}

.landing-map .leaflet-control-zoom a {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 18px;
    font-weight: bold;
    background: #ffffff;
    color: #0f766e;
    border: 1px solid var(--border);
}

.landing-map .leaflet-control-zoom a:hover {
    background: #f0fdfa;
}

.landing-map .leaflet-control-zoom a:first-child {
    border-radius: 12px 12px 0 0;
}

.landing-map .leaflet-control-zoom a:last-child {
    border-radius: 0 0 12px 12px;
    border-top: none;
}

/* Dark Mode Styles */
:root.dark .dorm-map-container {
    background: #0f2220;
    border-color: #115e59;
}

:root.dark .landing-map {
    background: #071b2a;
}

:root.dark .landing-map .leaflet-container {
    background: #0f2220;
}

:root.dark .dorm-popup {
    background: #0f2220;
    border-color: #115e59;
}

:root.dark .dorm-popup-close {
    color: #5eead4;
}

:root.dark .dorm-popup-close:hover {
    background: #115e59;
    color: #ffffff;
}

:root.dark .dorm-popup-name {
    color: #e0f7f5;
}

:root.dark .dorm-popup-price {
    background: rgba(13, 148, 136, 0.2);
    color: #5eead4;
}

:root.dark .dorm-popup-address {
    color: #a8b8ce;
}

:root.dark .info-badge {
    background: rgba(13, 148, 136, 0.15);
    border-color: rgba(13, 148, 136, 0.3);
    color: #5eead4;
}

:root.dark .dorm-popup-footer {
    border-color: #115e59;
}

:root.dark .dorm-popup-action {
    background: #0d9488;
    color: #ffffff;
}

:root.dark .dorm-popup-action:hover {
    background: #059669;
}

:root.dark .dorm-map-overlay {
    background: rgba(10, 21, 20, 0.85);
}

:root.dark .dorm-map-overlay-content p {
    color: #a8b8ce;
}

:root.dark .landing-map .leaflet-control-zoom a {
    background: #115e59;
    color: #5eead4;
    border-color: #115e59;
}

:root.dark .landing-map .leaflet-control-zoom a:hover {
    background: #0f3d38;
}

/* Responsive Design */
@media (max-width: 768px) {
    .landing-map {
        height: 400px;
    }

    .dorm-popup {
        max-width: 280px;
        bottom: 16px;
        left: 16px;
        right: 16px;
    }

    .dorm-map-overlay-content {
        padding: 30px 16px;
    }
}

@media (max-width: 640px) {
    .landing-map {
        height: 350px;
    }

    .dorm-popup {
        max-width: none;
    }

    .dorm-popup-name {
        font-size: 15px;
    }

    .dorm-popup-price {
        font-size: 12px;
    }

    .dorm-popup-address {
        font-size: 12px;
    }

    .info-badge {
        font-size: 11px;
    }
}
