/* codelabedu.com: CodeLab Edu (the Moodle plugin family) and CodeLab Cloud. Proprietary, (c) 2026 Boban Blagojevic. */

:root {
    color-scheme: light dark;
    --bg: #f6f7fb;
    --surface: #fff;
    --sunken: #eef1f7;
    --text: #121722;
    --muted: #586174;
    --faint: #8a93a6;
    --line: #e1e5ee;
    --accent: #4263eb;
    --accent-2: #7c4dff;
    --accent-soft: #e7ecff;
    --ok: #1d7a46;
    --ok-soft: #e1f4e9;
    --warn: #9a5b00;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
    --radius: 16px;
    --wrap: 1160px;
    --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    /* The hero is always the night sky. */
    --space: #060814;
    --space-2: #0d1230;
    --space-text: #e9ecf8;
    --space-muted: #a5adc8;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0d14;
        --surface: #131722;
        --sunken: #1a1f2d;
        --text: #e8ebf3;
        --muted: #a1a9bb;
        --faint: #6f788c;
        --line: #252b3a;
        --accent: #7b96ff;
        --accent-2: #a98bff;
        --accent-soft: #1b2342;
        --ok: #5ccb8a;
        --ok-soft: #12291d;
        --warn: #e6a94f;
        --shadow: none;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--sans); background: var(--bg); color: var(--text); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent); }
code { font: .92em var(--mono); background: var(--sunken); padding: .1em .35em; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ------------------------------------------------------------------ header */
.site-head { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.site-head.on-space { background: rgba(6, 8, 20, .55); border-bottom-color: rgba(255, 255, 255, .08); color: var(--space-text); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand .mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); font: 700 13px/1 var(--mono); }
.brand small { font-weight: 500; opacity: .6; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: inherit; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; opacity: .82; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; background: color-mix(in srgb, currentColor 9%, transparent); }
.nav .btn { margin-left: 8px; opacity: 1; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; }
.menu-toggle svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px;
    font: 600 1rem/1.2 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.ghost { background: transparent; color: inherit; border-color: color-mix(in srgb, currentColor 25%, transparent); box-shadow: none; }
.btn.ghost:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.btn.small { padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ hero (space) */
.hero { position: relative; overflow: hidden; color: var(--space-text); margin-top: -65px; padding-top: 65px;
    background: radial-gradient(1200px 600px at 75% 40%, #1a2160 0%, transparent 60%),
        radial-gradient(800px 500px at 10% 90%, #2a0f4d 0%, transparent 60%), var(--space); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px;
    align-items: center; min-height: min(820px, calc(100vh - 0px)); padding-top: 40px; padding-bottom: 72px; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: .85rem;
    font-weight: 600; color: #c9d3ff; background: rgba(123, 150, 255, .12); border: 1px solid rgba(123, 150, 255, .25); margin-bottom: 20px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5ccb8a; box-shadow: 0 0 10px #5ccb8a; }
.hero h1 { margin-bottom: 20px; }
.hero h1 .grad { background: linear-gradient(90deg, #8fa6ff, #c38bff 50%, #6ee7c8); -webkit-background-clip: text;
    background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--space-muted); max-width: 560px; margin-bottom: 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; }
.stats div { min-width: 110px; }
.stats b { display: block; font-size: 1.7rem; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.stats span { font-size: .85rem; color: var(--space-muted); }
.galaxy { position: relative; height: min(640px, 70vw); min-height: 420px; }
.galaxy canvas { position: absolute; inset: 0 -14% 0 -8%; width: 122%; height: 100%; cursor: grab; outline: none; }
.galaxy canvas:active { cursor: grabbing; }
.galaxy-fallback { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center;
    gap: 8px; padding: 24px; }
.galaxy-fallback span { padding: 6px 12px; border-radius: 999px; font: 600 .85rem var(--mono); background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12); color: #dfe4ff; }
.galaxy.live .galaxy-fallback { display: none; }
.galaxy-hint { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font-size: .8rem; color: var(--space-muted);
    opacity: .8; white-space: nowrap; pointer-events: none; }

/* The code card that the galaxy shows for the language under the pointer. */
.snippet { position: absolute; z-index: 3; right: 0; bottom: 36px; width: min(340px, 92%); border-radius: 14px;
    background: rgba(13, 17, 35, .86); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; transition: opacity .25s, transform .25s; }
.snippet[hidden] { display: block; opacity: 0; transform: translateY(8px); pointer-events: none; }
.snippet-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08);
    font: 600 .85rem var(--sans); color: #fff; }
.snippet-head i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 12px currentColor; background: currentColor; }
.snippet-head span { margin-left: auto; font-weight: 500; color: var(--space-muted); font-size: .78rem; }
.snippet pre { margin: 0; padding: 12px 14px; font: 12.5px/1.55 var(--mono); color: #dbe2ff; white-space: pre; overflow: auto; }
.snippet .out { display: flex; gap: 8px; padding: 9px 14px; font: 12.5px/1.4 var(--mono); color: #6ee7a8;
    background: rgba(110, 231, 168, .06); border-top: 1px solid rgba(255, 255, 255, .06); }
.snippet .out b { color: var(--space-muted); font-weight: 500; }
.snippet .out code { background: none; padding: 0; color: inherit; font: inherit; }

/* ------------------------------------------------------------------ sections */
section.block { padding: 96px 0; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { display: block; font: 700 .8rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.lead2 { font-size: 1.12rem; color: var(--muted); }
.grid { display: grid; gap: 20px; }
#trial .grid, #trial.block .wrap { align-items: center; }
.grid.cols-3:has(.feature) { gap: 36px 32px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow); }
.alt .card { background: var(--bg); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px;
    background: var(--accent-soft); color: var(--accent); }
.icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; font-weight: 600; font-size: .95rem; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }

/* The plugin family: three products with their own colour. */
.family .card { overflow: hidden; padding-top: 32px; }
.family .card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.family .card .icon { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.family .tag { display: inline-block; font: 600 .75rem var(--mono); color: var(--muted); margin-bottom: 6px; }
.c-codelab { --c: #4263eb; }
.c-algorithm { --c: #12b886; }
.c-aisim { --c: #f76707; }
ul.ticks { list-style: none; padding: 0; margin: 12px 0 0; }
ul.ticks li { position: relative; padding-left: 26px; margin: 8px 0; color: var(--muted); }
ul.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--ok);
    border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }

/* Steps of the free trial, with a copy of the settings box of Moodle. */
.steps { counter-reset: step; }
.step { padding-left: 64px; position: relative; margin-bottom: 28px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px;
    border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.step h3 { margin-bottom: 4px; }
.moodle { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.moodle-bar { display: flex; gap: 6px; padding: 10px 14px; background: var(--sunken); border-bottom: 1px solid var(--line); }
.moodle-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.moodle-body { padding: 22px; }
.moodle-body h4 { margin: 0 0 6px; font-size: 1.05rem; }
.mbox { margin-top: 14px; padding: 16px; border-radius: 8px; background: color-mix(in srgb, #0dcaf0 14%, var(--surface));
    border: 1px solid color-mix(in srgb, #0dcaf0 40%, var(--surface)); font-size: .92rem; }
.mbox .row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mbar { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .08); margin: 10px 0; overflow: hidden; }
.mbar i { display: block; height: 100%; width: 12%; background: #198754; border-radius: 4px; }
.mbtn { display: inline-block; margin-top: 12px; padding: 8px 14px; border-radius: 6px; background: #0f6cbf; color: #fff;
    font-weight: 600; font-size: .92rem; }

/* Editor features: a wall of small cards. */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .icon { flex: none; margin: 0; }
.feature h3 { font-size: 1.05rem; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

.proof { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.bignum { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 800; letter-spacing: -.04em; line-height: 1;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.cta-band { border-radius: 24px; padding: 56px; color: #fff; text-align: center; position: relative; overflow: hidden;
    background: radial-gradient(600px 300px at 20% 0%, rgba(255, 255, 255, .18), transparent 60%),
        linear-gradient(135deg, #3b5bdb, #7c4dff 60%, #5f3dc4); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .85); max-width: 620px; margin: 0 auto 24px; }
.cta-band .btn { background: #fff; color: #3b2bb0; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.cta-band .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ------------------------------------------------------------------ pricing */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--accent); transform: translateY(-6px); }
.plan .badge { position: absolute; top: -12px; left: 28px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
    color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.price { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 8px 0 2px; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul.ticks { flex: 1; margin-bottom: 20px; }
.plan .btn { width: 100%; }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* ------------------------------------------------------------------ text pages */
.page-head { padding: 72px 0 32px; }
.prose { max-width: 820px; }
.prose h2 { font-size: 1.6rem; margin-top: 48px; }
.prose h3 { margin-top: 28px; }
.prose li { margin: 6px 0; color: var(--muted); }
.prose p { color: var(--muted); }
.prose strong { color: var(--text); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.toc a { padding: 6px 12px; border-radius: 999px; background: var(--sunken); text-decoration: none; font-size: .9rem; font-weight: 600; }
.note { padding: 16px 18px; border-radius: 12px; background: var(--accent-soft); color: var(--text); }

/* ------------------------------------------------------------------ footer */
.site-foot { padding: 56px 0 40px; border-top: 1px solid var(--line); margin-top: 96px; font-size: .92rem; }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-foot h4 { margin: 0 0 12px; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.site-foot a { display: block; color: var(--muted); text-decoration: none; margin: 6px 0; }
.site-foot a:hover { color: var(--text); }
.site-foot .legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); color: var(--faint); }

/* Sections fade in once while scrolling (only when the script runs and motion is welcome). */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .btn { transition: none; }
}

/* ------------------------------------------------------------------ small screens */
@media (max-width: 1000px) {
    .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .plan.featured { transform: none; }
    .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .hero .wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 32px; }
    .galaxy { height: auto; min-height: 0; padding-top: 400px; }
    .galaxy canvas { inset: 0 -20px auto; width: calc(100% + 40px); height: 400px; }
    .galaxy-hint { top: 372px; bottom: auto; }
    .snippet { position: relative; right: auto; bottom: auto; width: 100%; margin-top: 8px; }
    .snippet[hidden] { transform: translateY(8px); }
    .cols-3, .cols-2, .proof { grid-template-columns: minmax(0, 1fr); }
    .site-foot .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .menu-toggle { display: block; }
    .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
        padding: 12px 16px 18px; background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line); }
    .nav.open { display: flex; }
    .nav .btn { margin: 8px 0 0; }
    section.block { padding: 64px 0; }
    .wrap { padding: 0 16px; }
    .card { padding: 22px; }
    .cta-band { padding: 40px 22px; }
    .plans, .cols-4 { grid-template-columns: minmax(0, 1fr); }
    .site-foot .wrap { grid-template-columns: 1fr; }
}
