/* r33 owner: footer-command-motion-responsive. Legacy header and navigation selectors removed; footer, command-palette, motion, responsive content, and print responsibilities remain. */
/* Footer and command palette
   ========================================================================== */

.site-footer {
    position: relative;
    padding: clamp(5rem, 10vw, 8rem) 0 2rem;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
}

.site-footer__signal {
    display: grid;
    padding-bottom: clamp(4rem, 8vw, 7rem);
    grid-template-columns: 14rem 1fr;
    gap: 2rem;
    align-items: start;
    border-bottom: 1px solid var(--line);
}

.footer-declaration {
    max-width: 67rem;
    margin-bottom: 0;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 6.3rem);
    letter-spacing: -0.045em;
    line-height: 0.95;
    text-transform: uppercase;
}

.footer-declaration strong {
    color: var(--signal);
}

.site-footer__grid {
    display: grid;
    padding-block: 4rem;
    grid-template-columns: 1.8fr repeat(3, 1fr);
    gap: 3rem;
}

.site-footer__grid > div:first-child p {
    max-width: 28rem;
    color: var(--muted);
}

.site-footer__grid > div:not(:first-child) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.site-footer__grid a:not(.brand) {
    margin-bottom: 0.55rem;
    color: var(--muted);
    font-size: 0.85rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer__grid a:not(.brand):hover {
    color: var(--signal);
    transform: translateX(0.2rem);
}

.site-footer__grid > div:last-child p:last-child {
    max-width: 18rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.brand--footer {
    margin-bottom: 1.4rem;
}

.brand--footer .brand__word strong {
    font-size: 2rem;
}

.footer-title {
    margin-bottom: 1rem !important;
    color: var(--text) !important;
    font-family: var(--font-mono);
    font-size: 0.67rem !important;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-footer__base {
    display: flex;
    padding-top: 1.6rem;
    gap: 2rem;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.site-footer__base p {
    margin-bottom: 0;
}

.command-palette {
    width: min(43rem, calc(100vw - 1.5rem));
    max-height: min(38rem, calc(100svh - 2rem));
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 3rem 9rem rgba(0, 0, 0, 0.65);
}

.command-palette__top {
    display: grid;
    min-height: 4.2rem;
    padding: 0.75rem 1rem;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.command-palette__top > span {
    color: var(--signal);
    font-size: 1.3rem;
}

.command-palette__top input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: 1rem;
}

.command-palette__top button {
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    color: var(--muted);
    background: transparent;
    font-family: var(--font-mono);
    font-size: 0.64rem;
}

.command-palette__results {
    max-height: 31rem;
    padding: 0.55rem;
    overflow-y: auto;
}

.command-result {
    display: grid;
    padding: 0.85rem 1rem;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.command-result:hover,
.command-result:focus {
    background: rgba(var(--signal-rgb), 0.08);
}

.command-result strong {
    display: block;
    margin-bottom: 0.2rem;
}

.command-result span {
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    text-transform: uppercase;
}

.command-result em {
    align-self: center;
    color: var(--signal);
    font-style: normal;
}

.command-empty {
    padding: 2rem;
    margin: 0;
    color: var(--faint);
    text-align: center;
}

/* Error
   ========================================================================== */

.error-signal {
    display: grid;
    min-height: 100svh;
    padding-top: var(--header-h);
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(var(--signal-rgb), 0.13), transparent 30rem);
}

.error-signal__inner {
    padding-block: 5rem;
    text-align: center;
}

.error-signal p:not(.eyebrow) {
    margin: 2rem 0;
    color: var(--muted);
    font-size: 1.2rem;
}

/* Reveal and micro-interactions
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(2rem);
    transition:
        opacity 0.8s var(--ease),
        transform 0.8s var(--ease);
}

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

.reveal:nth-child(2) {
    transition-delay: 0.06s;
}

.reveal:nth-child(3) {
    transition-delay: 0.11s;
}

.reveal:nth-child(4) {
    transition-delay: 0.16s;
}

.reveal:nth-child(5) {
    transition-delay: 0.21s;
}

.reveal:nth-child(6) {
    transition-delay: 0.26s;
}

.is-filtered-out {
    display: none !important;
}

/* Animations
   ========================================================================== */

@keyframes slow-spin {
    to { transform: rotate(360deg); }
}

@keyframes breathe {
    0%, 100% {
        box-shadow:
            inset 0 0 5rem rgba(var(--signal-rgb), 0.08),
            0 0 3rem rgba(var(--signal-rgb), 0.06);
        transform: scale(1);
    }
    50% {
        box-shadow:
            inset 0 0 6rem rgba(var(--signal-rgb), 0.14),
            0 0 5rem rgba(var(--signal-rgb), 0.13);
        transform: scale(1.025);
    }
}

@keyframes background-drift {
    to { transform: translate3d(8rem, 8rem, 0); }
}

/* Responsive
   ========================================================================== */

@media (max-width: 72rem) {
    :root {
        --shell: min(100% - 2rem, 76rem);
    }

    .hero__inner {
        grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.45fr);
    }

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

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

    .theme-orbit__node {
        width: clamp(6rem, 12vw, 8.3rem);
    }
}

@media (max-width: 58rem) {
    :root {
        --header-h: 4.7rem;
    }

    .hero {
        min-height: auto;
    }

    .hero__inner,
    .page-hero__inner {
        min-height: auto;
        grid-template-columns: 1fr;
        align-items: start;
    }

    .hero__inner {
        padding-block: 6rem 4rem;
    }

    .hero-terminal {
        width: min(100%, 31rem);
        margin: 0;
        justify-self: end;
    }

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

    .hero__metrics div:nth-child(2) {
        border-right: 0;
    }

    .hero__metrics div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .page-hero {
        min-height: 70svh;
    }

    .page-hero__inner {
        min-height: calc(70svh - var(--header-h));
        gap: 2.5rem;
        align-content: center;
    }

    .page-hero__aside {
        max-width: 38rem;
    }

    .section-heading--split,
    .method-preview,
    .boundary-grid,
    .name-grid,
    .archive-note,
    .diagnostic-grid,
    .source-layers,
    .source-check,
    .prose-layout {
        grid-template-columns: 1fr;
    }

    .section-heading--split > p,
    .section-heading--split > a {
        justify-self: start;
    }

    .method-preview__copy,
    .diagnostic-copy,
    .source-layers__copy,
    .source-check__title,
    .prose-layout__rail {
        position: static;
    }

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

    .sequence-engine__rail button {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sequence-engine__rail button:last-child {
        border-bottom: 0;
    }

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

    .sequence-engine__number {
        font-size: 8rem;
    }

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

    .model-switcher__tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .model-switcher__tabs button {
        border-right: 1px solid var(--line);
    }

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

    .model-switcher__mark {
        width: 9rem;
    }

    .theme-orbit {
        display: grid;
        width: 100%;
        aspect-ratio: auto;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .theme-orbit__rings {
        display: none;
    }

    .theme-orbit__core {
        position: relative;
        top: auto;
        left: auto;
        width: auto;
        min-height: 12rem;
        aspect-ratio: auto;
        grid-column: 1 / -1;
        border-radius: var(--radius-lg);
        transform: none;
    }

    .theme-orbit__node {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        min-height: 7rem;
        transform: none;
    }

    .theme-orbit__node:hover,
    .theme-orbit__node.is-active {
        transform: translateY(-0.2rem);
    }

    .compare-row {
        grid-template-columns: 7rem repeat(2, minmax(0, 1fr));
    }

    .diagnostic-result {
        grid-column: 1;
    }

    .source-layers__stack li {
        position: relative;
        top: auto;
    }

    .site-footer__signal,
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__grid > div:first-child {
        grid-column: 1 / -1;
    }

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

    .archive-strip .button {
        justify-self: start;
    }
}

@media (max-width: 42rem) {
    :root {
        --shell: calc(100% - 1.25rem);
    }

    body {
        font-size: 0.96rem;
    }

    .display--hero {
        font-size: clamp(4.2rem, 22vw, 7.5rem);
    }

    .display--page {
        font-size: clamp(3.5rem, 18vw, 6.6rem);
    }

    h2 {
        font-size: clamp(2.4rem, 13vw, 4.6rem);
    }

    .hero__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .hero__metrics {
        margin-bottom: 0.75rem;
    }

    .hero__metrics div {
        min-height: 5rem;
        padding: 0.8rem;
        align-items: flex-start;
        flex-direction: column;
    }

    .hero__metrics strong {
        font-size: 2.5rem;
    }

    .theme-preview-grid,
    .theme-atlas-grid,
    .source-grid,
    .grade-grid,
    .principle-grid,
    .commitment-grid,
    .rules-grid {
        grid-template-columns: 1fr;
    }

    .theme-preview-card,
    .theme-atlas-card,
    .source-card {
        min-height: 25rem;
    }

    .section-heading--split {
        gap: 1.5rem;
    }

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

    .model-switcher__tabs button {
        border-right: 0;
    }

    .model-switcher__display {
        padding: 1.5rem;
    }

    .model-switcher__display dl div {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .manifesto-band h2 {
        font-size: clamp(3.1rem, 16vw, 5.7rem);
    }

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

    .theme-orbit__core {
        grid-column: 1;
    }

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

    .compare-engine__versus {
        width: 2.8rem;
        height: 2.8rem;
        justify-self: center;
    }

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

    .compare-row > * {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .compare-row > *:last-child {
        border-bottom: 0;
    }

    .compare-row--head > span,
    .compare-row > span {
        min-height: auto;
        padding-bottom: 0.25rem;
        background: rgba(var(--signal-rgb), 0.05);
    }

    .compare-row--head strong {
        min-height: auto;
    }

    .accordion__item button {
        grid-template-columns: 2.2rem 1fr auto;
        font-size: clamp(1.4rem, 9vw, 2.6rem);
    }

    .accordion__panel {
        padding-left: 3.2rem;
    }

    .site-footer__signal,
    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .site-footer__base {
        flex-direction: column;
    }

    .footer-declaration {
        font-size: clamp(2.4rem, 12vw, 4.2rem);
    }
}

@media (pointer: coarse), (hover: none) {
    .cursor-aura {
        display: none;
    }
}

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

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

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

    .signal-field {
        display: none;
    }
}

@media print {
    :root {
        --bg: #fff;
        --surface: #fff;
        --text: #000;
        --muted: #333;
        --line: #aaa;
    }

    body::before,
    .site-footer,
    .cursor-aura,
    .page-progress,
    .signal-field,
    .hero-orbit,
    .hero-grid,
    .command-palette,
    .button,
    .filter-bar {
        display: none !important;
    }

    body,
    .manifesto-band {
        color: #000;
        background: #fff;
    }

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

    a {
        text-decoration: underline;
    }
}

