/*
 * MangoBus marketing site — Night Line identity, shared with the admin console.
 * Indigo ink, a mango signal colour, Tektur for display type, Sofia Sans for text.
 * The route line (a track with stops) is the recurring structural motif.
 */

:root {
    --ink: #17143A;
    --night: #100E2B;
    --night-2: #1A1745;
    --indigo: #5B4BF5;
    --indigo-dark: #4737DC;
    --indigo-soft: #EEECFF;
    --mango: #FFA62B;
    --blush: #FF6B4A;
    --signal: linear-gradient(135deg, var(--mango), var(--blush));
    --canvas: #F4F3FA;
    --paper: #FFFFFF;
    --line: #E3E1F0;
    --line-dark: rgba(196, 190, 255, 0.14);
    --muted: #625F86;
    --muted-dark: #A9A6D2;
    --body: #2C2957;
    --green: #14A870;
    --display: "Tektur", "Sofia Sans", system-ui, sans-serif;
    --text: "Sofia Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --shadow: 0 1px 0 rgba(23, 20, 58, 0.04), 0 24px 60px -32px rgba(23, 20, 58, 0.45);

    /* Names the older page markup still references inline. */
    --leaf: var(--indigo);
    --slate-500: var(--muted);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--text);
    font-size: 17px;
    line-height: 1.6;
    color: var(--body);
    background: var(--canvas);
    overflow-x: hidden;
    font-feature-settings: "tnum" 1;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

img,
svg {
    display: block;
}

::selection {
    background: var(--mango);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: 3px;
    border-radius: 6px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.container {
    width: min(1200px, calc(100% - 40px));
    margin-inline: auto;
}

h1,
h2,
h3 {
    font-family: var(--display);
    color: var(--ink);
    font-weight: 600;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.4rem);
    line-height: 1.04;
    letter-spacing: -0.012em;
    max-width: 15ch;
}

/* Headlines in older pages wrap their second phrase; it simply starts a new line. */
h1 em,
h1 span {
    display: block;
    font-style: normal;
    color: inherit;
}

h2 {
    font-size: clamp(2rem, 3.6vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.008em;
}

h3 {
    font-size: 1.15rem;
    line-height: 1.25;
}

.lead {
    margin-top: 22px;
    max-width: 56ch;
    font-size: 1.16rem;
    color: var(--muted);
}

/* ------------------------------------------------------------- header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--canvas) 82%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--line);
}

.nav-bar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.22rem;
    color: var(--ink);
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--signal);
    display: grid;
    place-items: center;
    box-shadow: 0 10px 22px -10px rgba(255, 107, 74, 0.9);
}

.brand-mark svg {
    width: 22px;
    height: 22px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.15s ease, background-color 0.15s ease;
}

.main-nav a:hover {
    color: var(--ink);
    background: rgba(91, 75, 245, 0.07);
}

.main-nav a.active {
    color: var(--ink);
    background: rgba(91, 75, 245, 0.1);
}

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

.mobile-menu {
    display: none;
    position: relative;
}

.mobile-menu summary {
    list-style: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.mobile-menu summary::-webkit-details-marker {
    display: none;
}

.mobile-panel {
    position: absolute;
    right: 0;
    top: 54px;
    width: 230px;
    padding: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.mobile-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
}

.mobile-panel a:hover {
    background: var(--indigo-soft);
}

/* ------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-mango {
    background: var(--signal);
    color: var(--ink);
    box-shadow: 0 12px 26px -14px rgba(255, 107, 74, 0.95);
}

.btn-mango:hover {
    box-shadow: 0 14px 30px -12px rgba(255, 107, 74, 1);
}

.btn-primary {
    background: var(--ink);
    color: #fff;
}

.btn-primary:hover {
    background: var(--night-2);
}

.btn-ghost {
    background: var(--paper);
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--indigo);
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* ----------------------------------------------------------- eyebrows */

/* A single stop on the line: names the section in plain sentence case. */
.eyebrow,
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--indigo);
}

.eyebrow::before,
.kicker::before {
    content: "";
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid var(--mango);
    background: var(--canvas);
    box-shadow: 0 0 0 4px rgba(255, 166, 43, 0.16);
}

/* ------------------------------------------------------------- sections */

section {
    padding: 104px 0;
}

.alt {
    background: var(--paper);
    border-block: 1px solid var(--line);
}

.section-head {
    max-width: 720px;
    margin: 0 0 56px;
}

.section-head h2,
.page-hero h1 {
    margin-top: 16px;
}

.section-head p {
    margin-top: 16px;
    max-width: 58ch;
    font-size: 1.08rem;
    color: var(--muted);
}

.section-head.centered {
    margin-inline: auto;
    text-align: center;
}

.section-head.centered p {
    margin-inline: auto;
}

/* Hero (home and inner pages that reuse it) */
.hero {
    position: relative;
    padding: 96px 0 88px;
    background:
        radial-gradient(720px 360px at 88% -40px, rgba(255, 166, 43, 0.20), transparent 70%),
        radial-gradient(640px 360px at 10% -80px, rgba(91, 75, 245, 0.14), transparent 70%),
        radial-gradient(circle at 1px 1px, rgba(23, 20, 58, 0.10) 1.2px, transparent 0) 0 0 / 22px 22px,
        var(--canvas);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 200px;
    background: linear-gradient(180deg, transparent, var(--canvas));
    pointer-events: none;
}

.hero > .container {
    position: relative;
    z-index: 1;
}

.hero[style*="padding-bottom"] h1,
.page-hero h1 {
    margin-inline: auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.02fr;
    align-items: center;
    gap: 64px;
}

.hero-grid h1 {
    margin-top: 20px;
    max-width: none;
    font-size: clamp(2.3rem, 4.1vw, 3.55rem);
}

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

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 36px;
    list-style: none;
    font-size: 0.95rem;
    color: var(--muted);
}

.hero-facts li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-facts svg {
    width: 18px;
    height: 18px;
    color: var(--green);
}

.page-hero {
    padding: 92px 0 48px;
    text-align: center;
    background:
        radial-gradient(620px 300px at 50% -80px, rgba(255, 166, 43, 0.18), transparent 70%),
        var(--canvas);
}

.page-hero .lead {
    margin-inline: auto;
}

/* --------------------------------------------- hero console (static preview) */

.console-preview {
    position: relative;
    display: grid;
    grid-template-columns: 172px 1fr;
    min-height: 430px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 50px 90px -50px rgba(23, 20, 58, 0.55), 0 1px 0 rgba(23, 20, 58, 0.04);
}

.cp-side {
    padding: 20px 14px;
    background:
        radial-gradient(160px 140px at 0% 100%, rgba(255, 138, 61, 0.22), transparent 70%),
        linear-gradient(180deg, #1C1848, var(--night));
    color: rgba(226, 223, 255, 0.74);
}

.cp-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--display);
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.cp-brand .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 9px;
}

.cp-brand .brand-mark svg {
    width: 16px;
    height: 16px;
}

.cp-nav {
    position: relative;
    margin-top: 24px;
    list-style: none;
    display: grid;
    gap: 4px;
    font-size: 0.84rem;
    font-weight: 500;
}

.cp-nav::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: rgba(196, 190, 255, 0.24);
}

.cp-nav li {
    position: relative;
    padding: 7px 8px 7px 24px;
    border-radius: 9px;
}

.cp-nav li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-radius: 50%;
    border: 2px solid rgba(196, 190, 255, 0.6);
    background: #18153F;
}

.cp-nav li.is-current {
    color: #fff;
    font-weight: 700;
    background: linear-gradient(90deg, rgba(255, 166, 43, 0.2), transparent);
}

.cp-nav li.is-current::before {
    border-color: transparent;
    background: var(--signal);
    box-shadow: 0 0 12px 3px rgba(255, 138, 61, 0.55);
}

.cp-main {
    padding: 20px 22px 22px;
    background:
        radial-gradient(circle at 1px 1px, rgba(23, 20, 58, 0.08) 1px, transparent 0) 0 0 / 18px 18px,
        var(--canvas);
    min-width: 0;
}

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

.cp-top b {
    font-family: var(--display);
    font-weight: 600;
    color: var(--ink);
    font-size: 1.05rem;
}

.cp-top span {
    font-family: var(--display);
    font-weight: 600;
    color: var(--ink);
}

.cp-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.cp-kpi {
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.cp-kpi b {
    display: block;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.45rem;
    line-height: 1.1;
    color: var(--ink);
}

.cp-kpi span {
    font-size: 0.8rem;
    color: var(--muted);
}

.cp-table {
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--paper);
    list-style: none;
}

.cp-row {
    display: grid;
    grid-template-columns: 1fr 86px auto;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.86rem;
}

.cp-row:last-child {
    border-bottom: 0;
}

.cp-row strong {
    display: block;
    color: var(--ink);
    font-weight: 700;
}

.cp-row small {
    color: var(--muted);
    font-size: 0.78rem;
}

.cp-bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.cp-bar i {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: var(--indigo);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.pill-board {
    background: #FFF0DC;
    color: #A0520A;
}

.pill-sale {
    background: var(--indigo-soft);
    color: var(--indigo-dark);
}

.pill-full {
    background: #E2F8EE;
    color: #0E8F5E;
}

/* -------------------------------------------------------- figures strip */

.figures {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-block: 1px solid var(--line);
}

.figure {
    padding: 30px 26px;
    border-left: 1px solid var(--line);
}

.figure:first-child {
    border-left: 0;
    padding-left: 0;
}

.figure strong {
    display: block;
    font-family: var(--display);
    font-weight: 600;
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--ink);
}

.figure span {
    color: var(--muted);
    font-size: 0.98rem;
}

/* ------------------------------------------------- night (dark) sections */

.night {
    position: relative;
    color: var(--muted-dark);
    background:
        radial-gradient(700px 380px at 85% 0%, rgba(108, 92, 250, 0.32), transparent 70%),
        radial-gradient(600px 340px at 0% 100%, rgba(255, 138, 61, 0.14), transparent 70%),
        var(--night);
}

.night h2,
.night h3 {
    color: #fff;
}

.night .section-head p {
    color: var(--muted-dark);
}

.night .eyebrow {
    color: #C9C3FF;
}

.night .eyebrow::before {
    background: var(--night);
}

/* ------------------------------------------------------------ features */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 48px;
}

.feature {
    padding: 30px 0 36px;
    border-top: 1px solid var(--line);
}

.feature .icon,
.card .icon {
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--indigo-soft);
    color: var(--indigo);
}

.feature .icon svg,
.card .icon svg {
    width: 22px;
    height: 22px;
}

.feature h3 {
    margin-bottom: 8px;
}

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

/* Cards used by inner pages */
.grid {
    display: grid;
    gap: 22px;
}

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

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    position: relative;
    padding: 28px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.card h3 {
    margin-bottom: 8px;
}

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

.number {
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--indigo);
}

/* ------------------------------------------- line steps (a real sequence) */

.line-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    list-style: none;
}

.line-steps::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 9px;
    right: 9px;
    height: 2px;
    background: linear-gradient(90deg, var(--mango), var(--indigo) 70%, var(--line));
}

.line-steps li {
    position: relative;
    padding-top: 40px;
}

.line-steps li::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid var(--indigo);
    background: var(--paper);
}

.line-steps li:first-child::before {
    border-color: transparent;
    background: var(--signal);
    box-shadow: 0 0 0 6px rgba(255, 166, 43, 0.18);
}

.line-steps span {
    font-family: var(--display);
    font-weight: 600;
    color: var(--indigo);
    font-size: 0.95rem;
}

.line-steps h3 {
    margin: 6px 0 8px;
    font-size: 1.3rem;
}

.line-steps p {
    color: var(--muted);
}

/* Vertical steps on the How it works page */
.steps {
    max-width: 760px;
    margin: auto;
    counter-reset: step;
}

.step {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 18px;
    padding: 0 0 34px;
}

.step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 23px;
    top: 50px;
    bottom: 4px;
    width: 2px;
    background: var(--line);
}

.step .num {
    counter-increment: step;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: var(--mango);
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.1rem;
}

.step .num:empty::before {
    content: counter(step);
}

.step h3 {
    margin: 10px 0 6px;
}

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

/* ------------------------------------------------------------- pricing */

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 36px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.price-card.featured {
    border-color: transparent;
    background:
        radial-gradient(360px 220px at 100% 0%, rgba(108, 92, 250, 0.42), transparent 70%),
        var(--night);
    color: var(--muted-dark);
    box-shadow: 0 40px 80px -40px rgba(16, 14, 43, 0.8);
}

.price-card.featured h3,
.price-card.featured .amount {
    color: #fff;
}

.price-card.featured li {
    color: #D9D6F7;
}

.tag {
    position: absolute;
    top: 22px;
    right: 22px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--signal);
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 700;
}

.amount {
    margin: 14px 0 6px;
    font-family: var(--display);
    font-size: 2.9rem;
    font-weight: 600;
    line-height: 1.05;
    color: var(--ink);
}

.amount small {
    font-family: var(--text);
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
}

.price-card.featured .amount small {
    color: var(--muted-dark);
}

.desc {
    color: var(--muted);
    margin-bottom: 20px;
}

.price-card.featured .desc {
    color: var(--muted-dark);
}

.price-card ul {
    flex: 1;
    margin-bottom: 30px;
    list-style: none;
}

.price-card li {
    position: relative;
    padding: 8px 0 8px 28px;
    color: var(--body);
}

.price-card li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 15px;
    width: 12px;
    height: 7px;
    border-left: 2px solid var(--green);
    border-bottom: 2px solid var(--green);
    transform: rotate(-45deg);
}

.price-card.featured li::before {
    border-color: var(--mango);
}

.price-card.featured .btn-primary {
    background: var(--signal);
    color: var(--ink);
}

/* ------------------------------------------------------------ CTA band */

.cta-band {
    position: relative;
    overflow: hidden;
    padding: 72px 64px;
    border-radius: 30px;
    color: var(--muted-dark);
    background:
        radial-gradient(520px 300px at 100% 0%, rgba(108, 92, 250, 0.45), transparent 70%),
        radial-gradient(420px 260px at 0% 100%, rgba(255, 138, 61, 0.22), transparent 70%),
        var(--night);
}

.cta-band h2 {
    color: #fff;
    max-width: 18ch;
}

.cta-band p {
    max-width: 52ch;
    margin: 16px 0 30px;
    font-size: 1.08rem;
}

.cta-band .eyebrow {
    color: #C9C3FF;
}

.cta-band .eyebrow::before {
    background: var(--night);
}

/* ---------------------------------------------- legal, FAQ, tutorials */

.legal {
    max-width: 780px;
    margin: auto;
}

.legal h2 {
    font-size: 1.4rem;
    margin: 36px 0 10px;
}

.legal p,
.legal li {
    color: var(--muted);
}

.legal ul {
    margin: 10px 0;
    padding-left: 22px;
}

.updated {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--indigo-soft);
    color: var(--indigo-dark);
    font-weight: 700;
    font-size: 0.86rem;
}

.faq-list {
    max-width: 840px;
    margin: auto;
    display: grid;
    gap: 10px;
}

.faq-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    overflow: hidden;
}

.faq-item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 700;
    color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-family: var(--display);
    font-size: 1.3rem;
    line-height: 1;
    color: var(--indigo);
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item[open] {
    border-color: color-mix(in srgb, var(--indigo) 40%, var(--line));
}

.faq-item p {
    padding: 0 24px 22px;
    color: var(--muted);
}

.tutorial {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    align-items: center;
    gap: 48px;
    padding: 40px 0;
    border-bottom: 1px solid var(--line);
}

.tutorial:nth-child(even) {
    grid-template-columns: 1.15fr 0.85fr;
}

.tutorial:nth-child(even) .tutorial-copy {
    order: 2;
}

.tutorial-shot {
    padding: 8px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.tutorial > * {
    min-width: 0;
}

.tutorial-shot img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 13px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
}

.tutorial-copy h2 {
    margin: 12px 0;
    font-size: 1.8rem;
}

.tutorial-copy p {
    color: var(--muted);
}

.tutorial-copy ol {
    margin-top: 14px;
    padding-left: 20px;
    color: var(--body);
}

/* ---------------------------------------------------------------- forms */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--body);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--canvas);
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--indigo);
    background: var(--paper);
    box-shadow: 0 0 0 4px rgba(91, 75, 245, 0.18);
}

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

.plan-option {
    display: flex;
    gap: 10px;
    padding: 14px;
    border: 2px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
}

.plan-option:has(input:checked) {
    border-color: var(--indigo);
    background: var(--indigo-soft);
}

.plan-option input {
    width: auto;
}

.alert {
    padding: 15px 18px;
    border-radius: 14px;
    margin-bottom: 18px;
}

.alert-success {
    background: #E2F8EE;
    color: #0B6B47;
}

.err {
    color: #D42C53;
    font-size: 0.9rem;
}

/* --------------------------------------------------------------- footer */

.site-footer {
    padding: 72px 0 28px;
    background: var(--night);
    color: var(--muted-dark);
}

.site-footer .brand {
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 36px;
}

.site-footer h4 {
    margin-bottom: 14px;
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.98rem;
    color: #fff;
}

.site-footer ul {
    list-style: none;
    display: grid;
    gap: 9px;
}

.site-footer a:hover {
    color: var(--mango);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 48px;
    padding-top: 22px;
    border-top: 1px solid var(--line-dark);
    font-size: 0.88rem;
}

/* Older markup marks blocks for reveal; content is always visible. */
.reveal {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------- responsive */

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

    .console-preview {
        max-width: 720px;
    }
}

@media (max-width: 920px) {
    .main-nav {
        display: none;
    }

    .feature-grid,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .figure:nth-child(3) {
        border-left: 0;
        padding-left: 0;
    }

    .figure:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .line-steps {
        grid-template-columns: 1fr 1fr;
        row-gap: 44px;
    }

    .line-steps::before {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .tutorial,
    .tutorial:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .tutorial:nth-child(even) .tutorial-copy {
        order: 0;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .container {
        width: calc(100% - 32px);
    }

    section {
        padding: 72px 0;
    }

    .hero {
        padding: 64px 0;
    }

    .nav-bar {
        height: 66px;
    }

    .nav-actions {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .feature-grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .form-grid,
    .plan-choice,
    .line-steps {
        grid-template-columns: 1fr;
    }

    .console-preview {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .cp-side {
        display: none;
    }

    .cp-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .cp-kpi:nth-child(3) {
        display: none;
    }

    .figures {
        grid-template-columns: 1fr;
    }

    .figure,
    .figure:first-child,
    .figure:nth-child(3) {
        padding: 22px 0;
        border-left: 0;
        border-bottom: 1px solid var(--line);
    }

    .figure:last-child {
        border-bottom: 0;
    }

    .cta-band {
        padding: 48px 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* ===================================================== departure console */

.nc {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    border-radius: 30px;
    border: 1px solid var(--line-dark);
    background: rgba(255, 255, 255, 0.025);
    box-shadow: 0 60px 120px -60px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.nc-map {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 10px 48px;
    border-right: 1px solid var(--line-dark);
    background: radial-gradient(420px 320px at 80% 75%, rgba(255, 138, 61, 0.10), transparent 70%);
}

.nc-map svg {
    width: 100%;
    height: auto;
}

.nc-map-caption {
    position: absolute;
    left: 24px;
    bottom: 18px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--muted-dark);
}

.nc-network path {
    fill: none;
    stroke: rgba(196, 190, 255, 0.16);
    stroke-width: 2;
    stroke-dasharray: 2 7;
    stroke-linecap: round;
}

.nc-network circle {
    fill: var(--night);
    stroke: rgba(196, 190, 255, 0.35);
    stroke-width: 2;
}

.nc-network text {
    font-family: var(--text);
    font-size: 13px;
    font-weight: 500;
    fill: rgba(196, 190, 255, 0.45);
}

.nc-track {
    fill: none;
    stroke: rgba(196, 190, 255, 0.22);
    stroke-width: 3;
    stroke-linecap: round;
}

.nc-progress {
    fill: none;
    stroke: url(#nc-signal);
    stroke-width: 4;
    stroke-linecap: round;
}

.nc-stop-node {
    fill: var(--night);
    stroke: rgba(196, 190, 255, 0.6);
    stroke-width: 2.5;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.nc-stop.is-passed .nc-stop-node {
    fill: var(--mango);
    stroke: var(--mango);
}

.nc-stop.is-current .nc-stop-node {
    fill: var(--night);
    stroke: var(--mango);
}

.nc-stop-name {
    font-family: var(--display);
    font-size: 16px;
    font-weight: 600;
    fill: #E6E3FF;
}

.nc-stop-time {
    font-family: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    fill: var(--muted-dark);
}

.nc-stop.is-passed .nc-stop-time,
.nc-stop.is-current .nc-stop-time {
    fill: var(--mango);
}

.nc-coach-ring {
    fill: none;
    stroke: var(--mango);
    stroke-width: 2;
    transform-box: fill-box;
    transform-origin: center;
    animation: nc-beacon 2.2s ease-out infinite;
}

@keyframes nc-beacon {
    0% { transform: scale(0.8); opacity: 0.9; }
    80%, 100% { transform: scale(1.9); opacity: 0; }
}

.nc-panel {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 30px 30px 26px;
    min-width: 0;
}

.nc-route {
    font-size: 1.5rem;
    color: #fff;
}

.nc-meta {
    margin-top: 4px;
    font-size: 0.95rem;
    color: var(--muted-dark);
}

/* The four states of a departure, as stops on a short line. */
.nc-phases {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    list-style: none;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--muted-dark);
}

.nc-phases::before {
    content: "";
    position: absolute;
    left: 7px;
    right: 22%;
    top: 7px;
    height: 2px;
    background: rgba(196, 190, 255, 0.2);
}

.nc-phases li {
    position: relative;
    padding-top: 24px;
    transition: color 0.3s ease;
}

.nc-phases li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(196, 190, 255, 0.5);
    background: var(--night);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.nc-phases li.is-done {
    color: #D9D6F7;
}

.nc-phases li.is-done::before {
    border-color: #8B7DFF;
    background: #8B7DFF;
}

.nc-phases li.is-active {
    color: #fff;
}

.nc-phases li.is-active::before {
    border-color: transparent;
    background: var(--signal);
    box-shadow: 0 0 14px 3px rgba(255, 138, 61, 0.55);
}

.nc-seats-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: -10px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--muted-dark);
}

.nc-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px 8px;
}

.nc-legend i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-left: 6px;
}

.nc-legend i.is-sold {
    background: #8B7DFF;
}

.nc-legend i.is-boarded {
    background: var(--mango);
}

/* Coach seen from above: 11 rows of 2 + 2 seats with an aisle. */
.nc-seatmap {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    grid-template-rows: repeat(2, 18px) 8px repeat(2, 18px);
    gap: 5px;
    padding: 12px;
    border-radius: 16px 34px 34px 16px;
    border: 1px solid var(--line-dark);
    background: rgba(255, 255, 255, 0.03);
}

.nc-seat {
    border-radius: 5px;
    border: 1.5px solid rgba(196, 190, 255, 0.28);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nc-seat.is-sold {
    border-color: #8B7DFF;
    background: #8B7DFF;
}

.nc-seat.is-boarded {
    border-color: var(--mango);
    background: var(--mango);
}

.nc-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.nc-kpis > div {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-dark);
    background: rgba(255, 255, 255, 0.03);
    min-width: 0;
}

.nc-kpis dt {
    font-size: 0.82rem;
    color: var(--muted-dark);
}

.nc-kpis dd {
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nc-kpis dd small {
    display: block;
    margin-top: 2px;
    font-family: var(--text);
    font-size: 0.82rem;
    color: var(--mango);
}

.nc-feed {
    list-style: none;
    height: 236px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
    mask-image: linear-gradient(180deg, #000 70%, transparent);
}

.nc-event {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 12px;
    padding: 10px 0 10px 22px;
    border-bottom: 1px solid var(--line-dark);
    overflow: hidden;
}

.nc-event::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 17px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #8B7DFF;
}

.nc-event.is-ready::before {
    background: #22C487;
}

.nc-event.is-stop::before {
    background: var(--mango);
}

.nc-event b {
    color: #F3F2FC;
    font-weight: 700;
    font-size: 0.95rem;
}

.nc-event span {
    grid-column: 1;
    font-size: 0.84rem;
    color: var(--muted-dark);
}

.nc-event em {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-style: normal;
    font-family: var(--display);
    font-weight: 600;
    color: #fff;
}

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

    .nc-map {
        border-right: 0;
        border-bottom: 1px solid var(--line-dark);
    }
}

@media (max-width: 640px) {
    .nc {
        border-radius: 22px;
    }

    .nc-panel {
        padding: 22px 18px;
    }

    .nc-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .nc-kpis > div:last-child {
        grid-column: 1 / -1;
    }

    .nc-seatmap {
        grid-template-rows: repeat(2, 14px) 6px repeat(2, 14px);
        gap: 4px;
        padding: 9px;
    }

    .nc-legend {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nc-coach-ring {
        animation: none;
    }
}

/* ============================================================= features */

.fx-jump {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
}

.fx-jump a {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--body);
    transition: border-color 0.15s ease, color 0.15s ease;
}

.fx-jump a:hover {
    border-color: var(--indigo);
    color: var(--indigo);
}

.fx-section {
    padding: 88px 0;
    scroll-margin-top: 72px;
}

.fx-group {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) 2fr;
    gap: 56px;
    align-items: start;
}

.fx-intro {
    position: sticky;
    top: 104px;
}

.fx-index {
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--indigo);
}

.fx-intro h2 {
    margin-top: 10px;
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
}

.fx-intro p {
    margin-top: 14px;
    color: var(--muted);
}

.fx-intro .fx-users {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--indigo-soft);
    color: var(--indigo-dark);
    font-size: 0.9rem;
    font-weight: 600;
}

.fx-users svg {
    width: 16px;
    height: 16px;
}

.fx-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 40px;
}

.fx-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    padding: 26px 0;
    border-top: 1px solid var(--line);
}

.fx-item .icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--indigo-soft);
    color: var(--indigo);
}

.fx-item .icon svg {
    width: 22px;
    height: 22px;
}

.fx-item h3 {
    margin-bottom: 6px;
}

.fx-item p {
    color: var(--muted);
}

.fx-matrix-wrap {
    overflow-x: auto;
    border-radius: 24px;
    border: 1px solid var(--line-dark);
    background: rgba(255, 255, 255, 0.025);
}

.fx-matrix {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.fx-matrix th,
.fx-matrix td {
    padding: 16px 22px;
    border-bottom: 1px solid var(--line-dark);
    text-align: center;
}

.fx-matrix thead th {
    font-family: var(--display);
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.fx-matrix th[scope="row"],
.fx-matrix thead th:first-child {
    text-align: left;
}

.fx-matrix th[scope="row"] {
    font-weight: 600;
    color: #E6E3FF;
}

.fx-matrix tbody tr:last-child > * {
    border-bottom: 0;
}

.fx-yes {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--signal);
    color: var(--ink);
}

.fx-yes svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.6;
}

.fx-no {
    color: rgba(196, 190, 255, 0.35);
}

/* ======================================================== documentation */

.docs-hero {
    padding-bottom: 36px;
}

.docs-section {
    padding-top: 40px;
}

.docs {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

/* Contents as a line with a stop per section. */
.docs-nav {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 4px 8px 20px 0;
    scrollbar-width: thin;
}

.docs-nav-group {
    margin: 18px 0 8px;
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
}

.docs-nav > div:first-child .docs-nav-group {
    margin-top: 0;
}

.docs-nav ul {
    position: relative;
    list-style: none;
    margin-left: 4px;
    border-left: 2px solid var(--line);
}

.docs-nav a {
    position: relative;
    display: block;
    padding: 6px 0 6px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.15s ease;
}

.docs-nav a::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--canvas);
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.docs-nav a:hover {
    color: var(--ink);
}

.docs-nav a:hover::before {
    border-color: var(--indigo);
}

.docs-nav a.is-current {
    color: var(--ink);
    font-weight: 700;
}

.docs-nav a.is-current::before {
    border-color: transparent;
    background: var(--signal);
    box-shadow: 0 0 0 4px rgba(255, 166, 43, 0.18);
}

.docs-body {
    max-width: 760px;
    font-size: 1.06rem;
}

.docs-body h2 {
    margin: 64px 0 14px;
    padding-top: 6px;
    font-size: 1.75rem;
    scroll-margin-top: 92px;
}

.docs-body h2:first-child {
    margin-top: 0;
}

.docs-body p {
    margin-top: 14px;
    color: var(--body);
}

.docs-body a {
    color: var(--indigo);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.docs-body b {
    color: var(--ink);
    font-weight: 700;
}

.docs-body code {
    padding: 2px 7px;
    border-radius: 7px;
    background: var(--indigo-soft);
    color: var(--indigo-dark);
    font-family: var(--text);
    font-size: 0.95em;
    font-weight: 600;
}

.docs-steps {
    margin-top: 18px;
    list-style: none;
    counter-reset: docs-step;
}

.docs-steps li {
    position: relative;
    counter-increment: docs-step;
    padding: 4px 0 14px 44px;
}

.docs-steps li::before {
    content: counter(docs-step);
    position: absolute;
    left: 0;
    top: 2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: var(--mango);
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.9rem;
}

.docs-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: var(--line);
}

.docs-list {
    margin-top: 16px;
    padding-left: 0;
    list-style: none;
}

.docs-list li {
    position: relative;
    padding: 6px 0 6px 24px;
}

.docs-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 15px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid var(--mango);
}

.docs-note {
    margin-top: 22px;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--mango) 45%, var(--line));
    background: #FFF6E8;
    color: var(--body);
}

.docs-note strong {
    color: var(--ink);
}

.docs-figure {
    margin: 26px 0 8px;
}

.docs-figure img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: var(--paper);
}

.docs-figure figcaption {
    margin-top: 10px;
    font-size: 0.92rem;
    color: var(--muted);
}

@media (max-width: 1080px) {
    .fx-group {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .fx-intro {
        position: static;
        max-width: 640px;
    }
}

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

    .docs-nav {
        position: static;
        max-height: none;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 24px;
        padding: 20px;
        border-radius: 18px;
        border: 1px solid var(--line);
        background: var(--paper);
    }

    .docs-nav > div:nth-child(2) .docs-nav-group {
        margin-top: 0;
    }
}

@media (max-width: 640px) {
    .fx-list {
        grid-template-columns: 1fr;
    }

    .fx-section {
        padding: 64px 0;
    }

    .docs-nav {
        grid-template-columns: 1fr;
    }

    .docs-nav > div:nth-child(2) .docs-nav-group {
        margin-top: 18px;
    }

    .docs-body h2 {
        font-size: 1.5rem;
        margin-top: 52px;
    }
}
