:root {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --surface: #ffffff;
    --surface-raised: #ffffff;

    --text: #0c1b33;
    --text-soft: #536174;
    --text-faint: #7b8798;

    --line: #dce3eb;
    --line-strong: #c7d1dd;

    --blue: #079cf1;
    --blue-deep: #087fd0;
    --cyan: #04c6e9;
    --purple: #6636e8;

    --good: #16815e;
    --warning: #b96c12;

    --code-bg: #0b1528;
    --code-text: #dce9f8;

    --header-bg: rgba(248, 250, 252, 0.88);

    --content-width: 1180px;
    --page-pad: clamp(20px, 4vw, 56px);

    color-scheme: light;
}


html[data-theme="dark"] {
    --bg: #090d15;
    --bg-soft: #0d131e;
    --surface: #101722;
    --surface-raised: #141d2a;

    --text: #edf4fc;
    --text-soft: #a7b3c3;
    --text-faint: #758296;

    --line: #202b3a;
    --line-strong: #303c4d;

    --blue: #1ba8ff;
    --blue-deep: #1895e7;
    --cyan: #18c8ed;
    --purple: #8060ff;

    --good: #57d4aa;
    --warning: #efb05d;

    --code-bg: #060a11;
    --code-text: #dbe8f8;

    --header-bg: rgba(9, 13, 21, 0.9);

    color-scheme: dark;
}


/* ----------------------------------------------------------
   Base
---------------------------------------------------------- */

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


html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}


body {
    margin: 0;

    background:
        radial-gradient(
            circle at 50% -280px,
            color-mix(in srgb, var(--blue) 8%, transparent),
            transparent 520px
        ),
        var(--bg);

    color: var(--text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 16px;
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


button,
input,
select {
    font: inherit;
}


a {
    color: inherit;
}


img {
    display: block;
    max-width: 100%;
}


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

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;

    border-bottom: 1px solid var(--line);

    background: var(--header-bg);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


.header-inner {
    display: grid;

    grid-template-columns: auto 1fr auto;
    align-items: center;

    width: min(
        calc(100% - (var(--page-pad) * 2)),
        var(--content-width)
    );

    min-height: 64px;

    margin: 0 auto;
}


.domain-mark {
    text-decoration: none;

    color: var(--text);

    font-size: 14px;
    font-weight: 760;
    letter-spacing: -0.015em;
}


.domain-mark span {
    color: var(--text-faint);
    font-weight: 500;
}


.site-nav {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: clamp(18px, 3vw, 38px);
}


.site-nav a {
    position: relative;

    padding: 21px 0 19px;

    text-decoration: none;

    color: var(--text-soft);

    font-size: 13px;
    font-weight: 560;
}


.site-nav a::after {
    position: absolute;
    right: 50%;
    bottom: -1px;
    left: 50%;

    height: 2px;

    background: var(--blue);

    content: "";

    transition:
        right 150ms ease,
        left 150ms ease;
}


.site-nav a:hover {
    color: var(--text);
}


.site-nav a:hover::after {
    right: 0;
    left: 0;
}


.theme-toggle {
    display: inline-grid;

    width: 34px;
    height: 34px;

    padding: 0;

    place-items: center;

    border: 1px solid var(--line);
    border-radius: 50%;

    background: transparent;
    color: var(--text-soft);

    cursor: pointer;

    transition:
        border-color 150ms ease,
        color 150ms ease,
        background 150ms ease;
}


.theme-toggle:hover {
    border-color: var(--line-strong);

    background: var(--surface);

    color: var(--text);
}


.theme-icon {
    grid-area: 1 / 1;

    font-size: 17px;

    transition:
        opacity 150ms ease,
        transform 150ms ease;
}


html[data-theme="light"] .theme-icon-sun {
    opacity: 1;
    transform: scale(1);
}


html[data-theme="light"] .theme-icon-moon {
    opacity: 0;
    transform: scale(0.7);
}


html[data-theme="dark"] .theme-icon-sun {
    opacity: 0;
    transform: scale(0.7);
}


html[data-theme="dark"] .theme-icon-moon {
    opacity: 1;
    transform: scale(1);
}


/* ----------------------------------------------------------
   Main
---------------------------------------------------------- */

main {
    width: min(
        calc(100% - (var(--page-pad) * 2)),
        var(--content-width)
    );

    margin: 0 auto;
}


/* ----------------------------------------------------------
   Brand introduction
---------------------------------------------------------- */

.brand-intro {
    display: flex;

    min-height: 520px;

    padding: clamp(15px, 9vw, 15px) 0 15px;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}


.brand-logo {
    display: block;

    width: min(720px, 90vw);
}


.brand-logo img {
    width: 100%;
    height: auto;
}


.brand-slogan {
    margin: 6px 0 0;

    color: var(--text);

    font-size: clamp(10px, 2vw, 24px);
    font-weight: 650;
    letter-spacing: -0.02em;
}


.brand-summary {
    width: min(640px, 100%);

    margin: 18px auto 0;

    color: var(--text-soft);

    font-size: clamp(15px, 1.35vw, 17px);
    line-height: 1.75;
}


.brand-actions {
    display: flex;

    margin-top: 30px;

    align-items: center;

    gap: 24px;
}


.primary-link,
.secondary-link {
    text-decoration: none;
}


.primary-link {
    display: inline-flex;

    align-items: center;

    gap: 11px;

    border-bottom: 1px solid var(--text);

    color: var(--text);

    font-size: 14px;
    font-weight: 700;

    padding-bottom: 4px;
}


.primary-link span {
    color: var(--blue);

    transition: transform 150ms ease;
}


.primary-link:hover span {
    transform: translateX(4px);
}


.secondary-link {
    color: var(--text-soft);

    font-size: 14px;
}


.secondary-link:hover {
    color: var(--text);
}


/* ----------------------------------------------------------
   Principle strip
---------------------------------------------------------- */

.principle-strip {
    display: grid;

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

    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}


.principle-strip > div {
    min-width: 0;

    padding: 26px 24px;
}


.principle-strip > div + div {
    border-left: 1px solid var(--line);
}


.principle-strip strong,
.principle-strip span {
    display: block;
}


.principle-strip strong {
    margin-bottom: 5px;

    font-size: 13px;
    font-weight: 700;
}


.principle-strip span {
    color: var(--text-soft);

    font-size: 12px;
    line-height: 1.5;
}


/* ----------------------------------------------------------
   Shared section typography
---------------------------------------------------------- */

.eyebrow {
    display: block;

    margin-bottom: 13px;

    color: var(--blue-deep);

    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


h2 {
    margin: 0;

    color: var(--text);

    font-size: clamp(27px, 3vw, 42px);
    font-weight: 630;
    letter-spacing: -0.035em;
    line-height: 1.12;
}


p {
    color: var(--text-soft);
}


/* ----------------------------------------------------------
   Editorial section
---------------------------------------------------------- */

.editorial-section {
    display: grid;

    padding: clamp(74px, 9vw, 118px) 0;

    grid-template-columns:
        minmax(0, 0.95fr)
        minmax(0, 1.05fr);

    gap: clamp(50px, 9vw, 130px);

    border-bottom: 1px solid var(--line);
}


.section-heading h2 {
    max-width: 500px;
}


.section-copy {
    padding-top: 26px;
}


.section-copy p {
    margin: 0;

    max-width: 570px;

    font-size: 16px;
    line-height: 1.85;
}


.section-copy p + p {
    margin-top: 20px;
}


/* ----------------------------------------------------------
   Component workbench
---------------------------------------------------------- */

.component-showcase {
    padding: clamp(74px, 9vw, 118px) 0;

    border-bottom: 1px solid var(--line);
}


.showcase-heading {
    display: grid;

    grid-template-columns: 1fr 1fr;

    align-items: end;

    gap: 40px;

    margin-bottom: 45px;
}


.showcase-heading .eyebrow {
    grid-column: 1 / -1;

    margin-bottom: -16px;
}


.showcase-heading p {
    margin: 0;

    max-width: 530px;

    justify-self: end;

    line-height: 1.8;
}


.component-workbench {
    border: 1px solid var(--line);

    background: var(--surface);
}


.workbench-tabs {
    display: flex;

    min-height: 54px;

    align-items: stretch;

    border-bottom: 1px solid var(--line);
}


.workbench-tab {
    position: relative;

    padding: 0 24px;

    border: 0;
    border-right: 1px solid var(--line);

    background: transparent;
    color: var(--text-soft);

    font-size: 13px;
    font-weight: 620;

    cursor: pointer;
}


.workbench-tab::after {
    position: absolute;
    right: 22px;
    bottom: -1px;
    left: 22px;

    height: 2px;

    background: transparent;

    content: "";
}


.workbench-tab:hover,
.workbench-tab.is-active {
    color: var(--text);
}


.workbench-tab.is-active::after {
    background: var(--blue);
}


.preview-pane {
    display: none;

    min-height: 310px;

    padding: clamp(28px, 5vw, 58px);
}


.preview-pane.is-active {
    display: block;
}


/* Demo form */

.demo-form {
    width: min(680px, 100%);

    margin: 0 auto;
}


.field-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 22px;
}


.demo-form label > span {
    display: block;

    margin-bottom: 7px;

    color: var(--text-soft);

    font-size: 12px;
    font-weight: 650;
}


.demo-form input[type="email"],
.demo-form select {
    width: 100%;
    height: 46px;

    padding: 0 13px;

    border: 1px solid var(--line-strong);
    border-radius: 5px;

    outline: 0;

    background: var(--bg);
    color: var(--text);
}


.demo-form input[type="email"]:focus,
.demo-form select:focus {
    border-color: var(--blue);

    box-shadow: 0 0 0 3px
        color-mix(in srgb, var(--blue) 12%, transparent);
}


.check-row {
    display: flex !important;

    margin-top: 20px;

    align-items: center;

    gap: 9px;
}


.check-row span {
    margin: 0 !important;
}


.demo-actions {
    display: flex;

    margin-top: 27px;

    gap: 10px;
}


.demo-primary,
.demo-quiet {
    min-height: 41px;

    padding: 0 17px;

    border-radius: 4px;

    cursor: pointer;
}


.demo-primary {
    border: 1px solid var(--blue-deep);

    background: var(--blue-deep);
    color: #fff;
}


.demo-quiet {
    border: 1px solid var(--line);

    background: transparent;
    color: var(--text-soft);
}


/* Demo table */

.demo-table-wrap {
    overflow-x: auto;
}


.demo-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 13px;
}


.demo-table th,
.demo-table td {
    padding: 15px 14px;

    border-bottom: 1px solid var(--line);

    text-align: left;
    white-space: nowrap;
}


.demo-table th {
    color: var(--text-soft);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}


.status {
    display: inline-block;

    padding: 4px 8px;

    border-radius: 999px;

    background: var(--bg-soft);
    color: var(--text-soft);

    font-size: 11px;
    font-weight: 650;
}


.status-good {
    background:
        color-mix(in srgb, var(--good) 12%, transparent);

    color: var(--good);
}


.status-muted {
    color: var(--text-faint);
}


/* Notices */

.feedback-stack {
    display: grid;

    width: min(680px, 100%);

    margin: 0 auto;

    gap: 11px;
}


.notice {
    display: grid;

    grid-template-columns: 110px 1fr;

    padding: 14px 16px;

    border: 1px solid var(--line);
    border-left: 3px solid var(--blue);

    background: var(--bg);
}


.notice strong {
    color: var(--text);

    font-size: 13px;
}


.notice span {
    color: var(--text-soft);

    font-size: 13px;
}


.notice-success {
    border-left-color: var(--good);
}


.notice-warning {
    border-left-color: var(--warning);
}


/* ----------------------------------------------------------
   Split section
---------------------------------------------------------- */

.split-section {
    display: grid;

    padding: clamp(76px, 9vw, 118px) 0;

    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(0, 0.9fr);

    gap: clamp(50px, 9vw, 120px);

    border-bottom: 1px solid var(--line);
}


.split-lead h2 {
    max-width: 560px;
}


.split-detail p {
    margin-top: 0;

    line-height: 1.8;
}


.split-detail p + p {
    margin-top: 18px;
}


.plain-list {
    display: flex;

    margin-top: 31px;

    flex-wrap: wrap;

    border-top: 1px solid var(--line);
}


.plain-list span {
    width: 50%;

    padding: 13px 0;

    border-bottom: 1px solid var(--line);

    color: var(--text);

    font-size: 12px;
    font-weight: 620;
}


/* ----------------------------------------------------------
   Integration
---------------------------------------------------------- */

.integration-section {
    display: grid;

    padding: clamp(76px, 9vw, 118px) 0;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(350px, 0.85fr);

    gap: clamp(55px, 10vw, 140px);

    border-bottom: 1px solid var(--line);
}


.integration-copy p {
    max-width: 590px;

    margin: 22px 0 0;

    line-height: 1.82;
}


.compatibility {
    align-self: center;

    border-top: 1px solid var(--line-strong);
}


.compat-row {
    display: flex;

    min-height: 58px;

    align-items: center;
    justify-content: space-between;

    gap: 25px;

    border-bottom: 1px solid var(--line);
}


.compat-row span {
    color: var(--text-soft);

    font-size: 13px;
}


.compat-row strong {
    color: var(--text);

    font-size: 12px;
    font-weight: 700;
}


/* ----------------------------------------------------------
   Code example
---------------------------------------------------------- */

.code-section {
    display: grid;

    padding: clamp(76px, 9vw, 118px) 0;

    grid-template-columns:
        minmax(0, 0.8fr)
        minmax(450px, 1.2fr);

    gap: clamp(50px, 8vw, 110px);

    border-bottom: 1px solid var(--line);
}


.code-intro p {
    max-width: 470px;

    margin: 20px 0 0;

    line-height: 1.8;
}


.code-window {
    overflow: hidden;

    border: 1px solid #1c2940;

    background: var(--code-bg);
}


.code-window-bar {
    display: flex;

    min-height: 46px;

    padding: 0 16px;

    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #1c2940;

    color: #8293aa;

    font-size: 11px;
}


.copy-button {
    border: 0;

    background: transparent;
    color: #9ab1cc;

    font-size: 11px;

    cursor: pointer;
}


.copy-button:hover {
    color: #fff;
}


.code-window pre {
    overflow-x: auto;

    margin: 0;

    padding: 26px;

    color: var(--code-text);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;

    font-size: 13px;
    line-height: 1.75;

    tab-size: 4;
}


/* ----------------------------------------------------------
   Closing
---------------------------------------------------------- */

.closing-band {
    display: flex;

    min-height: 116px;

    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


.closing-band > div {
    display: flex;

    align-items: baseline;

    gap: 18px;
}


.closing-band strong {
    font-size: 17px;
}


.closing-band span {
    color: var(--text-soft);

    font-size: 13px;
}


.closing-band a {
    display: inline-flex;

    align-items: center;

    gap: 10px;

    text-decoration: none;

    font-size: 13px;
    font-weight: 650;
}


.closing-band a span {
    color: var(--blue);
}


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

.site-footer {
    display: flex;

    width: min(
        calc(100% - (var(--page-pad) * 2)),
        var(--content-width)
    );

    min-height: 100px;

    margin: 0 auto;

    align-items: center;
    justify-content: space-between;

    gap: 25px;

    border-top: 1px solid var(--line);

    color: var(--text-faint);

    font-size: 11px;
}


.site-footer > div:first-child {
    display: flex;

    gap: 17px;
}


.footer-links {
    display: flex;

    gap: 22px;
}


.footer-links a {
    text-decoration: none;
}


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


/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */

@media (max-width: 900px) {

    .header-inner {
        grid-template-columns: 1fr auto;
    }


    .site-nav {
        grid-column: 1 / -1;
        grid-row: 2;

        justify-content: flex-start;

        overflow-x: auto;

        border-top: 1px solid var(--line);

        scrollbar-width: none;
    }


    .site-nav::-webkit-scrollbar {
        display: none;
    }


    .site-nav a {
        padding-top: 13px;
        padding-bottom: 12px;

        white-space: nowrap;
    }


    .theme-toggle {
        grid-column: 2;
        grid-row: 1;

        margin: 10px 0;
    }


    .principle-strip {
        grid-template-columns: 1fr 1fr;
    }


    .principle-strip > div + div {
        border-left: 0;
    }


    .principle-strip > div:nth-child(even) {
        border-left: 1px solid var(--line);
    }


    .principle-strip > div:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }


    .editorial-section,
    .split-section,
    .integration-section,
    .code-section {
        grid-template-columns: 1fr;

        gap: 42px;
    }


    .showcase-heading {
        grid-template-columns: 1fr;
    }


    .showcase-heading .eyebrow {
        margin-bottom: -20px;
    }


    .showcase-heading p {
        justify-self: start;
    }


    .integration-section,
    .code-section {
        grid-template-columns: 1fr;
    }


    .compatibility {
        width: 100%;
    }

}


@media (max-width: 620px) {

    :root {
        --page-pad: 18px;
    }


    html {
        scroll-padding-top: 120px;
    }


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


    .site-nav {
        gap: 23px;
    }


    .brand-intro {
        min-height: auto;

        padding-top: 68px;
        padding-bottom: 58px;
    }


    .brand-logo {
        width: min(100%, 500px);
    }


    .brand-slogan {
        margin-top: 10px;

        font-size: 18px;
    }


    .brand-summary {
        margin-top: 15px;

        font-size: 14px;
        line-height: 1.7;
    }


    .brand-actions {
        width: 100%;

        margin-top: 27px;

        flex-direction: column;

        gap: 13px;
    }


    .principle-strip {
        grid-template-columns: 1fr;
    }


    .principle-strip > div {
        padding: 18px 4px;
    }


    .principle-strip > div:nth-child(even),
    .principle-strip > div:nth-child(n + 3) {
        border-left: 0;
        border-top: 1px solid var(--line);
    }


    .editorial-section,
    .component-showcase,
    .split-section,
    .integration-section,
    .code-section {
        padding-top: 64px;
        padding-bottom: 64px;
    }


    h2 {
        font-size: 28px;
    }


    .field-row {
        grid-template-columns: 1fr;
    }


    .workbench-tabs {
        overflow-x: auto;

        scrollbar-width: none;
    }


    .workbench-tabs::-webkit-scrollbar {
        display: none;
    }


    .workbench-tab {
        min-width: max-content;

        padding: 0 18px;
    }


    .preview-pane {
        padding: 26px 18px;
    }


    .notice {
        grid-template-columns: 1fr;

        gap: 4px;
    }


    .plain-list span {
        width: 100%;
    }


    .code-window pre {
        padding: 20px 17px;

        font-size: 12px;
    }


    .closing-band {
        padding: 30px 0;

        flex-direction: column;
        align-items: flex-start;
    }


    .closing-band > div {
        flex-direction: column;

        gap: 3px;
    }


    .site-footer {
        padding: 27px 0;

        flex-direction: column;
        align-items: flex-start;
    }


    .site-footer > div:first-child {
        flex-direction: column;

        gap: 3px;
    }

}


@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }


    *,
    *::before,
    *::after {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }

}
