.landing-page {
    min-height: 100vh;
    margin: 0;
    background: #1a0a12;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.landing-hero {
    position: relative;
    z-index: 0;
}

.landing-collage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 88px;
    gap: 0.55rem;
    padding: 0.55rem;
    filter: saturate(1.08);
}

.landing-collage-item {
    border-radius: 0.85rem;
    background-size: cover;
    background-position: center;
    min-height: 0;
}

/* Famous places & wonders of India (Wikimedia Commons) */
.landing-collage-1 { grid-row: span 2; background-image: url("../images/landing/india-01-taj-mahal.jpg"); }
.landing-collage-2 { grid-row: span 3; background-image: url("../images/landing/india-02-golden-temple.jpg"); background-position: center top; }
.landing-collage-3 { grid-row: span 2; background-image: url("../images/landing/india-03-india-gate.jpg"); }
.landing-collage-4 { grid-row: span 2; background-image: url("../images/landing/india-04-hawa-mahal.jpg"); background-position: center 30%; }
.landing-collage-5 { grid-row: span 3; background-image: url("../images/landing/india-05-gateway-of-india.jpg"); background-position: center 35%; }
.landing-collage-6 { grid-row: span 2; background-image: url("../images/landing/india-06-mysore-palace.jpg"); }
.landing-collage-7 { grid-row: span 2; background-image: url("../images/landing/india-07-charminar.jpg"); background-position: center 20%; }
.landing-collage-8 { grid-row: span 3; background-image: url("../images/landing/india-08-red-fort.jpg"); }
.landing-collage-9 { grid-row: span 2; background-image: url("../images/landing/india-09-qutub-minar.jpg"); }
.landing-collage-10 { grid-row: span 2; background-image: url("../images/landing/india-10-ladakh.jpg"); background-position: center 40%; }
.landing-collage-11 { grid-row: span 3; background-image: url("../images/landing/india-11-kerala-backwaters.jpg"); }
.landing-collage-12 { grid-row: span 2; background-image: url("../images/landing/india-12-varanasi-ghats.jpg"); }
.landing-collage-13 { grid-row: span 2; background-image: url("../images/landing/india-13-meenakshi-temple.jpg"); background-position: center 60%; }
.landing-collage-14 { grid-row: span 3; background-image: url("../images/landing/india-14-konark-sun-temple.jpg"); }
.landing-collage-15 { grid-row: span 2; background-image: url("../images/landing/india-15-ajanta-caves.jpg"); background-position: center 70%; }
.landing-collage-16 { grid-row: span 2; background-image: url("../images/landing/india-16-victoria-memorial.jpg"); background-position: center 25%; }

.landing-hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(20, 8, 14, 0.72) 0%,
        rgba(20, 8, 14, 0.35) 38%,
        rgba(20, 8, 14, 0.08) 68%,
        rgba(20, 8, 14, 0.55) 100%
    );
    pointer-events: none;
}

.landing-hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 1rem 5rem 0 1rem;
    pointer-events: none;
}

.landing-hero-lang {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 4;
    pointer-events: auto;
}

.landing-card-nav {
    display: none;
}

.landing-hero-brand {
    color: #fff;
    max-width: 18rem;
    pointer-events: none;
}

.landing-hero-logo {
    display: block;
    line-height: 0;
}

.landing-hero-logo-img {
    display: block;
    width: min(200px, 72vw);
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

.landing-hero-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0.35rem 0 0;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.95);
}

.landing-hero-tagline {
    font-size: 0.82rem;
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.78);
}

.landing-shell {
    position: relative;
    z-index: 2;
}

.landing-back-btn {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    font-weight: 600;
    color: #333;
}

.landing-lang-btn {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    font-weight: 600;
}

.landing-sheet {
    position: relative;
    z-index: 2;
}

.landing-card {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.5rem 1.25rem 1rem;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
}

.landing-step {
    display: none;
}

.landing-step.active {
    display: block;
}

.landing-domain {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f1f1f;
    letter-spacing: -0.02em;
}

.landing-step-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.35rem;
}

.landing-step-subtitle {
    color: #666;
    font-size: 0.92rem;
    margin-bottom: 1.1rem;
}

.landing-choice-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.landing-choice-card:hover {
    border-color: #d35400;
    box-shadow: 0 4px 14px rgba(211, 84, 0, 0.12);
    color: inherit;
}

.landing-choice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: #fff3e8;
    color: #d35400;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.landing-choice-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.landing-choice-text strong {
    font-size: 1rem;
    color: #1a1a1a;
}

.landing-choice-text small {
    color: #777;
    font-size: 0.82rem;
}

.landing-choice-arrow {
    color: #bbb;
    flex-shrink: 0;
}

.landing-benefits li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: #333;
    margin-bottom: 0.35rem;
}

.landing-benefits i {
    color: #2e7d32;
    font-size: 1rem;
}

.landing-btn-cta {
    background: #e85d2c;
    color: #fff;
    border: none;
    border-radius: 0.85rem;
    font-weight: 700;
    min-height: 3rem;
    font-size: 1rem;
}

.landing-btn-cta:hover:not(:disabled),
.landing-btn-cta:focus {
    background: #d35400;
    color: #fff;
}

.landing-switch-link {
    color: #8b2942;
    font-weight: 700;
    text-decoration: none;
}

.landing-switch-link:hover {
    color: #6d1f34;
}

.landing-legal {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.5;
}

.landing-legal a {
    color: #8b2942;
    font-weight: 600;
    text-decoration: none;
}

.landing-switch {
    font-size: 0.92rem;
    color: #555;
}

.landing-logo {
    font-size: 2.5rem;
    line-height: 1;
}

.landing-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #333;
}

.landing-input {
    border-radius: 0.75rem;
    border-color: #ddd;
    min-height: 3rem;
}

.landing-footer {
    font-size: 0.82rem;
    color: #777;
}

.landing-footer a {
    color: #666;
    text-decoration: none;
}

.landing-footer a:hover {
    color: #111;
}

/* Mobile: Scalio-style fixed bottom sheet */
@media (max-width: 767.98px) {
    html {
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: auto;
    }

    body.landing-page {
        min-height: calc(100dvh + 1px);
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    .landing-hero {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 58vh;
        min-height: 340px;
        overflow: hidden;
        transition: height 0.2s ease, min-height 0.2s ease;
    }

    .landing-hero-content {
        justify-content: flex-start;
        align-items: flex-start;
        padding: max(0.85rem, env(safe-area-inset-top, 0px)) 5rem 0 1rem;
    }

    .landing-hero-lang {
        top: max(0.85rem, env(safe-area-inset-top, 0px));
        right: 0.85rem;
    }

    .landing-lang-btn {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.25);
        color: #fff;
        backdrop-filter: blur(8px);
    }

    .landing-lang-btn::after {
        filter: brightness(10);
    }

    .landing-collage {
        position: absolute;
        inset: 0;
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 56px;
        gap: 0.4rem;
        padding: 0.4rem;
        overflow: hidden;
    }

    .landing-shell {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: 58vh;
        pointer-events: none;
        z-index: 3;
    }

    .landing-sheet {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        height: auto;
        max-height: none;
        min-height: 0;
        pointer-events: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        overflow: hidden;
    }

    .landing-card {
        flex: 1 1 auto;
        max-width: none;
        max-height: 100%;
        min-height: 0;
        margin: 0;
        border-radius: 1.5rem 1.5rem 0 0;
        padding: 1.25rem 1.15rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    .landing-card-nav {
        display: block;
        margin: -0.25rem 0 0.75rem;
    }

    .landing-card-nav .landing-back-btn {
        background: #f5f5f5;
        border: 1px solid #e5e5e5;
        color: #333;
        border-radius: 999px;
        font-weight: 600;
    }

    .landing-card-nav .landing-back-btn.d-none {
        display: none !important;
        margin: 0;
    }

    .landing-card-nav .landing-back-btn.d-none + .landing-step-title,
    .landing-card-nav:has(.landing-back-btn.d-none) {
        margin-bottom: 0;
    }

    .landing-step-compact .landing-step-subtitle {
        margin-bottom: 0.9rem;
    }

    .landing-step-compact .landing-choice-card:last-of-type {
        margin-bottom: 0.35rem;
    }

    .landing-card:has(.landing-step-compact.active) .landing-footer {
        margin-top: 0.75rem !important;
        padding-bottom: 0.15rem;
    }

    .landing-brand {
        display: none;
    }

    .landing-step-title {
        font-size: 1.35rem;
    }

    /* Home choice: card hugs content; hero stays prominent */
    body[data-landing-view="choice"] .landing-hero {
        height: 54vh;
        min-height: 300px;
    }

    body[data-landing-view="choice"] .landing-shell {
        top: auto;
        height: auto;
        bottom: 0;
        left: 0;
        right: 0;
    }

    body[data-landing-view="choice"] .landing-sheet {
        position: relative;
        justify-content: flex-end;
    }

    body[data-landing-view="choice"] .landing-card {
        flex: 0 0 auto;
        overflow-y: auto;
        max-height: calc(46dvh - env(safe-area-inset-bottom, 0px));
        padding: 1rem 1.15rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    }

    body[data-landing-view="choice"] .landing-hero-brand {
        display: block;
    }

    body[data-landing-view="choice"] .landing-footer {
        display: none;
    }

    body[data-landing-view="choice"] .landing-alerts {
        margin-bottom: 0.5rem !important;
    }

    body[data-landing-view="choice"] .landing-alerts .alert {
        font-size: 0.82rem;
        padding: 0.4rem 0.6rem;
        margin-bottom: 0.3rem !important;
    }

    body[data-landing-view="choice"] .landing-step-title {
        font-size: 1.25rem;
        margin-bottom: 0.2rem;
    }

    body[data-landing-view="choice"] .landing-step-compact .landing-step-subtitle {
        margin-bottom: 0.75rem;
    }

    body[data-landing-view="choice"] .landing-choice-card {
        padding: 0.9rem 1rem;
        margin-bottom: 0.6rem;
    }

    body[data-landing-view="choice"] .landing-step-compact .landing-choice-card:last-of-type {
        margin-bottom: 0;
    }

    /* Form steps: smaller hero, hide brand, tall scrollable sheet */
    body[data-landing-view="existing-join"] .landing-hero,
    body[data-landing-view="existing-login"] .landing-hero {
        height: 24vh;
        min-height: 150px;
    }

    body[data-landing-view="existing-join"] .landing-hero-brand,
    body[data-landing-view="existing-login"] .landing-hero-brand {
        display: none;
    }

    body[data-landing-view="existing-join"] .landing-shell,
    body[data-landing-view="existing-login"] .landing-shell {
        top: 24vh;
    }

    body[data-landing-view="existing-join"] .landing-sheet,
    body[data-landing-view="existing-login"] .landing-sheet {
        justify-content: stretch;
    }

    body[data-landing-view="existing-join"] .landing-card,
    body[data-landing-view="existing-login"] .landing-card {
        flex: 1 1 auto;
        min-height: 0;
        max-height: 100%;
        overflow-y: auto;
        overscroll-behavior-y: auto;
        padding-top: 1rem;
    }
}

/* Desktop: centered card over full collage */
@media (min-width: 768px) {
    .landing-page {
        min-height: 100vh;
    }

    .landing-hero {
        position: fixed;
        inset: 0;
    }

    .landing-collage {
        position: absolute;
        inset: 0;
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 120px;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .landing-hero-lang {
        top: 1.25rem;
        right: 1.25rem;
    }

    .landing-lang-btn {
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    .landing-card-nav {
        display: block;
        margin-bottom: 0.5rem;
    }

    .landing-card-nav .landing-back-btn {
        background: #f5f5f5;
        border: 1px solid #e5e5e5;
        color: #333;
        border-radius: 999px;
        font-weight: 600;
    }

    .landing-shell {
        position: relative;
        z-index: 2;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5rem 1.25rem 1.25rem;
        top: auto;
    }

    .landing-sheet {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .landing-card {
        backdrop-filter: blur(8px);
        background: rgba(255, 255, 255, 0.98);
        padding: 2rem 1.5rem 1.25rem;
    }

    .landing-hero-brand {
        max-width: 24rem;
    }

    .landing-hero-logo {
        font-size: 1.75rem;
    }

    .landing-hero-title {
        font-size: 1.2rem;
    }
}
