:root {
    color-scheme: dark;
    font-family: "Segoe UI", Arial, sans-serif;
    --background: #101011;
    --panel: #19191c;
    --ink: #faf7f1;
    --muted: #bbb8b5;
    --line: #38373b;
    --accent: #ffab47;
    --accent-light: #ffca83;
    background: var(--background);
    color: var(--ink);
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { min-width: 0; margin: 0; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.6; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 4px; }
.wrap { width: min(100% - 5rem, 1200px); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: 1rem; z-index: 4; color: #101011; background: var(--accent); padding: .65rem; transform: translateY(-200%); }
.skip:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--line); background: #121214; }
.masthead-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.masthead-inner { min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; white-space: nowrap; font-size: .98rem; font-weight: 900; letter-spacing: .12em; }
.brand-muted { color: var(--muted); font-weight: 650; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(.8rem, 3vw, 2.5rem); }
nav a { text-decoration: none; color: var(--muted); font-size: .94rem; font-weight: 600; padding: .6rem 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }
nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--accent); }

.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid #2d2a2c; background: #141319; }
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero::before { background: url("/assets/valley.png") 60% 53% / cover no-repeat; }
.hero::after { background: linear-gradient(90deg, #101012 0%, #101012dd 26%, #10101263 57%, #1010121c 100%), linear-gradient(0deg, #101012 0%, transparent 34%); }
.hero-inner { padding-block: clamp(5.5rem, 10vw, 9rem) clamp(5rem, 9vw, 8.4rem); }
.eyebrow { color: var(--accent-light); font-weight: 750; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; }
.eyebrow span { display: inline-block; width: .5rem; height: .5rem; margin-right: .55rem; background: var(--accent); vertical-align: .09em; }
.hero h1 { margin-top: 1.4rem; font-size: clamp(4.25rem, 12vw, 9.75rem); font-weight: 900; letter-spacing: -.087em; line-height: .79; }
.hero .accent { color: var(--accent); }
.hero-description { margin-block: 1.75rem 1.6rem; max-width: 27rem; color: #e4e0db; font-size: clamp(1.04rem, 2vw, 1.22rem); }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 4px; padding: .65rem 1.15rem; font-weight: 750; font-size: .95rem; line-height: 1.28; text-decoration: none; text-align: center; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.primary { background: var(--accent); color: #171210; }
.primary:hover { background: var(--accent-light); }
.outline { color: var(--ink); border-color: #555157; background: transparent; }
.outline:hover { background: #242327; border-color: var(--accent-light); }
.button.small { min-height: 38px; padding: .5rem .75rem; font-size: .88rem; }

.projects { padding-block: 3.8rem 5.25rem; }
h2 { font-size: clamp(1.55rem, 3vw, 2.7rem); line-height: 1.12; letter-spacing: -.045em; }
.project-card { margin-top: 1.6rem; display: grid; grid-template-columns: 1fr 1fr; min-height: 18rem; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.project-image { min-height: 14rem; background: linear-gradient(0deg, #1611165c, transparent 60%), url("/assets/valley.png") 89% 63% / 145% auto no-repeat #231c24; }
.project-body { padding: clamp(1.7rem, 4vw, 3rem); }
.project-body h3 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-top: .55rem; letter-spacing: -.04em; line-height: 1.05; }
.project-body p:not(.eyebrow) { color: var(--muted); max-width: 29rem; margin-block: 1rem 1.3rem; }
.hero-launcher .hero-inner { padding-block: clamp(4.5rem, 8vw, 7rem); }
.hero-launcher h1 { font-size: clamp(3.55rem, 9.5vw, 7.4rem); line-height: .89; }
.release-note { color: #d4cec6; margin-top: .85rem; font-size: .94rem; }
.release-info { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-block: 3.7rem 5rem; }
.release-info p { margin-top: .7rem; max-width: 28rem; color: var(--muted); }
.panel { border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.3rem, 4vw, 2.4rem); background: var(--panel); }
.release-panel dl { margin: 0 0 1rem; }
.release-panel dl div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .7rem; padding: .65rem 0; }
.release-panel dt, .release-panel summary { color: var(--muted); }
.release-panel dd { margin: 0; overflow-wrap: anywhere; }
details { border-top: 1px solid var(--line); padding-top: 1rem; }
summary { cursor: pointer; font-weight: 650; }
code { display: block; color: var(--accent-light); overflow-wrap: anywhere; margin-top: .7rem; }
.footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { min-height: 82px; }
.footer a { text-decoration: none; font-size: .92rem; }
.footer a:hover { color: var(--ink); }

.auth-layout { max-width: 560px; padding-block: clamp(3rem, 9vw, 6rem); }
.auth-panel h1, .dashboard h1 { font-size: clamp(2rem, 5.5vw, 3.25rem); line-height: 1.08; letter-spacing: -.055em; }
.auth-panel > p, .dash-panel > p, .dash-top p { margin-block: .65rem 1.2rem; color: var(--muted); }
.form-stack { display: grid; gap: 1rem; }
.form-stack .button { margin-top: .3rem; }
.field { display: grid; gap: .4rem; min-width: 0; font-weight: 640; font-size: .93rem; }
.field input { width: 100%; min-height: 46px; padding: .63rem .8rem; border: 1px solid #58545c; border-radius: 4px; color: var(--ink); background: #111113; }
.field input:hover { border-color: #8d848e; }
.field-help { color: var(--muted); font-size: .92rem; }
.identity { display: grid; gap: .1rem; padding: .65rem .8rem; background: #111113; border: 1px solid var(--line); overflow-wrap: anywhere; }
.auth-panel .form-footer { margin-block: 1.1rem 0; font-size: .94rem; }
.form-footer a { color: var(--accent-light); }
.notice { border: 1px solid #716049; background: #2a211a; border-radius: 4px; padding: .75rem .85rem; color: #ffdaaa !important; margin-bottom: 1rem; overflow-wrap: anywhere; }
.error { border-color: #924f46; background: #36201f; color: #ffd0cb !important; }
.hero .notice { max-width: 450px; }

.dashboard { padding-block: 3.2rem 5rem; max-width: 980px; }
.dash-top { display: flex; gap: 1rem; justify-content: space-between; align-items: start; margin-bottom: 1.2rem; }
.dash-panel { margin-bottom: 1rem; }
.dash-panel h2 { font-size: clamp(1.4rem, 3vw, 1.95rem); }
.dash-panel h3 { font-size: 1.05rem; margin-top: 1.4rem; }
.invite-form, .copy-row { display: grid; gap: .75rem; grid-template-columns: 1fr auto; align-items: end; }
.copy-row { margin-top: 1rem; }
.password-form { max-width: 450px; margin-top: 1rem; }
.records { margin: .8rem 0 0; padding: 0; list-style: none; }
.records li { border-top: 1px solid var(--line); padding: .75rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.records span { min-width: 0; overflow-wrap: anywhere; }
.records small { color: var(--muted); display: block; margin-top: .2rem; font-size: .88rem; }

@media (max-width: 720px) {
    .wrap { width: calc(100% - 2rem); }
    .masthead-inner { min-height: 65px; gap: .85rem; }
    .brand { gap: .4rem; font-size: .8rem; letter-spacing: .08em; }
    .brand img { width: 29px; height: 29px; }
    nav { gap: .85rem; }
    nav a { font-size: .85rem; }
    .hero::before { background-position: 66% center; }
    .hero::after { background: linear-gradient(90deg, #101012ed 0%, #10101299 60%, #10101255 100%), linear-gradient(0deg, #101012 0%, transparent 36%); }
    .hero-inner { padding-block: 4.7rem 4.3rem; }
    .project-card, .release-info { grid-template-columns: 1fr; }
    .project-image { background-size: cover; }
    .projects, .release-info { padding-block: 2.7rem 3.3rem; }
    .release-info { gap: 1.5rem; }
    .footer-inner { justify-content: start; flex-wrap: wrap; gap: .7rem 1.3rem; padding-block: 1rem; }
}

@media (max-width: 380px) {
    .masthead-inner { flex-wrap: wrap; padding-block: .8rem; }
    .hero h1 { font-size: 4rem; }
    .hero-launcher h1 { font-size: 3.2rem; }
    .invite-form, .copy-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .button { transition: none; }
}
