/*
 * WEB APIs, UNLOCKED 
 */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap");


/* ============================================================= */
/* 01. DESIGN TOKENS & BASE STYLES */
/* ============================================================= */

:root {
    color-scheme: dark;
    --bg: #0c1020;
    --panel: #171c31;
    --panel2: #1d233b;
    --text: #f7f6ff;
    --muted: #b9bfd0;
    --lime: #c7fc65;
    --cyan: #63e9ea;
    --purple: #bb9cff;
    --line: #333b56;
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "DM Sans",system-ui,sans-serif;
    line-height: 1.65;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 800px;
    pointer-events: none;
    background: radial-gradient(ellipse at 80% 19%,#32326375,transparent 48%);
    z-index: -1;
}

h1,h2,h3,p {
    margin-top: 0;
}

h1,h2,h3 {
    font-family: "Space Grotesk",sans-serif;
    letter-spacing: -.05em;
    line-height: 1.14;
}

a {
    color: inherit;
}

button,textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a:focus-visible,button:focus-visible,textarea:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 4px;
}

.shell {
    width: min(1160px,calc(100% - 44px));
    margin-inline: auto;
}


/* ============================================================= */
/* 02. ACCESSIBILITY & HEADER */
/* ============================================================= */

.skip-link {
    position: fixed;
    z-index: 100;
    top: -100px;
    left: 18px;
    background: var(--lime);
    color: #111727;
    padding: 12px;
}

.skip-link:focus {
    top: 12px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #0c1020ec;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid #ffffff13;
}

.header-inner {
    min-height: 83px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    text-decoration: none;
    font-family: "Space Grotesk",sans-serif;
    font-weight: 700;
    font-size: 1.18rem;
    letter-spacing: -.055em;
    white-space: nowrap;
}

.brand-mark {
    color: var(--lime);
    font-size: 1.6rem;
    margin-right: 10px;
}

.brand-accent {
    color: var(--lime);
}

.primary-nav {
    display: flex;
    gap: 36px;
    align-items: center;
}

.primary-nav a {
    font-size: .88rem;
    color: #e3e4ee;
    text-decoration: none;
}

.primary-nav a:hover,.site-footer a:hover {
    color: var(--lime);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    padding: 9px 13px;
}


/* ============================================================= */
/* 03. HERO & BUTTONS */
/* ============================================================= */

.hero {
    padding-top: 100px;
    padding-bottom: 116px;
    display: grid;
    grid-template-columns: 1.06fr .94fr;
    gap: 40px;
    align-items: center;
}

.eyebrow,.section-kicker,.doc-index,.resource-topline {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .16em;
    color: var(--lime);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eyebrow-dot {
    display: inline-block;
    background: var(--lime);
    height: 9px;
    width: 9px;
    border-radius: 50%;
    box-shadow: 0 0 18px var(--lime);
}

h1 {
    font-size: clamp(3.65rem,6.5vw,6.4rem);
    margin: 23px 0 24px;
}

h1 em,h2 em {
    font-style: normal;
    color: var(--lime);
}

.hero-lead {
    color: var(--muted);
    font-size: 1.13rem;
    max-width: 550px;
}

.hero-actions,.demo-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 31px;
}

.button {
    border: 1px solid transparent;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 17px;
    padding: 14px 21px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    line-height: 1.2;
    min-height: 48px;
    transition: transform .2s,filter .2s;
}

.button:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.button-primary {
    background: var(--lime);
    color: #101527;
}

.button-outline {
    color: white;
    border-color: #626b83;
}

.button-cyan {
    background: var(--cyan);
    color: #0e1730;
}

.button-purple {
    background: var(--purple);
    color: #111527;
}

.button-small {
    padding: 12px 17px;
    min-height: 44px;
    font-size: .91rem;
}

.hero-metrics {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    margin-top: 60px;
    padding-top: 21px;
    color: var(--muted);
    font-size: .78rem;
}

.hero-metrics span {
    max-width: 145px;
}

.hero-metrics strong {
    display: block;
    color: white;
    font-family: "Space Grotesk";
    font-size: 1.65rem;
    line-height: 1.2;
}


/* ============================================================= */
/* 04. HERO GRAPHICS */
/* ============================================================= */

.hero-art {
    position: relative;
    min-height: 455px;
    display: grid;
    place-items: center;
}

.art-orbit {
    position: absolute;
    width: 390px;
    height: 390px;
    border: 1px dashed #a595ff58;
    border-radius: 50%;
    transform: rotate(-30deg);
}

.orbit-two {
    width: 480px;
    height: 300px;
    border-color: #63e9ea36;
    transform: rotate(42deg);
}

.art-center {
    position: relative;
    z-index: 2;
    width: 265px;
    height: 265px;
    transform: rotate(-12deg);
    background: linear-gradient(145deg,#b8a0fb,#856ef0);
    border: 8px solid #393263;
    border-radius: 35px;
    box-shadow: 0 25px 120px #9c83fa55;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #11132f;
}

.art-center>span {
    font-family: "Space Grotesk";
    font-size: 6rem;
    font-weight: 700;
    letter-spacing: -.13em;
}

.art-center small {
    letter-spacing: .3em;
    font-weight: 800;
}

.art-card {
    position: absolute;
    z-index: 3;
    padding: 15px 19px;
    background: #232a43;
    border: 1px solid #687191;
    border-radius: 12px;
    font-family: monospace;
    font-size: .9rem;
    box-shadow: 0 20px 50px #0006;
}

.art-top {
    top: 56px;
    right: -5px;
    transform: rotate(8deg);
}

.art-bottom {
    bottom: 61px;
    left: -7px;
    transform: rotate(-8deg);
}

.art-light {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 9px;
    background: var(--lime);
    border-radius: 50%;
}

.art-light.violet {
    background: var(--purple);
}

.art-card b {
    color: var(--lime);
    padding-left: 15px;
}

.art-spark {
    position: absolute;
    color: var(--lime);
    font-size: 3rem;
}

.spark-one {
    left: 11%;
    top: 25%;
}

.spark-two {
    right: 10%;
    bottom: 12%;
    color: var(--cyan);
}


/* ============================================================= */
/* 05. SECTION LAYOUT & OVERVIEW */
/* ============================================================= */

.section {
    padding: 110px 0;
}

.overview-section {
    background: #12172a;
}

.section-kicker {
    margin: 0 0 20px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 55px;
    align-items: end;
    margin-bottom: 48px;
}

.section-heading h2 {
    font-size: clamp(2.4rem,4vw,4.15rem);
    max-width: 640px;
    margin: 0;
}

.section-heading>p {
    max-width: 415px;
    color: var(--muted);
    margin: 0;
}

.overview-grid,.demo-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 20px;
}

.info-card {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 29px;
    border-radius: var(--radius);
}

.info-icon {
    display: grid;
    place-items: center;
    border-radius: 15px;
    width: 56px;
    height: 56px;
    font-size: 2rem;
    background: #c7fc6520;
    color: var(--lime);
    margin-bottom: 25px;
}

.info-icon.cyan {
    background: #63e9ea1a;
    color: var(--cyan);
}

.info-icon.purple {
    background: #bb9cff1e;
    color: var(--purple);
}

.info-card h3 {
    font-size: 1.3rem;
}

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

.concept-strip {
    margin-top: 20px;
    padding: 27px 29px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: linear-gradient(105deg,#24334b,#23243c);
    border: 1px solid #50637c;
    border-radius: 18px;
}

.tiny-label {
    font-size: .65rem;
    font-weight: 800;
    color: var(--cyan);
    letter-spacing: .15em;
}

.concept-strip p {
    margin: 9px 0 0;
}

.concept-strip code {
    background: #0b1324;
    color: var(--lime);
    padding: 15px;
    border-radius: 10px;
    max-width: 100%;
    overflow-wrap: anywhere;
}


/* ============================================================= */
/* 06. INTERACTIVE WEB API DEMOS */
/* ============================================================= */

.demos-section {
    background: #0c1020;
}

.demo-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px;
    background: var(--panel);
    border: 1px solid #424b68;
    border-radius: 22px;
}

.demo-top {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.demo-no {
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: #b5bfd5;
}

.pill {
    border: 1px solid #97cc5a;
    background: #c7fc6513;
    color: var(--lime);
    font-size: .7rem;
    font-weight: 800;
    border-radius: 50px;
    padding: 4px 10px;
}

.pill-cyan {
    border-color: #39c3c8;
    color: var(--cyan);
    background: #63e9ea10;
}

.pill-purple {
    border-color: #9675d8;
    color: var(--purple);
    background: #bb9cff10;
}

.demo-glyph {
    font-size: 3.5rem;
    color: var(--lime);
    line-height: 1;
    margin: 29px 0 20px;
}

.cyan-text {
    color: var(--cyan);
}

.purple-text {
    color: var(--purple);
}

.demo-card h3 {
    font-size: 1.95rem;
    margin-bottom: 11px;
}

.demo-card>p:not(.status) {
    color: var(--muted);
    min-height: 104px;
}

.demo-card label {
    font-size: .8rem;
    font-weight: 800;
    margin: 13px 0 9px;
}

.demo-card textarea {
    resize: vertical;
    min-height: 94px;
    width: 100%;
    padding: 13px;
    border: 1px solid #5b6882;
    background: #0e1527;
    color: var(--text);
    border-radius: 10px;
}

.demo-actions {
    margin-top: 17px;
    min-height: 48px;
}

.text-button {
    color: #e8e7f6;
    background: none;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 12px;
}

.status {
    font-size: .81rem;
    color: #b4c7d3;
    min-height: 54px;
    margin: 16px 0;
}

.snippet {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    overflow-wrap: anywhere;
}

.snippet span {
    display: block;
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .13em;
    color: #9ca7bf;
    margin-bottom: 8px;
}

.snippet code {
    color: var(--lime);
    font-size: .75rem;
}

.dialog-demo-art {
    height: 105px;
    position: relative;
    margin-top: 5px;
    border-radius: 12px;
    background: #11172b;
    display: flex;
    gap: 7px;
    padding: 14px;
}

.dialog-demo-art>span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7b8aa9;
}

.dialog-demo-art>div {
    position: absolute;
    inset: 32px 50px 14px;
    border: 1px solid #9a86db;
    background: #343056;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--purple);
    font-weight: 800;
}

.demo-footnote {
    color: var(--muted);
    font-size: .84rem;
    margin-top: 26px;
}

.demo-footnote strong {
    color: var(--lime);
}


/* ============================================================= */
/* 07. STANDARDS OVERVIEW */
/* ============================================================= */

.standards-section {
    background: #171b2f;
}

.standards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.standard-item {
    display: flex;
    gap: 22px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #1c2237;
}

.standard-item>span {
    font-family: "Space Grotesk";
    color: var(--lime);
    font-size: 1.9rem;
}

.standard-item h3 {
    font-size: 1.35rem;
    margin-bottom: 9px;
}

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


/* ============================================================= */
/* 08. PROJECT DOCUMENTATION */
/* ============================================================= */

.documentation-section {
    background: #0e1425;
}

.docs-layout {
    display: grid;
    grid-template-columns: minmax(0,1.65fr) minmax(250px,.82fr);
    gap: 24px;
    align-items: start;
}

.docs-main {
    display: grid;
    gap: 18px;
}

.doc-block {
    padding: 31px;
    background: #191f34;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.doc-index {
    font-size: .68rem;
}

.doc-block h3 {
    font-size: 1.75rem;
    margin: 15px 0;
}

.doc-block p,.doc-block li {
    color: var(--muted);
}

.doc-block p:last-child {
    margin-bottom: 0;
}

.checklist {
    padding-left: 21px;
}

.checklist li {
    margin-bottom: 8px;
}

.edit-note {
    border-left: 3px solid var(--cyan);
    padding-left: 14px;
}

.edit-note strong {
    color: var(--cyan);
}

.resource-panel {
    position: sticky;
    top: 107px;
    padding: 30px;
    background: var(--lime);
    border-radius: 19px;
    color: #17201e;
}

.resource-topline {
    color: #3a5140;
}

.resource-panel h3 {
    font-size: 2rem;
    margin: 16px 0;
}

.resource-panel p {
    color: #374a42;
}

.resource-panel>a {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    text-decoration: none;
    border-bottom: 1px solid #627a575e;
    padding: 14px 0;
    font-weight: 700;
    font-size: .89rem;
}

.resource-panel>a:hover {
    text-decoration: underline;
}

.resource-note {
    margin-top: 29px;
    border-radius: 11px;
    background: #e6ffb4;
    padding: 20px;
}

.resource-note p {
    margin: 5px 0 0;
    font-size: .86rem;
}


/* ============================================================= */
/* 09. FOOTER */
/* ============================================================= */

.site-footer {
    background: #090e1b;
    border-top: 1px solid var(--line);
    padding: 36px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.footer-inner p {
    color: var(--muted);
    font-size: .8rem;
    margin: 3px 0 0;
}

.footer-inner>a {
    font-size: .85rem;
    text-decoration: none;
}


/* ============================================================= */
/* 10. NATIVE DIALOG */
/* ============================================================= */

dialog {
    border: 1px solid var(--purple);
    background: #202641;
    color: white;
    border-radius: 21px;
    width: min(480px,calc(100% - 36px));
    padding: 0;
    box-shadow: 0 24px 100px #000b;
}

dialog::backdrop {
    background: #050714bb;
    backdrop-filter: blur(5px);
}

.modal-content {
    padding: 40px;
}

.modal-spark {
    font-size: 2.4rem;
    color: var(--purple);
}

.modal-content h2 {
    font-size: 2.25rem;
}

.modal-content p:not(.section-kicker) {
    color: var(--muted);
}

.modal-content code {
    color: var(--lime);
}


/* ============================================================= */
/* 11. RESPONSIVE LAYOUT & REDUCED MOTION */
/* ============================================================= */

@media (max-width:1000px) {
    .hero {
        grid-template-columns: 1fr .8fr;
    }

    .art-orbit {
        width: 270px;
        height: 270px;
    }

    .orbit-two {
        width: 340px;
        height: 210px;
    }

    .art-center {
        width: 200px;
        height: 200px;
    }

    .art-center>span {
        font-size: 4.8rem;
    }

    .art-card {
        font-size: .7rem;
    }

    .overview-grid,.demo-grid {
        gap: 12px;
    }

    .demo-card {
        padding: 21px;
    }

    .demo-top {
        flex-wrap: wrap;
    }

    .section-heading {
        gap: 25px;
    }
}

@media (max-width:750px) {
    .header-inner {
        min-height: 69px;
    }

    .menu-toggle {
        display: block;
    }

    .primary-nav {
        display: none;
        position: absolute;
        top: 69px;
        left: 0;
        right: 0;
        background: #171c31;
        padding: 18px 22px;
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .primary-nav.is-open {
        display: flex;
    }

    .primary-nav a {
        padding: 12px;
    }

    .hero {
        padding: 75px 0;
        grid-template-columns: 1fr;
    }

    .hero-art {
        min-height: 330px;
        max-width: 460px;
        width: 100%;
        margin: auto;
    }

    .hero h1 {
        font-size: clamp(3rem,10vw,5rem);
    }

    .hero-metrics {
        margin-top: 38px;
    }

    .section {
        padding: 75px 0;
    }

    .section-heading {
        display: block;
    }

    .section-heading>p {
        margin-top: 20px;
    }

    .overview-grid,.demo-grid,.standards-grid,.docs-layout {
        grid-template-columns: 1fr;
    }

    .demo-card>p:not(.status) {
        min-height: 0;
    }

    .resource-panel {
        position: static;
    }

    .demo-grid {
        gap: 20px;
    }

    .concept-strip {
        padding: 22px;
    }
}

@media (max-width:430px) {
    .shell {
        width: min(100% - 30px,1160px);
    }

    .hero-actions .button {
        width: 100%;
    }

    .hero-metrics {
        gap: 13px;
    }

    .hero-metrics span {
        flex: 1;
        min-width: 90px;
    }

    .hero-art {
        min-height: 285px;
    }

    .art-center {
        width: 165px;
        height: 165px;
        border-width: 5px;
    }

    .art-center>span {
        font-size: 4rem;
    }

    .art-card {
        padding: 10px;
    }

    .art-top {
        top: 30px;
        right: 0;
    }

    .art-bottom {
        bottom: 20px;
        left: 0;
    }

    .art-orbit {
        width: 235px;
        height: 235px;
    }

    .orbit-two {
        width: 280px;
        height: 190px;
    }

    .standard-item {
        padding: 21px;
    }

    .doc-block {
        padding: 24px;
    }
}

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

    *,*::before,*::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}


/* ============================================================= */
/* 12. SPECIFICATIONS & COMPARISON CARDS */
/* ============================================================= */

.specs-section {
    background: linear-gradient(150deg,#111a30,#0b1020);
}

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

.spec-card {
    background: #18223a;
    border: 1px solid #384460;
    border-radius: 20px;
    padding: 1.6rem;
    min-width: 0;
}

.spec-card h3 {
    font-size: 1.45rem;
    margin: .9rem 0;
}

.spec-card p {
    line-height: 1.7;
    color: #d0d9e9;
}

.spec-card a,.doc-copy a {
    color: #91e9f5;
    text-underline-offset: 4px;
}

.spec-card code,.spec-takeaway code,.doc-copy code {
    overflow-wrap: anywhere;
}

.spec-takeaway {
    background: #19233a;
    border-left: 4px solid #c2ef63;
    padding: 1.5rem;
    border-radius: 12px;
    max-width: 100%;
}

.spec-takeaway p {
    line-height: 1.7;
}


/* ============================================================= */
/* 13. EXPANDED DOCUMENTATION PAGE */
/* ============================================================= */

.doc-cta {
    margin: 0 0 2rem;
}

.doc-hero {
    padding-top: 7rem;
    background: radial-gradient(circle at 80% 30%,#342451,#0c1020 60%);
}

.doc-hero h1 {
    font-size: clamp(2.9rem,7vw,5.7rem);
    line-height: 1.05;
    max-width: 900px;
}

.doc-hero h1 em {
    color: #b7eb71;
}

.doc-lede {
    font-size: 1.2rem;
    line-height: 1.7;
    max-width: 800px;
    color: #d5dfed;
    margin-bottom: 2rem;
}

.doc-copy {
    max-width: 1050px;
    color: #d7e1ed;
    line-height: 1.8;
}

.doc-copy h3 {
    color: #f5f7ff;
    font-size: 1.45rem;
    margin: 2rem 0 .7rem;
}

.doc-copy li {
    margin: .45rem 0;
}

.doc-copy ul {
    padding-left: 1.4rem;
}

.alt-section {
    background: #111b30;
}

.table-scroll {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #3c4b65;
    border-radius: 15px;
}

.project-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 700px;
    text-align: left;
}

.project-table th,.project-table td {
    padding: 1rem;
    vertical-align: top;
    border-bottom: 1px solid #3c4b65;
}

.project-table thead {
    background: #263650;
    color: #fff;
}

.project-table tbody tr:nth-child(even) {
    background: #17223a;
}

.project-table a {
    color: #91e9f5;
}

.note-box {
    background: #26324a;
    border-left: 4px solid #bde96f;
    border-radius: 7px;
    padding: 1rem 1.3rem;
}

.doc-bottom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}


/* ============================================================= */
/* 14. DOCUMENTATION RESPONSIVENESS */
/* ============================================================= */

@media (max-width:850px) {
    .spec-grid {
        grid-template-columns: 1fr;
    }

    .doc-hero {
        padding-top: 5rem;
    }
}
