:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f0f3fa;
    --ink: #141c2e;
    --ink-soft: #4b5675;
    --ink-faint: #7a849c;
    --line: rgba(20, 28, 46, 0.09);
    --accent: #4361ee;
    --accent-hover: #3451d6;
    --accent-soft: rgba(67, 97, 238, 0.1);
    --on-accent: #fff;
    --shadow: 0 16px 48px -24px rgba(67, 97, 238, 0.18);
    --radius: 14px;
    --max: 1080px;
    --serif: "Fraunces", Georgia, serif;
    --sans: "DM Sans", system-ui, sans-serif;
}

html.theme-dark {
    --bg: #0c1220;
    --surface: #131b2e;
    --surface-2: #1a2438;
    --ink: #eef2fb;
    --ink-soft: #94a0bc;
    --ink-faint: #5f6b88;
    --line: rgba(238, 242, 251, 0.09);
    --accent: #5b7cfa;
    --accent-hover: #4a6ae8;
    --accent-soft: rgba(91, 124, 250, 0.14);
    --on-accent: #fff;
    --shadow: 0 16px 48px -20px rgba(0, 0, 0, 0.55);
}

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

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    overflow: hidden;
    font-family: var(--sans);
    font-size: clamp(15px, 1.55vw, 17px);
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    transition: background 0.25s, color 0.25s;
}

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

em {
    font-style: normal;
}

::selection {
    background: var(--accent);
    color: var(--on-accent);
}

/* ---------- Background ---------- */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.backdrop-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.backdrop-blob-a {
    width: 480px;
    height: 480px;
    top: -160px;
    right: -80px;
    background: var(--accent-soft);
}

.backdrop-blob-b {
    width: 320px;
    height: 320px;
    bottom: -100px;
    left: -60px;
    background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.backdrop-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0);
    background-size: 28px 28px;
    opacity: 0.55;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 20%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 20%, transparent 100%);
}

.page {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: var(--max);
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 36px);
}

/* ---------- Header ---------- */
.site-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: clamp(64px, 10vh, 76px);
}

.wordmark {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(1.22rem, 2.2vw, 1.38rem);
    letter-spacing: -0.02em;
}

.wordmark-tld {
    color: var(--accent);
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.84em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-cta {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink-soft);
    transition: color 0.2s;
}

.nav-cta:hover {
    color: var(--accent);
}

.theme-toggle {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.theme-toggle svg {
    width: 17px;
    height: 17px;
}

.icon-sun {
    display: none;
}

html.theme-dark .icon-sun {
    display: block;
}

html.theme-dark .icon-moon {
    display: none;
}

/* ---------- Stage ---------- */
.stage {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
    min-height: 0;
}

.hero-block {
    max-width: 30rem;
}

.eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: clamp(18px, 3vh, 26px);
}

.hero-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2rem, 4.8vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.accent {
    color: var(--accent);
    font-style: italic;
    font-weight: 500;
}

.hero-sub {
    margin-top: clamp(14px, 2.5vh, 20px);
    color: var(--ink-soft);
    font-size: clamp(0.98rem, 1.7vw, 1.12rem);
    max-width: 36ch;
}

.cta {
    margin-top: clamp(22px, 3.5vh, 32px);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.94rem;
    padding: 12px 22px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary:disabled:hover {
    background: var(--accent);
}

.btn-outline:disabled:hover {
    border-color: var(--line);
    color: var(--ink);
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

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

.btn-outline {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Services ---------- */
.services-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.services {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.services li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: clamp(14px, 2.2vh, 18px) clamp(16px, 2vw, 20px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.2s;
}

.services li:hover {
    border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.s-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    font-family: var(--serif);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 8px;
}

.svc-text {
    flex: 1;
    min-width: 0;
}

.svc-title {
    display: block;
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.3;
}

.services em {
    display: block;
    margin-top: 2px;
    font-size: 0.82rem;
    color: var(--ink-faint);
}

/* ---------- Footer ---------- */
.site-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: clamp(16px, 2.5vh, 22px) 0 clamp(20px, 3vh, 28px);
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
}

.stack-line {
    color: var(--ink-soft);
}

.footer-note {
    color: var(--ink-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
    .stage {
        grid-template-columns: 1fr;
        gap: 28px;
        align-content: center;
    }

    .hero-block {
        max-width: none;
    }

    .hero-sub {
        max-width: none;
    }
}

@media (max-width: 640px), (max-height: 640px) {
    body {
        overflow: auto;
    }

    .nav-cta {
        display: none;
    }

    .cta {
        flex-direction: column;
    }

    .cta .btn {
        width: 100%;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
