.home-page {
    --home-gutter: clamp(14px, 4vw, 56px);
    --home-width: 78rem;
    display: block;
}
.home-header { border-bottom: 1px solid var(--line); background: var(--top); }
.home-header-inner, .home-main { width: min(var(--home-width), calc(100% - 2 * var(--home-gutter))); margin-inline: auto; }
.home-header-inner {
    min-height: 72px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: clamp(12px, 3vw, 40px);
}
.home-header .brand { justify-self: start; white-space: nowrap; }
.home-nav, .home-header-actions { display: flex; align-items: center; gap: clamp(12px, 2.3vw, 30px); }
.home-header-actions { justify-self: end; gap: clamp(8px, 1.4vw, 20px); }
.home-nav a, .home-header-actions > a:not(.button) {
    color: var(--muted);
    font-weight: 650;
    font-size: .87rem;
    text-decoration: none;
    white-space: nowrap;
    padding-block: 10px;
}
.home-nav a:hover, .home-header-actions > a:not(.button):hover { color: var(--accent); }
.home-header-actions .theme-button { flex: none; }
.home-header-actions .signup-link { padding-block: 8px; min-height: 36px; }
.home-main { padding: clamp(20px, 3.5vw, 50px) 0 clamp(40px, 7vw, 90px); }

.home-auth-dialog {
    width: min(33rem, calc(100% - 1.5rem));
    border-radius: 15px;
    box-shadow: 0 25px 80px rgb(3 12 16 / 40%);
}
.home-auth-dialog::backdrop { background: rgb(5 14 20 / 76%); backdrop-filter: blur(4px); }
.home-auth-dialog[open]:not(:modal) { margin-inline: auto; }
.home-auth-dialog .panel-heading {
    position: sticky;
    inset-block-start: 0;
    z-index: 1;
    padding: 18px clamp(16px, 4vw, 26px);
    border-block-start: 3px solid var(--accent);
    background: var(--surface);
}
.home-auth-dialog h2 { font-size: 1.55rem; font-weight: 740; }
.home-auth-dialog .panel-heading p { margin-top: 5px; }
.home-auth-dialog .form-body { padding: clamp(16px, 4vw, 26px); }
.home-auth-dialog .home-auth-close { min-height: 38px; min-width: 38px; padding: 0; flex: none; font-size: 1.45rem; line-height: 1; }
.home-auth-dialog form > .primary { min-height: 44px; }

.home-hero {
    --hero-inset: clamp(34px, 5.4vw, 78px);
    --hero-fade: 1.1s;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: clamp(460px, 42vw, 600px);
    border: 1px solid #364950;
    border-radius: 18px;
    color: #f1f7f7;
    background: #101a20;
    box-shadow: 0 22px 50px -28px rgb(5 25 29 / 50%);
}
.home-hero-art { position: absolute; z-index: -1; inset: 0 0 0 39%; }
.home-hero-art img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 53% center;
    opacity: 0;
    transition: opacity var(--hero-fade) ease-in-out;
}
.home-hero-art img[data-active] { opacity: 1; }
.home-hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #101a20 0%, rgb(16 26 32 / 70%) 14%, transparent 48%),
        linear-gradient(0deg, rgb(16 26 32 / 28%), transparent 42%);
    pointer-events: none;
}
.home-hero-copy { width: min(61%, 48rem); padding: var(--hero-inset); padding-inline-end: 0; }
.home-hero-slides { display: grid; }
.home-hero-slide {
    grid-area: 1 / 1;
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--hero-fade) ease-in-out, visibility 0s var(--hero-fade);
}
.home-hero-slide[data-active] { opacity: 1; visibility: visible; transition-delay: 0s; }
.home-hero:not([data-enhanced]) .home-hero-slide:not([data-active]) { display: none; }
.home-hero-controls {
    position: absolute;
    z-index: 1;
    inset-inline-start: var(--hero-inset);
    inset-block-end: 18px;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px;
    border: 1px solid #526b73;
    border-radius: 9px;
    background: rgb(12 25 31 / 92%);
}
.home-hero-control {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #dcebec;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 1.12rem;
}
.home-hero-control:hover { color: #8de9e2; background: #243c43; }
.home-hero-control:focus-visible { outline-color: #8de9e2; outline-offset: -2px; }
.home-hero-playback {
    width: 0;
    height: 0;
    border-block: 6px solid transparent;
    border-inline-start: 9px solid currentColor;
    margin-inline-start: 2px;
}
[data-playing] .home-hero-playback {
    width: 9px;
    height: 12px;
    margin: 0;
    border-block: 0;
    border-inline: 3px solid currentColor;
}
.home-hero-position {
    min-width: 2.75rem;
    text-align: center;
    color: #b1c6cb;
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.home-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: #b1c6cb;
    font-size: .77rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.home-kicker::before { content: ""; width: 24px; height: 1px; background: #79e3de; }
.home-hero-title {
    font-size: clamp(2.45rem, 5.15vw, 4.65rem);
    line-height: 1.03;
    font-weight: 770;
    letter-spacing: -.06em;
    overflow-wrap: normal;
}
.home-hero-title span { display: block; color: #8de9e2; }
.home-lead { max-width: 36ch; margin-top: 23px; color: #c8d8dc; font-size: clamp(1rem, 1.45vw, 1.2rem); line-height: 1.62; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: clamp(23px, 3vw, 40px); }
.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 13px;
    padding: 10px 16px;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: .91rem;
    font-weight: 720;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color .16s ease, border-color .16s ease;
}
.home-button span { font-size: 1.06em; }
.home-button-primary { background: #8de9e2; color: #10282c; }
.home-button-primary:hover { background: #b1fff5; }
.home-button-quiet { border-color: #566a71; background: #14252b; color: #f1f7f7; }
.home-button-quiet:hover { background: #263e44; border-color: #a7d2d3; }
.home-hero .home-button:focus-visible { outline-color: #8de9e2; }
.home-button-outlined { border-color: var(--line); background: var(--surface); color: var(--text); }
.home-button-outlined:hover { border-color: var(--accent); background: var(--accent-wash); }

.home-guide { margin-block: clamp(40px, 6vw, 84px) clamp(32px, 5vw, 66px); }
.home-guide h2, .home-competition h2, .home-join h2 {
    font-size: clamp(1.55rem, 2.55vw, 2.25rem);
    font-weight: 750;
    letter-spacing: -.045em;
}
.home-features {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
}
.home-feature { min-width: 0; padding: clamp(18px, 3vw, 34px); }
.home-feature + .home-feature { border-inline-start: 1px solid var(--line); }
.home-feature h3 { margin-top: 19px; font-size: 1.17rem; font-weight: 720; }
.home-feature p, .home-competition p, .home-join p { margin-top: 9px; color: var(--muted); }
.home-feature-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
    border-radius: 9px;
    background: var(--accent-wash);
    color: var(--accent);
}
.home-feature-loadout span {
    width: 19px;
    height: 15px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    background: linear-gradient(currentColor, currentColor) center 4px / 9px 1px no-repeat,
        linear-gradient(currentColor, currentColor) center 8px / 9px 1px no-repeat;
}
.home-feature-code { font: 700 .98rem ui-monospace, monospace; letter-spacing: -.08em; }
.home-feature-play span {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-block: 7px solid transparent;
    border-inline-start: 10px solid currentColor;
}
.home-competition, .home-join {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: clamp(20px, 3.15vw, 36px);
    border: 1px solid var(--line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--surface) 67%, var(--accent-wash));
}
.home-competition p, .home-join p { max-width: 55ch; }
.home-join { margin-top: 14px; background: var(--surface); }
.home-competition .home-button, .home-join .home-button { flex: none; }

@media (max-width: 850px) {
    .home-hero-copy { width: 65%; }
    .home-hero-art { inset-inline-start: 33%; }
}
@media (max-width: 690px) {
    .home-header-inner { min-height: auto; grid-template-columns: 1fr auto; padding-block: 11px; gap: 3px 12px; }
    .home-header .brand { gap: 7px; font-size: .95rem; }
    .home-header .insignia { width: 31px; height: 31px; }
    .home-header-actions { grid-column: 2; grid-row: 1; }
    .home-header-actions .theme-button { width: 34px; }
    .home-nav { grid-column: 1 / -1; padding-top: 3px; gap: 19px; }
    .home-nav a { padding-block: 7px 2px; }
    .home-hero { min-height: auto; flex-direction: column; align-items: stretch; border-radius: 14px; }
    .home-hero { --hero-inset: clamp(22px, 5.2vw, 36px); }
    .home-hero-copy { width: auto; padding: var(--hero-inset); }
    .home-hero-controls { inset-inline-start: auto; inset-inline-end: 10px; inset-block-end: 10px; }
    .home-kicker { margin-bottom: 13px; }
    .home-lead { margin-top: 15px; }
    .home-hero-art { position: relative; inset: auto; aspect-ratio: 1.7; order: 1; }
    .home-hero-art img { object-position: 54% 52%; }
    .home-hero-art::after { background: linear-gradient(180deg, #101a20 0%, transparent 25%); }
    .home-features { grid-template-columns: 1fr; }
    .home-feature + .home-feature { border-inline-start: 0; border-block-start: 1px solid var(--line); }
    .home-feature h3 { margin-top: 13px; }
    .home-competition, .home-join { align-items: flex-start; flex-direction: column; gap: 16px; }
}
@media (max-width: 370px) {
    .home-header .brand { gap: 4px; font-size: .83rem; }
    .home-header .insignia { width: 27px; height: 27px; }
    .home-header-actions { gap: 6px; }
    .home-header-actions > a:not(.button), .home-header-actions .signup-link { font-size: .78rem; }
    .home-header-actions .signup-link { padding-inline: 7px; }
    .home-hero-title { font-size: clamp(1.9rem, 9.5vw, 2.3rem); }
    .home-actions { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero { --hero-fade: 0s; }
}
