:root {
    --fg: #1c2128;
    --muted: #5c6772;
    --line: #d8dee4;
    --bg: #ffffff;
    --bg-alt: #f4f6f8;
    --accent: #1f4e79;
    --accent-hover: #173d60;
    --radius: 10px;
    color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--accent); }

code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.92em; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--fg);
    text-decoration: none;
}

nav { display: flex; align-items: center; gap: 1.25rem; }
nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
nav a:hover { color: var(--fg); }

.button {
    display: inline-block;
    padding: 0.7rem 1.3rem;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
nav a.button, nav a.button:hover { color: #fff; }
.button-small { padding: 0.45rem 0.9rem; font-size: 0.95rem; }
.button-ghost { background: transparent; color: var(--accent); }
.button-ghost:hover { background: var(--bg-alt); border-color: var(--accent); }

.hero {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 0 5rem;
    background:
        url("/images/doodles.svg") 0 0 / 560px 560px repeat,
        linear-gradient(rgba(31, 78, 121, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(31, 78, 121, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(180deg, #eef3f8, var(--bg));
}
.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--bg));
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 3rem;
    align-items: center;
}
.eyebrow {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: rgba(31, 78, 121, 0.1);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
}
.hero h1 { max-width: 40rem; margin: 0 0 1rem; font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.15; }
.lead { max-width: 40rem; margin: 0 0 2rem; font-size: 1.2rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.note { margin: 1.25rem 0 0; color: var(--muted); font-size: 0.95rem; }

.hero-visual {
    position: relative;
    margin: 0 -5rem 0 0;
    perspective: 1800px;
}
.hero-stage {
    position: relative;
    transform: rotateY(-16deg) rotateX(7deg) rotateZ(1.5deg);
    transform-origin: 30% 50%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}
.hero-stage::before,
.hero-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.hero-stage::before { transform: translate3d(28px, 26px, -60px); opacity: 0.55; }
.hero-stage::after { transform: translate3d(14px, 13px, -30px); opacity: 0.85; }
.hero-stage img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow:
        0 2px 4px rgba(16, 38, 61, 0.06),
        0 18px 40px rgba(16, 38, 61, 0.14),
        0 50px 90px rgba(16, 38, 61, 0.16);
}
.hero-visual:hover .hero-stage { transform: rotateY(-8deg) rotateX(4deg) rotateZ(0.5deg); }

.float {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(16, 38, 61, 0.18);
    font-size: 0.85rem;
    white-space: nowrap;
}
.float-label { font-weight: 700; }
.float-value { color: var(--muted); font-variant-numeric: tabular-nums; }
.float-progress { left: -1.5rem; bottom: 12%; }
.float-milestone { right: 7rem; top: -1.25rem; }
.meter { display: block; width: 5.5rem; height: 0.5rem; border-radius: 999px; background: #e3eaf1; overflow: hidden; }
.meter > span { display: block; width: 48%; height: 100%; border-radius: inherit; background: #3f9d6b; }
.diamond { display: block; width: 0.7rem; height: 0.7rem; background: var(--accent); transform: rotate(45deg); }

@media (prefers-reduced-motion: reduce) {
    .hero-stage { transition: none; }
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0.9rem;
    border-radius: 10px;
    background: rgba(31, 78, 121, 0.1);
    color: var(--accent);
}
.card-icon-orange { background: rgba(224, 138, 44, 0.14); color: #b4661a; }
.card-icon-green { background: rgba(63, 157, 107, 0.14); color: #2d7a51; }
.card-icon-violet { background: rgba(122, 107, 196, 0.14); color: #5a4ba6; }
.grid .card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.grid .card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(16, 38, 61, 0.1); }

.section-alt {
    background:
        url("/images/doodles.svg") 280px 120px / 560px 560px repeat,
        var(--bg-alt);
}

.section { padding: 4.5rem 0; }
.section h2 { margin: 0 0 1.75rem; font-size: 1.8rem; line-height: 1.25; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.25rem; }

.card {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.card p { margin: 0 0 1rem; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }

.split { display: grid; grid-template-columns: 3fr 2fr; gap: 2.5rem; align-items: center; }
.split h2 { margin-bottom: 1rem; }
.split p { color: var(--muted); }

.site-footer { padding: 2rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.site-footer p { margin: 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-links { gap: 1rem; flex-wrap: wrap; }
.footer-links a { font-weight: 400; }

.narrow { max-width: 46rem; }
.section h1 { margin: 0 0 1rem; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; }
.prose h2 { margin: 2.25rem 0 0.75rem; font-size: 1.3rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.narrow > .card { margin: 1.5rem 0; }
.contact-grid { margin: 1.5rem 0; }
mark.todo { background: #fff3bf; color: #7a4d00; padding: 0 0.2em; border-radius: 3px; }

.downloads { display: grid; gap: 1rem; margin-bottom: 1rem; }
.download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.download > div { flex: 1 1 22rem; min-width: 0; }
.download p { margin-bottom: 0.4rem; }
.checksum { font-size: 0.8rem; overflow-wrap: anywhere; }
.checksum span { color: var(--muted); margin-right: 0.3rem; }
.size { font-weight: 400; opacity: 0.85; }

@media (max-width: 720px) {
    nav a:not(.button) { display: none; }
    .site-footer .footer-links a { display: inline; }
    .hero { padding: 3.5rem 0 3rem; }
    .split { grid-template-columns: 1fr; }
    .float-progress { left: 0.5rem; bottom: -1rem; }
    .float-milestone { display: none; }
}

@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-visual { margin: 0; }
    .hero-stage { transform: rotateX(8deg) rotateZ(-1deg); transform-origin: 50% 100%; }
    .float-milestone { right: 1rem; }
}
