/* =========================================================
   LANDING / SIGN-IN  (login.html) - "Welcome to PALAKKAD"
   One sticky scroll stage: the campus hero, then a pull-back
   through a window into a dark room with four feature cards.
   Fonts: Outfit (the big word), Pinyon Script, Poppins.
   Every UI size is  calc(<design px> * var(--s)), with floors.
   ========================================================= */

:root {
    --sky: #1d4fa6;
    --room: #151f3f;
    --ink: #2b2a52;
    --s: 1;
    --cs: var(--s);
    --ph: 1;
    --travel: 340vh;
}

html, body.vn {
    margin: 0;
    background: var(--room) !important;
    color: #ffffff;
}

body.vn {
    font-family: "DM Sans", system-ui, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.vn *, .vn *::before, .vn *::after { box-sizing: border-box; }
.vn a { color: inherit; text-decoration: none; }
.vn h2, .vn h3, .vn p { margin: 0; }
.vn svg { display: block; }

/* ---------- nav ---------- */
.vn-nav {
    position: fixed;
    inset: 0 0 auto 0;
    height: 0;
    z-index: 20;
    opacity: 0;
}

.vn-nav > * { position: absolute; }

.vn-logo {
    display: inline-flex;
    align-items: center;
    gap: calc(10px * var(--s));
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    font-size: max(13px, calc(17px * var(--s)));
    letter-spacing: 0.12em;
    white-space: nowrap;
}

.vn-logo img {
    width: max(24px, calc(32px * var(--s)));
    height: auto;
    background: #ffffff;
    border-radius: 50%;
    padding: calc(4px * var(--s));
}

.vn-pill {
    display: flex;
    gap: calc(4px * var(--s));
    padding: calc(5px * var(--s));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    white-space: nowrap;
}

.vn-pill a {
    font-size: max(11px, calc(15px * var(--s)));
    line-height: 1.1;
    padding: calc(10px * var(--s)) calc(20px * var(--s));
    border-radius: 999px;
    transition: background 0.25s ease;
}

.vn-pill a:hover { background: rgba(255, 255, 255, 0.14); }
.vn-pill a.is-active { background: #ffffff; color: var(--ink) !important; }

.vn-clock {
    display: inline-flex;
    align-items: center;
    gap: calc(8px * var(--s));
    font-size: max(11px, calc(15px * var(--s)));
    white-space: nowrap;
}

.vn-clock svg {
    width: max(16px, calc(22px * var(--s)));
    height: max(16px, calc(22px * var(--s)));
    fill: none;
    stroke: #fff;
    stroke-width: 1.3;
    stroke-linecap: round;
}

.vn-signup {
    border: 0;
    border-radius: 999px;
    background: #ffffff !important;
    color: var(--ink) !important;
    font: 500 max(11px, calc(15px * var(--s))) "DM Sans", sans-serif !important;
    padding: calc(12px * var(--s)) calc(21px * var(--s));
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
}

.vn-signup:hover { transform: scale(1.05); }

/* ---------- stage ---------- */
#story {
    position: relative;
    height: calc(100vh + var(--travel));
}

.vn-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: var(--sky);
}

@supports (height: 100svh) {
    .vn-stage { height: 100svh; }
}

.vn-stage > *,
.vn-scene > * {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.vn-scene { width: 100%; height: 100%; }

.vn-sky {
    background: linear-gradient(180deg, #080e26 0%, #0d1534 60%, #1a2558 100%);
}

/* the photo fades into the sky colour at its top edge, so the
   opening camera move never shows a seam */
#heroImg {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 16%);
}

.vn-plate {
    display: block;
    overflow: hidden;
    max-width: none;
    user-select: none;
}

.vn-head { width: 100%; pointer-events: none; }

#word {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    font-family: "Outfit", "DM Sans", sans-serif;
    font-weight: 330;
    line-height: 1;
    letter-spacing: 0;
    color: #ffffff;
    white-space: nowrap;
    transform-origin: 0 0;
    text-shadow: 0 6px 40px rgba(10, 30, 80, 0.25);
}

.vn-script {
    font-family: "Pinyon Script", cursive;
    font-weight: 400;
    color: #ffffff;
    white-space: nowrap;
    line-height: 1;
    pointer-events: none;
    text-shadow: 0 4px 24px rgba(10, 30, 80, 0.35);
}

.vn-shade {
    width: 100%;
    height: 100%;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(8, 25, 70, 0.45) 0%, rgba(8, 25, 70, 0) 24%),
        linear-gradient(0deg, rgba(10, 18, 45, 0.35) 0%, rgba(10, 18, 45, 0) 30%);
}

.vn-room {
    width: 100%;
    height: 100%;
    pointer-events: none;
    visibility: hidden;
}

/* ---------- copy ---------- */
.vn-build {
    display: flex;
    align-items: center;
    gap: calc(28px * var(--s));
    opacity: 0;
}

.vn-thumb {
    position: relative;
    width: calc(121px * var(--s));
    height: calc(95px * var(--s));
    min-width: 64px;
    min-height: 50px;
    border: 0;
    padding: 0;
    border-radius: calc(14px * var(--s));
    background: linear-gradient(150deg, #22306b 0%, #5b4f9a 55%, #e7a3b9 100%) !important;
    box-shadow: 0 calc(6px * var(--s)) calc(18px * var(--s)) rgba(10, 20, 70, 0.35) !important;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}

.vn-thumb:hover { transform: scale(1.05); }

.vn-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(30px * var(--s));
    height: calc(34px * var(--s));
    min-width: 16px;
    min-height: 18px;
    transform: translate(-40%, -50%);
    background: #ffffff;
    clip-path: polygon(10% 4%, 96% 50%, 10% 96%);
    border-radius: 3px;
}

.vn-build-text {
    font-family: "DM Sans", sans-serif;
    font-weight: 300;
    font-size: max(18px, calc(36px * var(--s)));
    line-height: 1.06;
}

.vn-para {
    font-family: "DM Sans", sans-serif;
    font-weight: 300;
    font-size: max(11px, calc(13.4px * var(--s)));
    line-height: 1.45;
    opacity: 0;
    text-align: left;
}

.vn-para span { display: block; white-space: nowrap; }

/* ---------- cards ---------- */
.vn-card {
    width: calc(266px * var(--cs));
    background: #ffffff;
    color: #24233a;
    border-radius: calc(24px * var(--cs));
    padding: calc(12px * var(--cs)) calc(12px * var(--cs)) calc(18px * var(--cs));
    box-shadow: 0 calc(14px * var(--cs)) calc(40px * var(--cs)) rgba(8, 10, 40, 0.35);
    visibility: hidden;
}

.vn-card-photo {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    height: calc(150px * var(--cs) * var(--ph));
    border-radius: calc(18px * var(--cs));
}

/* vector tiles instead of photos: one dusk gradient per feature */
.vn-card-photo svg {
    width: calc(56px * var(--cs) * max(var(--ph), 0.7));
    height: auto;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 6px 14px rgba(10, 12, 50, 0.35));
}

.vn-card-photo::after {
    content: "";
    position: absolute;
    inset: auto -10% -45% -10%;
    height: 80%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.vn-art-rooms     { background: linear-gradient(160deg, #2d3192 0%, #6f73d8 100%); }
.vn-art-mess      { background: linear-gradient(160deg, #5b4f9a 0%, #e7a3b9 100%); }
.vn-art-transport { background: linear-gradient(160deg, #22306b 0%, #4c8fc9 100%); }
.vn-art-requests  { background: linear-gradient(160deg, #343a74 0%, #c98fb8 100%); }

.vn-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: calc(8px * var(--cs));
    padding: calc(9px * var(--cs)) calc(6px * var(--cs)) 0;
}

.vn-card h3 {
    font: 500 max(12px, calc(14px * var(--cs))) "DM Sans", sans-serif;
    color: #24233a;
    white-space: nowrap;
    letter-spacing: 0 !important;
}

.vn-card-row p {
    font-size: max(11px, calc(12.5px * var(--cs)));
    color: #a3a2b3;
    white-space: nowrap;
}

.vn-price {
    font: 400 max(12px, calc(16px * var(--cs))) "DM Sans", sans-serif;
    color: #8e8da0;
    padding-left: calc(12px * var(--cs));
    border-left: 1px solid #e6e5ee;
    line-height: 2;
    white-space: nowrap;
}

.vn-specs {
    display: flex;
    gap: max(7px, calc(18px * var(--cs)));
    list-style: none;
    margin: 0;
    padding: calc(10px * var(--cs)) calc(6px * var(--cs)) 0;
    font-size: max(11px, calc(12px * var(--cs)));
    color: #55546a;
}

.vn-specs { overflow: hidden; }

.vn-specs li {
    display: inline-flex;
    align-items: center;
    gap: calc(6px * var(--cs));
    white-space: nowrap;
}

.vn-specs svg {
    width: max(13px, calc(16px * var(--cs)));
    height: max(13px, calc(16px * var(--cs)));
    fill: none;
    stroke: #9c9bb0;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vn-card.compact .vn-card-row { flex-direction: column; align-items: flex-start; gap: 0; }
.vn-card.compact .vn-price { padding-left: 0; border-left: 0; line-height: 1.35; }

.vn-cta {
    visibility: hidden;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(10px);
    color: #ffffff !important;
    font: 400 max(12px, calc(15px * var(--s))) "DM Sans", sans-serif !important;
    padding: calc(12px * var(--s)) calc(22px * var(--s));
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.25s ease;
}

.vn-cta:hover { background: #ffffff !important; color: var(--ink) !important; }

/* ---------- sign-in modal ---------- */
.vn-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(10, 16, 40, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.vn-modal.open { opacity: 1; }
.vn-modal[hidden] { display: none; }

.vn-modal-panel {
    position: relative;
    width: min(420px, 100%);
    background: #ffffff;
    color: #24233a;
    border-radius: 28px;
    padding: 30px 28px 26px;
    box-shadow: 0 40px 100px rgba(5, 10, 40, 0.45);
    transform: translateY(24px) scale(0.98);
    transition: transform 0.5s cubic-bezier(.22,1,.36,1);
    font-family: "DM Sans", sans-serif;
}

.vn-modal.open .vn-modal-panel { transform: none; }

.vn-close {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f1f0f6 !important;
    color: #55546a;
    cursor: pointer;
}

.vn-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.vn-modal-mark { display: block; width: 44px; height: 44px; }
.vn-modal-script { margin-top: 10px !important; font-family: "Pinyon Script", cursive; font-size: 30px; color: #6372c8; line-height: 1; }
.vn-modal-title { margin-top: 2px !important; font: 500 32px "DM Sans", sans-serif; letter-spacing: -0.02em !important; color: #24233a; }
.vn-modal-sub { margin-top: 4px !important; font-size: 13px; color: #8e8da0; }

.vn .login-form { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.vn-field { display: flex; flex-direction: column; gap: 6px; }
.vn-field > span { font-size: 12px; font-weight: 500; color: #55546a; }
.vn-field-row { display: flex; justify-content: space-between; align-items: center; }
.vn-field input { width: 100%; padding: 12px 14px !important; font-family: "DM Sans", sans-serif !important; }
.vn .lp-plain { background: none !important; border: 0; color: #6372c8 !important; font-size: 12px; font-weight: 500; cursor: pointer; padding: 0; }
.vn-form-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: #8e8da0; }
.vn-check { display: inline-flex; align-items: center; gap: 6px; color: #55546a; cursor: pointer; }
.vn-submit {
    margin-top: 4px;
    width: 100%;
    padding: 14px !important;
    border-radius: 999px !important;
    background: var(--ink) !important;
    font: 500 15px "DM Sans", sans-serif !important;
    cursor: pointer;
}
.vn .login-message { min-height: 1.2em; font-size: 13px; color: #b42318; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .vn-modal, .vn-modal-panel, .vn-thumb, .vn-signup { transition: none; }
}


/* sign-in window: forgot password + first login */
.vn-link {
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: #3c3f9e !important;
    font: 600 13.5px "DM Sans", sans-serif !important;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.vn-back { display: block; margin: 14px auto 0; }
.vn-help { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: #4d5075; text-align: left; }
.vn-field em { font-style: normal; font-weight: 400; color: #6a6c93; }
.login-message.is-ok { color: #067647 !important; }

/* sign-in modal scrolls on short screens (forgot-password form is tall) */
.vn-modal { overflow-y: auto; overscroll-behavior: contain; }
.vn-modal-panel { margin: auto; }
@media (max-height: 820px) {
    .vn-modal { place-items: start center; }
    .vn-modal-panel { padding-top: 24px; padding-bottom: 20px; }
    .vn-modal-mark { width: 36px; height: 36px; }
}
