:root {
    --void: #06080b;
    --text: #dce4ea;
    --muted: #7f8c97;
    --amber: #e3a33b;
    --cyan: #3fb7c9;
    --line: rgba(220, 228, 234, .14);
    --display: "Michroma", "Eurostile", "Bank Gothic", sans-serif;
    --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body.title-screen {
    background:
        radial-gradient(ellipse 70% 55% at 50% 45%, rgba(63, 183, 201, .07), transparent 70%),
        radial-gradient(ellipse 45% 35% at 62% 60%, rgba(227, 163, 59, .06), transparent 70%),
        var(--void);
    color: var(--text);
    font: 15px/1.55 var(--body);
    min-height: 100vh;
    overflow-x: hidden;
    display: grid;
    grid-template-rows: 1fr auto;
}

#starfield { position: fixed; inset: 0; z-index: 0; }

/* ---------- ring ---------- */
.halo {
    position: fixed; inset: 0; z-index: 0;
    display: grid; place-items: center;
    pointer-events: none;
    color: var(--text);
}
.halo svg { width: min(92vmin, 760px); height: auto; opacity: 0; animation: fade 2.4s ease-out .2s forwards; }
.ring { transform-origin: 300px 300px; transform-box: view-box; }
.ring-outer { animation: spin 240s linear infinite; }
.ring-mid   { animation: spin 90s linear infinite reverse; }
.ring-inner { animation: spin 160s linear infinite; }

/* ---------- stage ---------- */
.stage {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding: 64px 20px 32px;
}

.eyebrow {
    margin: 0 0 18px;
    font-size: 12px; letter-spacing: .32em; text-transform: uppercase;
    color: var(--muted);
    opacity: 0; animation: rise 1s ease-out .5s forwards;
}

.wordmark {
    margin: 0;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(34px, 8.4vw, 92px);
    letter-spacing: .14em;
    text-transform: uppercase;
    line-height: 1.05;
    /* compensate trailing letter-spacing so it centers optically */
    padding-left: .14em;
    opacity: 0; animation: wordmark 1.6s cubic-bezier(.2,.7,.2,1) .8s forwards;
}
.wordmark .zen { color: var(--text); }
.wordmark .dustry {
    background: linear-gradient(100deg, var(--amber) 10%, #f3cf8c 55%, var(--amber) 90%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.tagline {
    margin: 14px 0 40px;
    color: var(--muted);
    font-size: 16px; letter-spacing: .06em;
    opacity: 0; animation: rise 1s ease-out 1.6s forwards;
}

/* ---------- notices ---------- */
.notice {
    max-width: 460px; margin: 0 auto 22px; padding: 10px 14px;
    border-radius: 6px; font-size: 14px; border: 1px solid;
    background: rgba(6, 8, 11, .7); backdrop-filter: blur(4px);
}
.notice.err { border-color: rgba(224, 93, 93, .5); color: #f0b4b4; }
.notice.ok  { border-color: rgba(92, 194, 122, .45); color: #b9e6c6; }

/* ---------- menu ---------- */
.menu { opacity: 0; animation: rise 1s ease-out 2s forwards; }
.start {
    display: inline-flex; align-items: center; gap: 14px;
    padding: 15px 34px 15px 28px;
    font-family: var(--display);
    font-size: 14px; letter-spacing: .16em; text-transform: uppercase;
    color: #1a1205;
    background: var(--amber);
    border: 1px solid var(--amber);
    border-radius: 3px;
    text-decoration: none;
    box-shadow: 0 0 0 0 rgba(227, 163, 59, .45), 0 10px 40px -12px rgba(227, 163, 59, .55);
    animation: pulse 3.6s ease-in-out 3s infinite;
    transition: transform .15s ease, filter .15s ease;
}
.start:hover, .start:focus-visible { filter: brightness(1.08); transform: translateY(-1px); outline: none; }
.start:focus-visible { box-shadow: 0 0 0 3px var(--void), 0 0 0 5px var(--cyan); }
.start .caret { font-size: 12px; animation: blink 1.4s steps(2, start) infinite; }

.hint {
    max-width: 380px; margin: 16px auto 0;
    color: var(--muted); font-size: 13px;
}

/* ---------- features ---------- */
.features {
    list-style: none; margin: 56px auto 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 190px)); gap: 1px;
    background: var(--line);
    border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
    opacity: 0; animation: rise 1s ease-out 2.4s forwards;
}
.features li {
    background: rgba(6, 8, 11, .78);
    padding: 14px 16px;
    display: flex; flex-direction: column; gap: 2px;
    text-align: left;
}
.features b { font-weight: 600; font-size: 13px; letter-spacing: .04em; }
.features span { color: var(--muted); font-size: 12px; }

/* ---------- footer ---------- */
.credits {
    position: relative; z-index: 1;
    display: flex; gap: 24px; align-items: flex-end; justify-content: space-between;
    padding: 18px 28px 22px;
    font-size: 11px; color: rgba(127, 140, 151, .8);
}
.credits .site { font-family: var(--display); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.credits .legal { max-width: 640px; text-align: right; line-height: 1.5; }

@media (max-width: 640px) {
    .features { grid-template-columns: 1fr; width: 100%; max-width: 320px; }
    .start { padding: 14px 22px; font-size: 12px; letter-spacing: .12em; }
    .credits { flex-direction: column; align-items: center; gap: 8px; padding: 16px; }
    .credits .legal { text-align: center; }
}

/* ---------- motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes wordmark {
    from { opacity: 0; letter-spacing: .42em; filter: blur(6px); }
    to   { opacity: 1; letter-spacing: .14em; filter: blur(0); }
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(227, 163, 59, 0), 0 10px 40px -12px rgba(227, 163, 59, .55); }
    50%      { box-shadow: 0 0 0 8px rgba(227, 163, 59, .08), 0 10px 40px -12px rgba(227, 163, 59, .75); }
}
@keyframes blink { to { visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .halo svg, .eyebrow, .wordmark, .tagline, .menu, .features { opacity: 1; }
}
