/* Destination42 - main stylesheet (no build step needed) */

:root {
    --space: #070b1d;
    --space-2: #0e1533;
    --glass: rgba(10, 16, 40, 0.72);
    --glass-edge: rgba(140, 170, 255, 0.22);
    --text: #eef2ff;
    --muted: #a5b0d6;
    --cyan: #3de0ff;
    --violet: #8b5cff;
    --pink: #ff4fd8;
    --hyper: linear-gradient(135deg, var(--cyan), var(--violet) 55%, var(--pink));
    --radius: 16px;
    --topbar-h: 60px;
    --adband-h: 90px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    background: var(--space);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

body {
    display: grid;
    grid-template-rows: var(--topbar-h) 1fr auto;
    height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(139, 92, 255, .18), transparent 60%),
        radial-gradient(900px 500px at 0% 110%, rgba(61, 224, 255, .12), transparent 60%),
        var(--space);
}

a { color: var(--cyan); }
code, .mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); font-size: .9rem; }

/* ---------- Top bar ---------- */
.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    background: rgba(7, 11, 29, .92);
    border-bottom: 1px solid var(--glass-edge);
    z-index: 20;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--text); text-decoration: none;
    font-weight: 700; font-size: 1.15rem; letter-spacing: .02em;
    white-space: nowrap;
}
.brand b {
    background: var(--hyper);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.modes {
    display: flex; gap: 4px;
    margin: 0 auto;
    padding: 4px;
    background: var(--space-2);
    border: 1px solid var(--glass-edge);
    border-radius: 999px;
}
.mode {
    display: inline-flex; align-items: center; gap: 6px;
    border: 0; border-radius: 999px;
    padding: 7px 14px;
    background: transparent; color: var(--muted);
    font: 600 .88rem var(--font);
    cursor: pointer;
}
.mode svg { width: 13px; height: 13px; fill: currentColor; opacity: .8; }
.mode.is-active { background: var(--hyper); color: #0a0f24; }
.mode.is-locked:hover { color: var(--text); }
.account { display: flex; gap: 8px; align-items: center; }
.btn-ghost {
    display: inline-block;
    border: 1px solid var(--glass-edge); border-radius: 999px;
    padding: 7px 14px;
    background: transparent; color: var(--text);
    font: 600 .88rem var(--font); text-decoration: none;
    cursor: pointer;
}
.btn-ghost:hover { border-color: var(--cyan); }

/* ---------- Stage ---------- */
.stage { position: relative; min-height: 0; }
.viewport, #pano, .pano-placeholder {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
}
.pano-placeholder {
    display: grid; place-items: center; text-align: center;
    padding: 24px;
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 80px),
        repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 80px),
        linear-gradient(180deg, #1b2a5a, #0b1230 60%, #1e2a18);
    color: var(--muted);
}
.pano-placeholder .big { font-size: 1.6rem; color: var(--text); margin: 0 0 8px; }

/* ---------- Floating controls ---------- */
.controls {
    position: absolute; left: 50%; bottom: 22px;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    z-index: 10;
    pointer-events: none;
}
.controls > * { pointer-events: auto; }

.hyperjump {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 210px; height: 64px; padding: 0 30px;
    border-radius: 999px;
    background: var(--hyper);
    color: #0a0f24; text-decoration: none;
    font: 800 1.25rem var(--font); letter-spacing: .06em; text-transform: uppercase;
    box-shadow: 0 10px 40px rgba(139, 92, 255, .55), inset 0 0 0 2px rgba(255,255,255,.35);
    transition: transform .15s ease, box-shadow .15s ease;
}
.hyperjump:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 14px 50px rgba(255, 79, 216, .6), inset 0 0 0 2px rgba(255,255,255,.5); }
.hyperjump:active { transform: scale(.97); }
.hyperjump:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.hj-ring {
    position: absolute; inset: -6px;
    border-radius: inherit;
    border: 2px solid rgba(61, 224, 255, .6);
    animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: .9; }
    100% { transform: scale(1.25); opacity: 0; }
}
.hyperjump.small { min-width: 180px; height: 52px; font-size: 1.05rem; margin-top: 12px; }

.mini-actions { display: flex; gap: 8px; }
.chip {
    white-space: nowrap;
    border: 1px solid var(--glass-edge); border-radius: 999px;
    padding: 8px 14px;
    background: var(--glass); color: var(--text);
    font: 600 .85rem var(--font);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}
.chip:hover, .chip[aria-expanded="true"] { border-color: var(--cyan); }

/* ---------- Info card ---------- */
.infocard {
    position: absolute; top: 16px; right: 16px;
    width: min(300px, calc(100% - 32px));
    padding: 18px 20px;
    border: 1px solid var(--glass-edge); border-radius: var(--radius);
    background: var(--glass);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    z-index: 11;
    animation: reveal .35s ease;
}
@keyframes reveal { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.infocard .flag { font-size: 2.4rem; margin: 0; line-height: 1; }
.infocard h1 { margin: 8px 0 2px; font-size: 1.4rem; }
.infocard .continent { margin: 0 0 12px; color: var(--muted); }
.infocard dl { margin: 0 0 12px; display: grid; gap: 6px; }
.infocard dl div { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; }
.infocard dt { color: var(--muted); }
.infocard dd { margin: 0; }
.maplink { font-size: .88rem; font-weight: 600; text-decoration: none; }

/* ---------- Simple pages ---------- */
.panel {
    position: absolute; inset: 0;
    overflow-y: auto;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding: 32px 16px;
}
.panel .flag { font-size: 3.2rem; margin: 0; }
.panel h1 { margin: 12px 0 8px; }
.panel p { color: var(--muted); max-width: 520px; margin: 4px 0; }
.prose { justify-content: flex-start; text-align: left; align-items: stretch; max-width: 680px; margin: 0 auto; position: relative; }
.prose p, .prose li { color: var(--text); max-width: none; line-height: 1.6; }
.prose h2 { margin: 24px 0 4px; font-size: 1.1rem; }
.prose .hyperjump { align-self: center; }

/* ---------- Ad band ---------- */
.adband {
    position: relative;
    height: var(--adband-h);
    border-top: 1px solid var(--glass-edge);
    background: #050816;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    z-index: 20;
}
.ad-label {
    position: absolute; top: 3px; left: 8px;
    font-size: .62rem; letter-spacing: .08em; text-transform: uppercase;
    color: #6e7aa6;
}
.ad-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: min(728px, calc(100% - 32px)); height: calc(100% - 22px);
    border: 1px dashed #2c3766; border-radius: 8px;
    color: #7f8bb8; font-size: .9rem;
}
.ad-placeholder small { font-size: .72rem; opacity: .7; }

/* ---------- Toast ---------- */
#toast {
    position: fixed; left: 50%; top: calc(var(--topbar-h) + 14px);
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border-radius: 12px;
    background: #111a40; border: 1px solid var(--violet);
    color: var(--text); font-size: .92rem; text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
    z-index: 60;
}

/* ---------- Warp effect ---------- */
#warp {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
    z-index: 50;
}
body.warping #warp, body.arriving #warp { opacity: 1; }
body.arrived #warp { opacity: 0; transition: opacity .7s ease; }
#warp-text {
    position: fixed; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    font: 700 1.1rem var(--font); letter-spacing: .12em; text-transform: uppercase;
    color: #fff; text-shadow: 0 0 20px var(--violet);
    opacity: 0; pointer-events: none;
    z-index: 51;
    text-align: center; width: calc(100% - 32px);
}
body.warping #warp-text { opacity: 1; transition: opacity .3s ease .2s; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
    :root { --topbar-h: 104px; --adband-h: 60px; }
    .topbar { flex-wrap: wrap; justify-content: space-between; padding: 8px 16px; row-gap: 8px; }
    .modes { order: 3; width: 100%; margin: 0; justify-content: space-between; }
    .mode { flex: 1; justify-content: center; padding: 7px 8px; }
    .hyperjump { min-width: 180px; height: 56px; font-size: 1.05rem; }
    .controls { bottom: 16px; }
    .infocard { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .hj-ring { animation: none; }
    #warp { display: none; }
}

.link-quiet { color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 600; }
.link-quiet:hover { color: var(--text); }

/* ---------- Footer ---------- */
/* One slim line, twice the link font size (.88rem): links on the left, copyright on the right. */
.site-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    box-sizing: border-box; height: 1.76rem; padding: 0 16px; white-space: nowrap;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { font: 600 .88rem var(--font); color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--cyan); }
.site-footer p { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 400 .8rem var(--font); color: var(--muted); }
@media (max-width: 400px) { .footer-links { gap: 10px; } .site-footer { gap: 8px; padding: 0 10px; } }

/* ---------- Accounts & jump-mode menu ---------- */
a.btn-ghost { display: inline-block; text-decoration: none; }
.inline-form { display: inline; margin: 0; }
.account-email {
    font: 400 .8rem var(--font); color: var(--muted);
    max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 720px) { .account-email { display: none; } }

.auth { max-width: 460px; margin-left: auto; margin-right: auto; }
.auth .stack { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.auth label { font: 600 .88rem var(--font); }
.auth input[type="email"], .auth input[type="text"] {
    width: 100%; padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--glass-edge); background: rgba(255, 255, 255, .06);
    color: var(--text); font: 400 1rem var(--font);
}
.auth input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
#code { letter-spacing: .5em; text-align: center; font: 600 1.4rem var(--mono); }
.btn-solid {
    padding: 12px 18px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--hyper); color: #070b1d; font: 700 1rem var(--font);
}
.btn-solid:hover { filter: brightness(1.1); }
.form-error { color: var(--pink); font-weight: 600; }

.mode-menu {
    position: fixed; z-index: 50; min-width: 200px; max-height: 60vh; overflow-y: auto;
    padding: 6px; border-radius: 14px;
    background: var(--glass); border: 1px solid var(--glass-edge);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.mode-menu button {
    display: block; width: 100%; text-align: left; border: 0; background: transparent;
    color: var(--text); padding: 9px 12px; border-radius: 10px; cursor: pointer;
    font: 600 .88rem var(--font);
}
.mode-menu button:hover, .mode-menu button:focus-visible { background: rgba(140, 170, 255, .18); outline: none; }

/* ---------- Text pages scroll normally (About, Privacy, Contact, sign-in) ---------- */
/* The default layout locks the body to the viewport for the full-screen Street View page. */
body.view-about, body.view-privacy, body.view-contact, body.view-signin, body.view-verify {
    height: auto; min-height: 100dvh; overflow-y: auto;
}
body.view-about .topbar, body.view-privacy .topbar, body.view-contact .topbar,
body.view-signin .topbar, body.view-verify .topbar { position: sticky; top: 0; }
