/*
 * contiplano.com. Colours and type follow docs/DESIGN.md: indigo leads, teal accents, the system UI font,
 * light and dark from the visitor's system. No fonts, scripts or images from elsewhere.
 */

:root {
    --indigo: #4f46e5;
    --indigo-text: #4338ca;
    --teal: #0d9488;
    --teal-soft: rgba(13, 148, 136, 0.12);
    --red: #dc2626;
    --red-soft: rgba(220, 38, 38, 0.1);
    --blue: #2563eb;
    --blue-soft: rgba(37, 99, 235, 0.1);
    --grey: #64748b;
    --page: #f8fafc;
    --card: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --heading: #0f172a;
    --muted: #64748b;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 40px rgba(15, 23, 42, 0.08);
    --glow: radial-gradient(60rem 30rem at 85% -10%, rgba(79, 70, 229, 0.14), transparent 60%),
            radial-gradient(40rem 24rem at -10% 20%, rgba(13, 148, 136, 0.12), transparent 60%);
    --radius: 16px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --indigo: #818cf8;
        --indigo-text: #a5b4fc;
        --teal: #2dd4bf;
        --teal-soft: rgba(45, 212, 191, 0.14);
        --red: #f87171;
        --red-soft: rgba(248, 113, 113, 0.14);
        --blue: #60a5fa;
        --blue-soft: rgba(96, 165, 250, 0.14);
        --grey: #94a3b8;
        --page: #0b1120;
        --card: #131c2e;
        --border: #24324a;
        --text: #e2e8f0;
        --heading: #f8fafc;
        --muted: #94a3b8;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 48px rgba(0, 0, 0, 0.35);
        --glow: radial-gradient(60rem 30rem at 85% -10%, rgba(129, 140, 248, 0.16), transparent 60%),
                radial-gradient(40rem 24rem at -10% 20%, rgba(45, 212, 191, 0.1), transparent 60%);
    }
}

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

html {
    scroll-behavior: smooth;
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--glow), var(--page);
    background-repeat: no-repeat;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    color: var(--heading);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
}

h1 {
    font-size: clamp(2.3rem, 4.6vw, 3.5rem);
    font-weight: 800;
    text-wrap: balance;
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 750;
}

h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--indigo-text);
}

code {
    font-family: var(--mono);
    font-size: 0.9em;
    padding: 0.1em 0.35em;
    border-radius: 6px;
    background: var(--teal-soft);
    color: var(--heading);
}

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

.wrap {
    width: min(1120px, 100% - 3rem);
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal);
}

h1 .line {
    display: block;
}

.accent {
    background: linear-gradient(90deg, var(--indigo), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- The mark (docs/DESIGN.md) ------------------------------------------------------------------------------- */

.mark {
    width: 32px;
    height: 32px;
    flex: none;
}

.mark .ring {
    fill: none;
    stroke: var(--indigo);
    stroke-width: 13;
    stroke-linecap: round;
}

.mark .dot {
    fill: var(--teal);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    color: var(--heading);
    text-decoration: none;
}

.brand-small {
    font-size: 1rem;
}

.brand-small .mark {
    width: 24px;
    height: 24px;
}

/* --- Buttons ------------------------------------------------------------------------------------------------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 1.4rem;
    border-radius: 12px;
    font-weight: 650;
    text-decoration: none;
    color: #fff;
    background: #4f46e5;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.button:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.4);
}

.button-ghost {
    color: var(--heading);
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: none;
}

.button-ghost:hover {
    background: var(--card);
    border-color: var(--indigo);
    box-shadow: none;
}

.button-small {
    min-height: 40px;
    padding: 0 1rem;
    font-size: 0.95rem;
    box-shadow: none;
}

.cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.75rem 0 1rem;
}

.cta-center {
    justify-content: center;
}

.fineprint {
    font-size: 0.9rem;
    color: var(--muted);
}

/* --- Header -------------------------------------------------------------------------------------------------- */

.top {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: saturate(1.6) blur(12px);
    background: color-mix(in srgb, var(--page) 78%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 68px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav a {
    white-space: nowrap;
}

.nav a:not(.button) {
    color: var(--text);
    text-decoration: none;
    font-weight: 550;
    font-size: 0.95rem;
}

.nav a:not(.button):hover {
    color: var(--indigo-text);
}

@media (max-width: 760px) {
    .nav a:not(.button):not(.nav-login) {
        display: none;
    }

    .nav {
        gap: 0.75rem;
    }

    .brand {
        font-size: 1.05rem;
    }
}

/* --- Hero ---------------------------------------------------------------------------------------------------- */

.hero {
    padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 34rem;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The product illustration: My queue, drawn in HTML. */
.product {
    margin: 0;
    position: relative;
}

.product::before {
    content: "";
    position: absolute;
    inset: 8% -4% -6% 10%;
    background: linear-gradient(135deg, var(--indigo), var(--teal));
    filter: blur(60px);
    opacity: 0.25;
    border-radius: 40px;
    z-index: -1;
}

.product figcaption {
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
}

.window {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 0.9rem 1rem 1.1rem;
    transform: rotate(-1deg);
}

.window-bar {
    display: flex;
    gap: 6px;
    padding: 0.1rem 0.2rem 0.8rem;
}

.window-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}

.running {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5, #0d9488);
    color: #fff;
}

.pulse {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    flex: none;
    animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    100% {
        box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
    }
}

.running-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
}

.running-title {
    font-weight: 650;
}

.running-time {
    margin-left: auto;
    font-family: var(--mono);
    font-weight: 600;
    font-size: 1.05rem;
}

.queue-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0.2rem 0.6rem;
    font-weight: 700;
    color: var(--heading);
}

.next {
    font-size: 0.85rem;
    font-weight: 650;
    color: #fff;
    background: #4f46e5;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

.queue {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.part {
    display: grid;
    grid-template-columns: 5.2rem minmax(0, 1fr);
    grid-template-areas: "tag title" "tag meta";
    column-gap: 0.75rem;
    padding: 0.55rem 0.8rem 0.55rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--teal);
    background: var(--card);
}

.tag {
    grid-area: tag;
    align-self: center;
    justify-self: start;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--teal-soft);
    color: var(--teal);
}

.row-title {
    grid-area: title;
    font-weight: 600;
    color: var(--heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-meta {
    grid-area: meta;
    font-size: 0.82rem;
    color: var(--muted);
}

.part-now {
    border-left-color: var(--blue);
}

.part-now .tag {
    background: var(--blue-soft);
    color: var(--blue);
}

.part-risk {
    border-left-color: var(--red);
}

.part-risk .tag {
    background: var(--red-soft);
    color: var(--red);
}

.part-wait {
    border-left: 4px dashed var(--grey);
    opacity: 0.8;
}

.part-wait .tag {
    background: transparent;
    border: 1px dashed var(--grey);
    color: var(--grey);
}

/* --- Pillars ------------------------------------------------------------------------------------------------- */

.pillars {
    padding: 1rem 0 4rem;
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

@media (max-width: 860px) {
    .pillar-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.pillar {
    padding: 1.6rem;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.pillar p {
    color: var(--muted);
    margin: 0;
}

.icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    margin-bottom: 1rem;
    position: relative;
    background: var(--teal-soft);
}

/* Focus: the Orbit mark in small. */
.icon-focus::before {
    content: "";
    position: absolute;
    inset: 11px;
    border: 5px solid var(--indigo);
    border-right-color: transparent;
    border-radius: 50%;
}

.icon-focus::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    right: 9px;
    top: 18px;
    border-radius: 50%;
    background: var(--teal);
}

/* Balance: three bars of different length. */
.icon-balance::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 13px;
    width: 22px;
    height: 4px;
    border-radius: 2px;
    background: var(--indigo);
    box-shadow: -4px 8px 0 var(--teal), 2px 16px 0 var(--indigo);
}

/* Deadlines: a flag on a pole. */
.icon-deadline::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 10px;
    width: 3px;
    height: 24px;
    border-radius: 2px;
    background: var(--indigo);
}

.icon-deadline::after {
    content: "";
    position: absolute;
    left: 17px;
    top: 10px;
    width: 14px;
    height: 10px;
    border-radius: 0 3px 3px 0;
    background: var(--teal);
}

/* --- Features ------------------------------------------------------------------------------------------------ */

.features {
    padding: 4.5rem 0;
}

.section-lead {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 40rem;
    margin-bottom: 2.5rem;
}

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

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

@media (max-width: 620px) {
    .feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.feature {
    padding: 1.4rem 1.4rem 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 70%, transparent);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature:hover {
    border-color: var(--indigo);
    transform: translateY(-2px);
}

.feature h3::before {
    content: "";
    display: block;
    width: 22px;
    height: 4px;
    border-radius: 2px;
    margin-bottom: 0.9rem;
    background: linear-gradient(90deg, var(--indigo), var(--teal));
}

.feature p {
    margin: 0;
    color: var(--muted);
    font-size: 0.97rem;
}

/* --- How it works -------------------------------------------------------------------------------------------- */

.how {
    padding: 4.5rem 0;
    background: color-mix(in srgb, var(--card) 60%, transparent);
    border-block: 1px solid var(--border);
}

.how-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

@media (max-width: 900px) {
    .how-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.steps {
    list-style: none;
    counter-reset: step;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.4rem;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-left: 3.4rem;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -0.1rem;
    width: 2.3rem;
    height: 2.3rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 750;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #0d9488);
}

.steps h3 {
    margin-bottom: 0.25rem;
}

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

.quick-add {
    padding: 1.4rem;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.qa-field {
    font-family: var(--mono);
    font-size: 0.95rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 2px solid var(--indigo);
    background: var(--page);
    line-height: 2;
    color: var(--heading);
}

.code {
    display: inline-block;
    padding: 0 0.45rem;
    border-radius: 6px;
    line-height: 1.6;
    background: var(--teal-soft);
    color: var(--teal);
    font-weight: 650;
}

.qa-result {
    margin: 1.2rem 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 1.2rem;
}

.qa-result dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.qa-result dd {
    margin: 0;
    font-weight: 650;
    color: var(--heading);
}

/* --- Teams and trust ----------------------------------------------------------------------------------------- */

.teams {
    padding: 4.5rem 0;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

@media (max-width: 860px) {
    .teams-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.teams-card,
.trust {
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow);
}

.trust {
    background: linear-gradient(160deg, color-mix(in srgb, var(--indigo) 10%, var(--card)), var(--card) 55%);
}

.checks {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.checks li {
    position: relative;
    padding-left: 2rem;
}

.checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--teal-soft);
}

.checks li::after {
    content: "";
    position: absolute;
    left: 0.38rem;
    top: calc(0.35em + 0.22rem);
    width: 0.32rem;
    height: 0.55rem;
    border: solid var(--teal);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* --- Final call ---------------------------------------------------------------------------------------------- */

.final {
    padding: 2rem 0 5rem;
}

.final-box {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5 0%, #0d9488 100%);
    box-shadow: 0 24px 60px rgba(79, 70, 229, 0.3);
}

.final-box h2 {
    color: #fff;
}

.final-box p {
    font-size: 1.1rem;
    opacity: 0.92;
}

.final-box .button {
    color: #312e81;
    background: #fff;
    box-shadow: none;
}

.final-box .button-ghost {
    color: #fff;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.6);
}

.final-box .button-ghost:hover {
    border-color: #fff;
}

/* --- Footer -------------------------------------------------------------------------------------------------- */

.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0 2.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer p {
    margin: 0;
}

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

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