/* ── Variables ── */

:root,
:root[data-theme="day"] {
    color-scheme: light;
    --bg: #f3ecdb;
    --fg: #000;
    --hero: rgba(0,0,0,.72);
    --muted: rgba(0,0,0,.52);
    --line: rgba(0,0,0,.12);
    --panel: rgba(0,0,0,.035);
    --font: "Hack Nerd Font","Hack NFM","Hack NF","Hack",
            ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}

:root[data-theme="night"] {
    color-scheme: dark;
    --bg: #000;
    --fg: #d7c9a6;
    --hero: rgba(215,201,166,.78);
    --muted: rgba(215,201,166,.56);
    --line: rgba(215,201,166,.18);
    --panel: rgba(215,201,166,.05);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]),
    :root[data-theme="auto"] {
    color-scheme: dark;
    --bg: #000;
    --fg: #d7c9a6;
    --hero: rgba(215,201,166,.78);
    --muted: rgba(215,201,166,.56);
    --line: rgba(215,201,166,.18);
    --panel: rgba(215,201,166,.05);
    }
}

/* ── Base ── */

.err,
.error,
.freed-error {
    color: #e74c3c;
    font-style: italic;
}

* { box-sizing: border-box; }

/* ❌ This BREAKS THE FREED AI CHAT: we lose the top of the page when it grows! */
/* html, body { height: 100%; } */

/* ✅ This works. */
html, body { max-height: 100%; }

body {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
}

button, select {
    border: 2px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--fg);
    font: inherit;
    font-size: 16px;
    line-height: 1.1;
    padding: 1rem 1.2rem;
    touch-action: manipulation;
}

.site-coming-soon {
    text-align: center;
}

.theme-toggle button,
.site-home-button {
    clip-path: polygon(20px 0%, 100% 0%, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0% 100%, 0% 20px);
}

hr {
    border-color: var(--hero);
}

select { max-width: min(42vw, 16rem); }

footer {
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    color: var(--muted);
    font-size: clamp(12px, 1.4vmin, 14px);
    letter-spacing: .04em;
    white-space: nowrap;
}

.theme-toggle {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    padding: .5rem;
}

/* ── Home page ── */

.site-name-container {
    display: flex;
    justify-content: center;
    margin: 50px;
}

.site-name {
    width: 1000px;
    object-fit: contain;
    
    @media screen  and (min-width: 1200px) {
        width: 2000px;
        
    }
}

.site-name-separator {
    margin: 50px;
}

.site-tagline-container {
    display: flex;
    justify-content: center;
}

.site-tagline {
    font-size: 1.5rem;
    color: var(--muted);
    margin-bottom: 50px;
    white-space: nowrap;
    overflow: hidden;
    animation: type 7.2s steps(35, end); 
    width: 35ch; /* Adjust to match the number of characters in the tagline */
}

@keyframes type{ 
    from { 
        width: 0; 
    } 
}

@media screen and (max-width: 600px) {
    .site-tagline {
        font-size: 1rem;
    }
}
