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

:root {
    --orange: #F5921B;
    --bg: #080808;
    --text: #f0e6d8;
    --ease-out: cubic-bezier(0.4, 0, 0.15, 1);
    --panel-duration: 0.55s;
    --transition-fast: 0.3s;
    --transition-mid: 0.4s;
}

html {
    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;
    }
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
}

#glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url('tilde.png') center / auto 50% no-repeat;
    opacity: 0.07;
    filter: blur(50px);
    pointer-events: none;
}

#ascii {
    position: fixed;
    inset: 0;
    z-index: 1;
    cursor: grab;
    animation: fadeIn 1.5s ease-out;
}
#ascii:active { cursor: grabbing; }

header {
    position: fixed;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 14px 44px;
    background: rgba(8, 8, 8, 0.45);
    backdrop-filter: blur(28px) saturate(1.3);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
    border-radius: 999px;
    border: 1px solid rgba(245, 146, 27, 0.08);
    display: flex;
    align-items: center;
    gap: 36px;
    white-space: nowrap;
    transition: background 0.45s ease, border-color 0.45s ease;
}

html.fonts-loading header,
html.fonts-loading h1,
html.fonts-loading #rationale figure svg text {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

html.fonts-ready header {
    animation: slideDown 0.9s ease-out 0.2s both;
}

html.fonts-ready h1,
html.fonts-ready #rationale figure svg text {
    animation: fadeIn 0.5s ease-out both;
}

.brand {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    color: var(--orange);
    cursor: pointer;
}
.brand:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 4px;
}

nav { display: flex; gap: 24px; }

nav a {
    color: rgba(240, 230, 216, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    transition: color var(--transition-fast) ease;
}
nav a:hover { color: var(--orange); }
nav a:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 4px;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 20px 40px;
    background: var(--bg);
    border-top: 1px solid rgba(245, 146, 27, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    font-size: 0.8rem;
    color: rgba(240, 230, 216, 0.3);
    letter-spacing: 0.02em;
    animation: slideUp 0.9s ease-out 0.4s both;
    transition: opacity 0.35s ease;
}

footer a {
    color: rgba(245, 146, 27, 0.45);
    text-decoration: none;
    transition: color var(--transition-fast) ease;
}
footer a:hover { color: var(--orange); }
footer a:focus-visible {
    color: var(--orange);
    outline: 2px solid var(--orange);
    outline-offset: 4px;
}

.hint { opacity: 0.6; }

#recenter {
    position: fixed;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    z-index: 10;
    opacity: 0;
    color: rgba(245, 146, 27, 0.45);
    text-decoration: none;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    transition: opacity var(--transition-mid) ease, transform var(--transition-mid) ease, color var(--transition-fast) ease;
    pointer-events: none;
}
#recenter:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 4px;
}
#recenter.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
#recenter:hover { color: var(--orange); }

.panel {
    position: fixed;
    inset: 0;
    z-index: 5;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--panel-duration) var(--ease-out);
    pointer-events: none;
}

.panel.active {
    transform: translateX(0);
    pointer-events: auto;
}

#rationale {
    background: #f5f0e8;
    color: #1a1a1a;
    display: flex;
    justify-content: center;
    padding: 140px 40px 80px;
}

#rationale article {
    max-width: 560px;
    width: 100%;
}

#rationale h1 {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    letter-spacing: -0.03em;
    color: var(--orange);
    margin-bottom: 40px;
}

#rationale figure {
    margin: 40px 0;
}
#rationale figure + figure {
    margin-top: 0;
}

#rationale figure svg {
    width: 100%;
    max-width: 480px;
    height: auto;
    display: block;
    margin: 0 auto;
}

#rationale figure:last-of-type svg {
    max-width: 600px;
}

#rationale p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #3a3530;
    margin-bottom: 24px;
}

#rationale p:last-child {
    margin-bottom: 0;
    font-weight: 500;
    color: #1a1a1a;
}

#products {
    background: #2d1f4e;
    color: #e0d6ee;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 120px 40px 80px;
}

#products article {
    max-width: 560px;
    width: 100%;
}

#products h1 {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    letter-spacing: -0.03em;
    color: var(--orange);
    margin-bottom: 40px;
}

#products p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(224, 214, 238, 0.75);
    margin-bottom: 24px;
}

#products p:last-child {
    margin-bottom: 0;
    color: #e0d6ee;
}

body.panel-rationale header {
    background: rgba(245, 240, 232, 0.7);
    border-color: rgba(245, 146, 27, 0.12);
}

body.panel-products header {
    background: rgba(34, 22, 58, 0.65);
    border-color: rgba(245, 146, 27, 0.15);
}

body.panel-rationale nav a {
    color: rgba(26, 26, 26, 0.4);
}

body.panel-rationale nav a:hover {
    color: var(--orange);
}

body.panel-products nav a {
    color: rgba(224, 214, 238, 0.45);
}

body.panel-products nav a:hover {
    color: var(--orange);
}

nav a.active {
    color: var(--orange);
}

body.panel-rationale footer,
body.panel-rationale #recenter,
body.panel-products footer,
body.panel-products #recenter {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
}

@media (max-width: 768px) {
    .keyboard-hint { display: none !important; }
}

@media (max-width: 640px) {
    header { top: 16px; padding: 12px 24px; gap: 20px; }
    .brand { font-size: 1.05rem; }
    nav { gap: 14px; }
    nav a { font-size: 0.75rem; }
    footer {
        padding: 16px 20px;
        font-size: 0.7rem;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    #rationale, #products { padding: 100px 24px 60px; }
    #rationale h1, #products h1 { font-size: 1.6rem; margin-bottom: 28px; }
    #rationale p, #products p { font-size: 0.95rem; }
}
