/* ── MAMA palette ──────────────────────────────────────────
   Brand colors (from design spec):
   #0F0E47 — ink       (deepest background)
   #272757 — base      (primary surface)
   #505081 — line      (mid tone: borders, muted fills)
   #8686AC — frost     (light tone: accent, secondary text)
   Derived helpers live below the brand block. */

:root {
    --ink:  #0F0E47;
    --base: #272757;
    --line: #505081;
    --frost:#8686AC;

    --ink-rise:  #141258;
    --base-rise: #323267;
    --line-dim:  rgba(80, 80, 129, 0.45);
    --paper:     #EDEDFB;
    --paper-dim: #B9B9D4;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    background: var(--ink);
    color: var(--paper);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--frost);
    color: var(--ink);
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--ink);
}
::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--frost);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px;
}

a {
    color: inherit;
}

.idx {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--frost);
}

/* ── Typography helpers ─────────────────────────────────── */

.serif-italic {
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    color: var(--frost);
}

.eyebrow {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--frost);
    text-align: center;
    margin-bottom: 18px;
}

.cursor::after {
    content: '_';
    margin-left: 2px;
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ── Navigation ─────────────────────────────────────────── */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: rgba(15, 14, 71, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px dashed var(--line);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-tile {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    object-fit: cover;
    box-shadow: 0 0 0 1px var(--ink), 0 0 0 3px var(--line);
    transition: transform 0.25s;
}

.brand:hover .brand-tile {
    transform: rotate(-8deg);
}

.brand-word {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    letter-spacing: 0.35em;
    font-size: 17px;
    color: var(--paper);
}

.brand-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--frost);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--paper-dim);
    padding: 6px 0;
    position: relative;
    transition: color 0.2s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--frost);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s;
}

.nav-links a:hover {
    color: var(--paper);
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--paper);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 999px;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-sm {
    padding: 9px 20px;
    font-size: 11px;
}

.btn-primary {
    background: var(--frost);
    color: var(--ink);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(134, 134, 172, 0.3);
}

.btn-ghost {
    border-color: var(--line);
    color: var(--paper);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--frost);
    color: var(--frost);
    transform: translateY(-3px);
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
    position: relative;
    padding: 180px 0 110px;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse 65% 55% at 50% -5%, var(--base-rise), transparent 70%),
        var(--ink);
    border-bottom: 1px dashed var(--line);
}

.hero-word {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(11rem, 30vw, 26rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-dim);
    user-select: none;
    pointer-events: none;
    letter-spacing: -0.02em;
    opacity: 0.55;
}

.hero-inner {
    position: relative;
}

.hero-title {
    font-size: clamp(2.3rem, 6vw, 4.2rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    max-width: 760px;
    margin: 0 auto 22px;
}

.hero-title .serif-italic {
    font-size: 1.02em;
}

.hero-sub {
    max-width: 560px;
    margin: 0 auto 38px;
    color: var(--paper-dim);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-platforms {
    margin-top: 30px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--line);
}

.shot-wrap {
    position: relative;
    max-width: 760px;
    margin: 72px auto 0;
    transform: rotate(-1.6deg);
}

.shot-wrap::before {
    content: '';
    position: absolute;
    inset: -18px -18px 18px -18px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    transform: rotate(2.4deg);
    pointer-events: none;
}

.shot-frame {
    background: var(--base);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
    transition: transform 0.4s;
}

.shot-wrap:hover .shot-frame {
    transform: rotate(1.2deg) scale(1.005);
}

.shot-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.shot-bar span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--line);
}

.shot-bar span:first-child {
    background: var(--frost);
}

.shot-bar em {
    margin-left: 10px;
    font-family: 'Space Mono', monospace;
    font-style: normal;
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--paper-dim);
}

.shot-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Marquee ────────────────────────────────────────────── */

.marquee {
    overflow: hidden;
    border-bottom: 1px dashed var(--line);
    background: var(--base);
    padding: 16px 0;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 36s linear infinite;
}

.marquee-track span {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--paper-dim);
    white-space: nowrap;
    padding: 0 26px;
}

.marquee-track .tick {
    color: var(--frost);
    padding: 0;
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

/* ── Sections ───────────────────────────────────────────── */

.section {
    padding: 110px 0;
}

.section-alt {
    background: var(--base);
    border-top: 1px dashed var(--line);
    border-bottom: 1px dashed var(--line);
}

.section-title {
    text-align: center;
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.15;
    margin-bottom: 64px;
}

.section-intro {
    max-width: 640px;
    margin: -36px auto 20px;
    text-align: center;
    color: var(--paper-dim);
    font-size: 1.02rem;
}

.art-line {
    text-align: center;
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-size: 1.35rem;
    color: var(--paper);
    margin-bottom: 56px;
}

.art-line em {
    color: var(--frost);
    font-style: italic;
}

/* ── Bento grid ─────────────────────────────────────────── */

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.card {
    position: relative;
    background: var(--base);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 30px 28px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, background 0.3s;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--frost);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--frost);
    background: var(--base-rise);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:nth-child(1) { grid-column: span 7; }
.card:nth-child(2) { grid-column: span 5; }
.card:nth-child(3) { grid-column: span 5; }
.card:nth-child(4) { grid-column: span 7; }
.card:nth-child(5) { grid-column: span 4; }
.card:nth-child(6) { grid-column: span 8; }

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.glyph {
    font-size: 22px;
    color: var(--frost);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.card p {
    color: var(--paper-dim);
    font-size: 0.96rem;
}

.arrow {
    position: absolute;
    right: 26px;
    bottom: 22px;
    font-size: 20px;
    color: var(--frost);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s, transform 0.3s;
}

.card:hover .arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── Screenshots grid ─────────────────────────────────────── */

.screens-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.screen-item {
    position: relative;
    background: var(--ink-rise);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}

.screen-item:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--frost);
}

.screen-item img {
    display: block;
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--line-dim);
}

.screen-label {
    display: block;
    text-align: center;
    padding: 12px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--paper-dim);
}

.gallery-link {
    text-align: center;
    margin-top: 8px;
}

.gallery-link a {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.14em;
    color: var(--frost);
    text-decoration: none;
    border-bottom: 1px dashed var(--frost);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.gallery-link a:hover {
    color: var(--paper);
    border-color: var(--paper);
}

/* ── Gallery page ─────────────────────────────────────── */

.page-header {
    padding: 150px 0 60px;
    text-align: center;
    border-bottom: 1px dashed var(--line);
    background:
        radial-gradient(ellipse 65% 55% at 50% -5%, var(--base-rise), transparent 70%),
        var(--ink);
}

.page-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.page-sub {
    max-width: 520px;
    margin: 0 auto;
    color: var(--paper-dim);
    font-size: 1.05rem;
}

.gallery-section {
    padding: 60px 0 110px;
}

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

.gallery-item {
    position: relative;
    background: var(--base);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}

.gallery-item:hover {
    transform: translateY(-6px);
    border-color: var(--frost);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--line-dim);
}

.gallery-wide {
    grid-column: span 2;
}

.gallery-caption {
    padding: 16px 18px;
}

.gallery-label {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--frost);
    margin-bottom: 6px;
}

.gallery-caption p {
    font-size: 0.92rem;
    color: var(--paper-dim);
    line-height: 1.5;
}

/* ── Workflow steps ─────────────────────────────────────── */

.steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.steps::before {
    content: '';
    position: absolute;
    top: 23px;
    left: 9%;
    right: 9%;
    border-top: 1px dashed var(--line);
}

.step {
    position: relative;
    text-align: center;
    padding: 0 12px;
}

.step-num {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 1px dashed var(--frost);
    background: var(--ink);
    color: var(--frost);
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 16px;
    transition: background 0.3s, color 0.3s, transform 0.3s;
}

.step:hover .step-num {
    background: var(--frost);
    color: var(--ink);
    transform: rotate(-8deg);
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step p {
    color: var(--paper-dim);
    font-size: 0.94rem;
}

/* ── Philosophy ─────────────────────────────────────────── */

.quote {
    max-width: 720px;
    margin: 0 auto 60px;
    text-align: center;
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    line-height: 1.4;
    color: var(--paper);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 28px;
}

.philosophy-grid article {
    background: var(--ink-rise);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 34px 30px;
    transition: border-color 0.3s, transform 0.3s;
}

.philosophy-grid article:hover {
    border-color: var(--frost);
    transform: translateY(-4px);
}

.philosophy-grid h3 {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--frost);
    margin-bottom: 14px;
}

.philosophy-grid p {
    color: var(--paper-dim);
    font-size: 0.97rem;
}

.open-source {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    padding: 44px 42px;
    border: 1px dashed var(--frost);
    border-radius: 20px;
    background: var(--base);
    position: relative;
}

.open-source::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid var(--line-dim);
    border-radius: 14px;
    pointer-events: none;
}

.os-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.26em;
    color: var(--frost);
    margin-bottom: 14px;
}

.open-source h3 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.open-source p {
    color: var(--paper-dim);
    font-size: 0.96rem;
}

.open-source .serif-italic {
    color: var(--frost);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.chip {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--paper-dim);
    transition: border-color 0.2s, color 0.2s;
}

.chip:hover {
    border-color: var(--frost);
    color: var(--frost);
}

.credits {
    list-style: none;
    display: grid;
    gap: 14px;
    margin: 6px 0 24px;
}

.credits li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.credits a {
    color: var(--paper);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
    width: fit-content;
    transition: border-color 0.2s, color 0.2s;
}

.credits a:hover {
    border-color: var(--frost);
    color: var(--frost);
}

.credits span {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--line);
}

.os-license {
    font-size: 0.9rem;
}

.os-license a {
    color: var(--frost);
}

/* ── Docs page ─────────────────────────────────────────── */

.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    padding-top: 64px;
    padding-bottom: 96px;
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 92px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--base);
    padding: 24px 22px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.docs-sidebar .os-label {
    margin-bottom: 10px;
}

.doc-nav {
    list-style: none;
    margin-bottom: 20px;
}

.doc-nav ul {
    list-style: none;
    margin: 6px 0 12px 12px;
    border-left: 1px dashed var(--line-dim);
    padding-left: 12px;
}

.doc-nav a {
    display: block;
    padding: 5px 0;
    color: var(--paper-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.doc-nav > li > a {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--frost);
    font-weight: 700;
}

.doc-nav a:hover {
    color: var(--paper);
}

.doc-nav .idx {
    margin-right: 6px;
}

.doc-nav-flat {
    margin-bottom: 0;
}

.doc-content {
    max-width: 760px;
}

.doc-section {
    padding-bottom: 56px;
    margin-bottom: 56px;
    border-bottom: 1px dashed var(--line);
}

.doc-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.doc-part {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--frost);
    margin-bottom: 10px;
}

.doc-section h2 {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 18px;
}

.doc-lead {
    color: var(--paper-dim);
    font-size: 1.02rem;
    margin-bottom: 28px;
}

.doc-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 34px 0 12px;
    scroll-margin-top: 90px;
}

.doc-section h3::before {
    content: '§ ';
    color: var(--frost);
}

.doc-section h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 22px 0 8px;
    color: var(--paper);
}

.doc-section h4 em {
    font-family: 'Space Mono', monospace;
    font-style: normal;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--line);
}

.doc-section p {
    color: var(--paper-dim);
    font-size: 0.97rem;
    margin-bottom: 14px;
}

.doc-section p strong {
    color: var(--paper);
}

.doc-section code {
    font-family: 'Space Mono', monospace;
    font-size: 0.86em;
    color: var(--frost);
    background: var(--base);
    border: 1px solid var(--line-dim);
    border-radius: 5px;
    padding: 1px 6px;
    white-space: nowrap;
}

.doc-ul,
.doc-ol {
    margin: 0 0 16px 22px;
    color: var(--paper-dim);
    font-size: 0.97rem;
}

.doc-ul li,
.doc-ol li {
    margin-bottom: 8px;
}

.doc-ol > li {
    list-style: decimal;
}

.doc-ul > li {
    list-style: square;
    color: var(--paper-dim);
}

.doc-ol > li::marker,
.doc-ul > li::marker {
    color: var(--frost);
}

.code-block {
    background: var(--ink-rise);
    border: 1px solid var(--line);
    border-left: 3px solid var(--frost);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--paper);
    white-space: pre;
}

.doc-table-wrap {
    overflow-x: auto;
    margin: 16px 0 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--base);
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.doc-table th,
.doc-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-dim);
    color: var(--paper-dim);
    vertical-align: top;
}

.doc-table th {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--frost);
}

.doc-table tr:last-child th,
.doc-table tr:last-child td {
    border-bottom: none;
}

.doc-table td:first-child {
    color: var(--paper);
    font-weight: 600;
    white-space: nowrap;
}

.doc-table code {
    white-space: normal;
}

.doc-chips {
    margin: 16px 0 8px;
}

.doc-chips .chip code {
    border: none;
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.95em;
}

.doc-chips .chip {
    cursor: default;
}

.doc-chips .chip:hover {
    border-color: var(--frost);
    color: var(--frost);
}

/* ── Contribute ─────────────────────────────────────────── */

.contribute-text {
    max-width: 600px;
    margin: 0 auto 38px;
    text-align: center;
    color: var(--paper-dim);
    font-size: 1.03rem;
}

/* ── Footer ─────────────────────────────────────────────── */

.footer {
    position: relative;
    border-top: 1px dashed var(--line);
    padding: 60px 0 40px;
    overflow: hidden;
}

.footer-word {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(8rem, 22vw, 20rem);
    color: transparent;
    -webkit-text-stroke: 1px var(--line-dim);
    user-select: none;
    pointer-events: none;
    opacity: 0.4;
    letter-spacing: -0.02em;
}

.footer-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--paper-dim);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-note {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--line);
    width: 100%;
    text-align: center;
    margin-top: 28px;
}

.footer-note a {
    color: var(--frost);
    text-decoration: none;
}

/* ── Reveal animation ───────────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 960px) {
    .screens-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-wide {
        grid-column: span 2;
    }

    .steps {
        grid-template-columns: 1fr 1fr;
    }

    .steps::before {
        display: none;
    }

    .docs-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .docs-sidebar {
        position: static;
        max-height: none;
    }

    .open-source {
        grid-template-columns: 1fr;
        padding: 34px 26px;
    }

    .card:nth-child(n) {
        grid-column: span 6;
    }
}

@media (max-width: 720px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--ink-rise);
        border-bottom: 1px dashed var(--line);
        padding: 10px 0 16px;
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 15px 28px;
        border-bottom: 1px solid var(--line-dim);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero {
        padding: 140px 0 80px;
    }

    .section {
        padding: 76px 0;
    }

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

    .card:nth-child(n) {
        grid-column: span 1;
    }

    .screens-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-wide {
        grid-column: span 1;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        justify-content: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}
