/* ==========================================================================
   Kook: design tokens

   Palette, type, and motion values match the product itself (login, emails,
   in-app UI): warm near-black, cream text, one signal-orange accent, mint
   for positive states. This page extends that system rather than inventing
   a new one, since it's a marketing page for a product that already has a voice.
   ========================================================================== */

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/ibm-plex-mono-600.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/ibm-plex-mono-700.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-variable.woff2') format('woff2');
}

:root {
    /* Color */
    --bg: #0b0d10;
    --panel: #101216;
    --panel-raised: #14171c;
    --border: #242a33;
    --border-soft: #1b1f26;
    --text: #f3f1ea;
    --text-muted: #8a93a6;
    --text-dim: #5c6472;
    --signal: #ff7a33;
    --signal-strong: #ff9052;
    --mint: #57d9a3;
    --red: #ef5a5a;

    /* Type */
    --font-display: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --font-body:
        'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
        sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Layout */
    --container: 1160px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    /* Motion */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast: 160ms;
    --dur-med: 420ms;
}

/* ==========================================================================
   Reset + base
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    overflow-wrap: break-word;
}

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

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

::selection {
    background: rgba(255, 122, 51, 0.35);
    color: var(--text);
}

:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 200;
    padding: 10px 16px;
    background: var(--signal);
    color: #0b0d10;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus-visible {
    top: 16px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--signal);
    box-shadow: 0 0 0 3px rgba(255, 122, 51, 0.18);
    flex-shrink: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

.section-heading {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    max-width: 22ch;
}

.section-lede {
    margin-top: 14px;
    max-width: 52ch;
    color: var(--text-muted);
    font-size: 16.5px;
    line-height: 1.6;
}

.section-head {
    margin-bottom: 48px;
}

code,
.mono {
    font-family: var(--font-mono);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 14.5px;
    white-space: nowrap;
    transition:
        transform var(--dur-fast) var(--ease),
        background var(--dur-fast) var(--ease),
        border-color var(--dur-fast) var(--ease);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--signal);
    color: #14100a;
    border: 1px solid var(--signal);
}

.btn-primary:hover {
    background: var(--signal-strong);
    border-color: var(--signal-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--text-dim);
    background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
    height: 38px;
    padding: 0 16px;
    font-size: 13.5px;
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.nav-wrap {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding-inline: 16px;
    pointer-events: none;
}

.nav {
    pointer-events: auto;
    width: 100%;
    max-width: 920px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 8px 8px 18px;
    border-radius: var(--radius-pill);
    background: rgba(16, 18, 22, 0.72);
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.6);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.02em;
}

.nav-brand img {
    width: 26px;
    height: 26px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
    color: var(--text-muted);
}

.nav-links a {
    transition: color var(--dur-fast) var(--ease);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text);
}

.nav-toggle svg {
    width: 20px;
    height: 20px;
}

.nav-sheet {
    display: none;
}

@media (max-width: 760px) {
    .nav-links {
        display: none;
    }

    .nav-actions .btn-ghost,
    .nav-actions .btn-primary {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-sheet {
        pointer-events: auto;
        position: fixed;
        top: 74px;
        left: 16px;
        right: 16px;
        z-index: 99;
        flex-direction: column;
        gap: 4px;
        padding: 14px;
        background: rgba(16, 18, 22, 0.96);
        border: 1px solid var(--border-soft);
        border-radius: var(--radius-md);
        backdrop-filter: blur(16px);
        opacity: 0;
        transform: translateY(-8px);
        transition:
            opacity var(--dur-fast) var(--ease),
            transform var(--dur-fast) var(--ease);
    }

    .nav-sheet.is-open {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-sheet a {
        padding: 12px 10px;
        border-radius: var(--radius-sm);
        color: var(--text-muted);
        font-size: 15px;
    }

    .nav-sheet a:hover {
        color: var(--text);
        background: rgba(255, 255, 255, 0.04);
    }

    .nav-sheet .btn {
        margin-top: 6px;
        width: 100%;
    }

    /* .nav-sheet a's color rule above outranks .btn-primary's on
       specificity alone - restate it here so the button keeps readable
       dark text on its orange fill instead of inheriting the muted link
       color. */
    .nav-sheet a.btn-primary,
    .nav-sheet a.btn-primary:hover {
        color: #14100a;
    }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    position: relative;
    padding: 168px 0 96px;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -260px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 560px;
    background: radial-gradient(
        closest-side,
        rgba(255, 122, 51, 0.16),
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.hero h1 {
    width: 100%;
    min-width: 0;
    margin-top: 22px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 0.98;
    max-width: 16ch;
    overflow-wrap: break-word;
}

.hero-accent {
    position: relative;
    color: var(--signal);
}

.hero-lede {
    width: 100%;
    min-width: 0;
    margin-top: 26px;
    max-width: 54ch;
    font-size: clamp(16px, 2vw, 18.5px);
    color: var(--text-muted);
    overflow-wrap: break-word;
}

.hero-actions {
    margin-top: 36px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.copy-btn {
    position: relative;
}

.copy-btn .copy-label-default,
.copy-btn .copy-label-done {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-btn .copy-label-done {
    display: none;
    color: var(--mint);
}

.copy-btn.is-copied .copy-label-default {
    display: none;
}

.copy-btn.is-copied .copy-label-done {
    display: inline-flex;
}

/* Gateway flow diagram: events from each provider travel into Kook, get
   verified, and are relayed on to your server. Real topology, not
   decoration - this is what the arrows in "webhook gateway" actually mean. */

.gateway-flow {
    margin-top: 56px;
    width: 100%;
    min-width: 0;
    max-width: 660px;
}

.gateway-flow svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.flow-path {
    fill: none;
    stroke: var(--border);
    stroke-width: 1.5;
}

.flow-node {
    fill: var(--panel-raised);
    stroke: var(--border);
    stroke-width: 1.5;
}

.flow-node-server {
    fill: var(--panel-raised);
    stroke: var(--mint);
}

.flow-server-glyph {
    stroke: var(--mint);
    stroke-width: 1.2;
    stroke-linecap: round;
}

.flow-label {
    fill: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    text-anchor: middle;
}

.flow-label-hub {
    fill: var(--text);
    font-weight: 600;
    font-size: 12.5px;
}

.flow-hub {
    fill: var(--panel-raised);
    stroke: var(--signal);
    stroke-width: 1.5;
}

.flow-hub-signal {
    stroke: var(--signal);
    stroke-width: 3;
    stroke-linecap: round;
}

.flow-hub-dot {
    fill: var(--signal);
}

.flow-pulse {
    fill: var(--signal);
    filter: drop-shadow(0 0 4px rgba(255, 122, 51, 0.75));
    opacity: 0;
}

.flow-pulse-out {
    fill: var(--mint);
    filter: drop-shadow(0 0 4px rgba(87, 217, 163, 0.75));
}

@media (max-width: 640px) {
    .flow-label {
        font-size: 15px;
    }

    .flow-label-hub {
        font-size: 15.5px;
    }
}

/* Terminal panel: the signature element, a real (representative) trace of
   what using Kook looks like, not decoration. */

.terminal {
    margin-top: 64px;
    width: 100%;
    min-width: 0;
    max-width: 660px;
    text-align: left;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--panel-raised), var(--panel));
    box-shadow: 0 40px 80px -32px rgba(0, 0, 0, 0.65);
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border-soft);
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-dim);
}

.terminal-bar .method {
    color: var(--mint);
    font-weight: 600;
}

.terminal-bar .path {
    color: var(--text-muted);
}

.terminal-body {
    padding: 20px 22px 24px;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.9;
    min-height: 212px;
}

.term-line {
    display: flex;
    gap: 10px;
    opacity: 0;
    transform: translateY(4px);
    white-space: pre-wrap;
}

.term-line.is-visible {
    animation: term-in var(--dur-med) var(--ease) forwards;
}

@keyframes term-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.term-line .glyph {
    flex-shrink: 0;
    width: 14px;
}

.term-ok .glyph {
    color: var(--mint);
}

.term-fail .glyph {
    color: var(--red);
}

.term-wait .glyph {
    color: var(--signal);
}

.term-line .msg {
    color: var(--text-muted);
}

.term-line .hi {
    color: var(--text);
}

.term-gap {
    height: 6px;
}

.term-cursor {
    display: inline-block;
    width: 7px;
    height: 15px;
    background: var(--signal);
    margin-left: 2px;
    vertical-align: -2px;
    animation: blink 1.1s step-end infinite;
}

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

/* ==========================================================================
   Providers strip
   ========================================================================== */

.providers {
    padding: 40px 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.providers-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
}

.provider-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 34px;
}

.provider-row span {
    font-family: var(--font-mono);
    font-size: 14.5px;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.provider-row .plus {
    color: var(--text-dim);
}

/* ==========================================================================
   Feature grid
   ========================================================================== */

.features {
    padding: 120px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-soft);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.feature-card {
    background: var(--panel);
    padding: 32px 28px;
    transition: background var(--dur-fast) var(--ease);
}

.feature-card:hover {
    background: var(--panel-raised);
}

.feature-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 122, 51, 0.1);
    color: var(--signal);
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 19px;
    height: 19px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
}

.feature-card p {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.65;
}

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

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

/* ==========================================================================
   How it works
   ========================================================================== */

.flow {
    padding: 0 0 120px;
}

.flow-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    counter-reset: step;
}

.flow-step {
    position: relative;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.flow-step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    display: block;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--signal);
    margin-bottom: 16px;
}

.flow-step h3 {
    font-size: 17px;
    font-weight: 600;
}

.flow-step p {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.65;
    max-width: 34ch;
}

@media (max-width: 860px) {
    .flow-steps {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

/* Retry timeline: real, sequential timing data, not decoration */

.retry {
    margin-top: 88px;
    padding: 40px 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--panel);
}

.retry-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 34px;
}

.retry-head h3 {
    font-size: 18px;
    font-weight: 600;
}

.retry-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.retry-line {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.retry-line::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 1px;
    background: var(--border);
}

.retry-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.retry-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--panel);
    border: 2px solid var(--text-dim);
    z-index: 1;
}

.retry-node.is-final .retry-dot {
    border-color: var(--signal);
    background: var(--signal);
}

.retry-node span {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
}

.retry-node.is-final span {
    color: var(--text);
    font-weight: 600;
}

@media (max-width: 640px) {
    .retry {
        padding: 28px 18px;
    }

    .retry-node span {
        font-size: 10.5px;
    }
}

/* ==========================================================================
   Modes
   ========================================================================== */

.modes {
    padding: 0 0 120px;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.mode-card {
    min-width: 0;
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--panel);
}

.mode-tag {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    margin: 0 0 18px;
}

.mode-tag-managed {
    color: var(--signal);
    border-color: rgba(255, 122, 51, 0.4);
}

.mode-card h3 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0;
}

.mode-desc {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.65;
}

.mode-card ul {
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mode-card li {
    position: relative;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.6;
}

.mode-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
}

.mode-card-managed li::before {
    background: var(--signal);
}

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

/* ==========================================================================
   Self-hosting
   ========================================================================== */

.hosting {
    padding: 0 0 120px;
}

.hosting-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--panel);
}

.hosting-copy {
    min-width: 0;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hosting-copy ul {
    margin: 22px 0 28px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hosting-copy li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14.5px;
}

.hosting-copy li svg {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    color: var(--mint);
    flex-shrink: 0;
}

.hosting-copy li span {
    flex: 1;
    min-width: 0;
}

.hosting-code {
    min-width: 0;
    padding: 48px 40px;
    background: var(--bg);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.code-block {
    position: relative;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--panel);
    overflow: hidden;
}

.code-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-soft);
}

.code-block-head span {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.code-block-copy {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-muted);
    transition: color var(--dur-fast) var(--ease);
}

.code-block-copy:hover {
    color: var(--text);
}

.code-block-copy svg {
    width: 15px;
    height: 15px;
}

.code-block-copy .check-icon {
    display: none;
    color: var(--mint);
}

.code-block-copy.is-copied .default-icon {
    display: none;
}

.code-block-copy.is-copied .check-icon {
    display: inline-flex;
}

.code-block pre {
    margin: 0;
    padding: 16px 18px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-muted);
    overflow-x: auto;
}

.code-block pre .cmd {
    color: var(--text);
}

.code-block pre .rem {
    color: var(--text-dim);
}

@media (max-width: 860px) {
    .hosting-panel {
        grid-template-columns: 1fr;
    }

    .hosting-code {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: 48px 0 40px;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand img {
    width: 24px;
    height: 24px;
}

.footer-brand p {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-dim);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    font-size: 13.5px;
    color: var(--text-muted);
}

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

/* ==========================================================================
   Back to top
   ========================================================================== */

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--panel-raised);
    border: 1px solid var(--border);
    color: var(--text-muted);
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
        opacity var(--dur-fast) var(--ease),
        transform var(--dur-fast) var(--ease),
        color var(--dur-fast) var(--ease),
        border-color var(--dur-fast) var(--ease),
        visibility 0s linear var(--dur-fast);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

.back-to-top:hover {
    color: var(--text);
    border-color: var(--text-dim);
}

.back-to-top svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity var(--dur-med) var(--ease),
        transform var(--dur-med) var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   Section rhythm
   ========================================================================== */

section {
    position: relative;
}
