:root {
    --bg: #0b0d10;
    --panel: #12161c;
    --panel2: #0f1318;
    --text: #e8eef6;
    --muted: #a7b2c2;
    --line: #243041;
    --btn: #2c7be5;
    --radius: 18px;
    --shadow: 0 20px 40px rgba(0, 0, 0, .35);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial;
    background: radial-gradient(1400px 900px at 20% 0%, #122033 0%, var(--bg) 60%);
    color: var(--text);
}

a {
    color: inherit;
}

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

.wrap {
    width: 100%;
    padding: 0 22px;
}

@media(max-width:720px) {
    .wrap {
        padding: 0 14px;
    }
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 12, 15, .6);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.logo {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #2c7be5, #7b61ff);
    overflow: hidden;
}

.brand h1 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: .2px;
}

.brand p {
    margin: 2px 0 0 0;
    color: var(--muted);
    font-size: 13px;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--btn);
    color: #fff;
    font-weight: 400;
    font-size: .92rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn-ghost {
    background: #1d2632;
    border: 1px solid var(--line);
    color: var(--text);
}

.mini-field {
    display: grid;
    gap: 6px;
    align-content: start;
}

.mini-field span {
    font-size: 11px;
    color: var(--muted);
}

.mini-field select {
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(15, 19, 24, .8);
    color: var(--text);
    outline: none;
}

.hero {
    padding: 26px 0 18px 0;
}

.hero-shell {
    border-radius: calc(var(--radius) + 8px);
    border: 1px solid rgba(255, 255, 255, .10);
    background: radial-gradient(900px 380px at 20% 10%, rgba(44, 123, 229, .35), transparent 60%), radial-gradient(800px 380px at 80% 20%, rgba(123, 97, 255, .28), transparent 60%), rgba(18, 22, 28, .50);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
    padding: 22px;
    align-items: stretch;
}

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

.kicker {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(0, 0, 0, .20);
    color: var(--muted);
    font-size: 12px;
    width: max-content;
}

.hero h2 {
    margin: 12px 0 8px 0;
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    line-height: 1.15;
}

.lede {
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.55;
    margin: 0 0 14px 0;
    max-width: 62ch;
}

.cta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.hero-panel {
    border-left: 1px solid rgba(255, 255, 255, .08);
    padding-left: 18px;
}

@media(max-width:980px) {
    .hero-panel {
        border-left: none;
        padding-left: 0;
    }
}

.statgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.stat {
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(15, 19, 24, .55);
    border-radius: 16px;
    padding: 12px;
}

.stat strong {
    display: block;
    font-size: 1.25rem;
}

.stat span {
    color: var(--muted);
    font-size: 12px;
}

.section {
    padding: 18px 0;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.section h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
}

.section p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.card {
    background: rgba(18, 22, 28, .55);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
}

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

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

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

.badge {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(0, 0, 0, .20);
    color: var(--muted);
    font-size: 12px;
}

.map-wrap {
    margin-top: 14px;
    border-radius: calc(var(--radius) + 6px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(15, 19, 24, .55);
    box-shadow: var(--shadow);
}

#demoFrame {
    width: 100%;
    height: 520px;
    border: 0;
    display: block;
}

@media(max-width:720px) {
    #demoFrame {
        height: 420px;
    }
}

.demo-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px 0 12px;
}

.demo-toolbar .btn {
    white-space: nowrap;
}

.demo-toolbar .small {
    margin: 0;
}

.map-wrap {
    padding-bottom: 12px;
}

#demoFrame {
    border-radius: calc(var(--radius) + 6px);
}

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

@media(max-width:1100px) {
    .vimeo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.video {
    border-radius: calc(var(--radius) + 6px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(15, 19, 24, .55);
    box-shadow: var(--shadow);
}

.video figure {
    margin: 0;
}

.video figcaption {
    padding: 10px 12px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.ratio {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #0a0d12;
}

.ratio iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.footer-links {
    padding: 18px 0 30px 0;
}

.footer-links a {
    color: var(--text);
}

.small {
    font-size: 12px;
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.cookie-banner {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 3000;
}

.cookie-inner {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(10, 12, 15, .88);
    backdrop-filter: blur(10px);
}

.cookie-inner p {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.3;
}

.cookie-inner a {
    color: var(--text);
}

.card h4 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
}


/* --- Layout helpers --- */

main.wrap {
    min-height: calc(100vh - 86px);
    padding-bottom: 24px;
}

.footer-links {
    margin-top: 14px;
    padding: 18px 0 40px 0;
}

.footer-links .footer-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(10, 12, 15, .55);
}

.footer-links nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.footer-links nav a {
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.footer-links nav a:hover {
    border-bottom-color: rgba(255, 255, 255, .45);
}


/* --- Mobile topbar improvements --- */

@media (max-width: 860px) {
    .topbar {
        align-items: flex-start;
    }
    .brand {
        flex: 1 1 auto;
    }
    .actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
    }
    .actions>* {
        flex: 0 0 auto;
    }
    .btn {
        padding: 10px 12px;
    }
    .mini-field {
        min-width: 140px;
    }
}

@media (max-width: 560px) {
    .topbar {
        padding: 14px;
    }
    .brand h1 {
        font-size: 1.1rem;
    }
    .actions {
        gap: 8px;
    }
    .btn {
        padding: 9px 10px;
        border-radius: 14px;
        font-size: .9rem;
    }
    .actions .btn {
        white-space: nowrap;
    }
    .mini-field {
        width: 100%;
    }
    .mini-field select {
        width: 100%;
    }
}


/* --- Optional hero photo banner --- */

.hero-shell {
    background-image: linear-gradient(180deg, rgba(10, 12, 15, .20), rgba(10, 12, 15, .70)), radial-gradient(900px 380px at 20% 10%, rgba(44, 123, 229, .30), transparent 60%), radial-gradient(800px 380px at 80% 20%, rgba(123, 97, 255, .24), transparent 60%), url('/assets/images/taletrailr.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.footer-note {
    margin: 0;
}


/* --- Organization page --- */

.bullets {
    margin: 12px 0 0 18px;
    padding: 0;
}

.bullets li {
    margin: 6px 0;
    color: var(--muted);
}

.fieldset {
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 16px;
    padding: 12px;
    margin: 0;
}

.fieldset legend {
    padding: 0 6px;
    color: var(--text);
    font-weight: 700;
}

.check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--muted);
    font-size: 14px;
}

.check input {
    margin-top: 4px;
    accent-color: rgba(44, 123, 229, .95);
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

#orgFormMsg.error {
    color: #ffb4b4;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.steps {
    margin: 0;
    padding-left: 18px;
}

.steps li {
    margin: 10px 0;
}

.hero--compact {
    padding-bottom: 8px;
}

.bullets {
    list-style: disc;
}


/* --- Forms (site) --- */

.field {
    display: grid;
    gap: 8px;
    align-content: start;
    margin: 0;
}

.field>span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(15, 19, 24, .85);
    color: var(--text);
    outline: none;
}

textarea.input {
    resize: vertical;
    min-height: 120px;
}

select.input {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(232, 238, 246, .8) 50%), linear-gradient(135deg, rgba(232, 238, 246, .8) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.input:focus {
    border-color: rgba(44, 123, 229, .8);
    box-shadow: 0 0 0 3px rgba(44, 123, 229, .18);
}

.inline-2-1 {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 12px;
    align-items: end;
}

@media (max-width: 860px) {
    .inline-2-1 {
        grid-template-columns: 1fr;
    }
}

.check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.check span {
    color: var(--muted);
    font-size: 13px;
}

.form-actions {
    margin-top: 10px;
}

.form-msg {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .18);
    color: var(--text);
}

.form-msg.error {
    border-color: rgba(255, 80, 80, .40);
    background: rgba(255, 80, 80, .08);
}

.success-card {
    padding: 18px;
}

.success-title {
    margin: 0 0 6px 0;
    font-size: 22px;
}

.success-text {
    font-size: 15px;
    margin: 0 0 14px 0;
}

.success-panel {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(44, 123, 229, .35);
    background: linear-gradient(180deg, rgba(44, 123, 229, .14), rgba(10, 12, 15, .55));
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

.success-panel h2 {
    margin: 0 0 8px 0;
    font-size: 1.35rem;
}

.success-panel code {
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(0, 0, 0, .25);
}


/* --- Org form improvements --- */

.stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.form-alert {
    margin: 14px 0 0 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(0, 0, 0, .22);
    font-size: 15px;
}

.form-alert.error {
    border-color: rgba(255, 80, 80, .35);
    background: rgba(255, 80, 80, .08);
}

.form-alert.success {
    border-color: rgba(44, 123, 229, .35);
    background: rgba(44, 123, 229, .10);
}

.error {
    display: block;
    min-height: 18px;
    margin-top: 6px;
    font-size: 13px;
    color: rgba(255, 120, 120, .95);
}

.is-invalid {
    border-color: rgba(255, 120, 120, .65) !important;
    box-shadow: 0 0 0 3px rgba(255, 120, 120, .15) !important;
}

.success-panel .lead {
    font-size: 1.05rem;
    line-height: 1.45;
    color: var(--text);
    margin: 10px 0 10px 0;
}


/* Demo iframe (portal) */

.demo-iframe {
    width: 100%;
    height: 650px;
    border: 0;
    display: block;
    border-radius: calc(var(--radius) + 6px);
    background: #0a0d12;
}

@media (max-width: 720px) {
    .demo-iframe {
        height: 520px;
    }
}

.demo-actions {
    margin: 12px 0 0 0;
}