/*
Theme Name: HOME
Author: No Category
Version: 0.1.0
Description: A mobile-first WordPress prototype for HOME.
*/

:root {
    --color-background: #ffffff;
    --color-text: #111111;
    --color-muted: #6f6f6f;
    --color-line: #111111;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.45;
    overflow: hidden;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

img,
canvas,
svg,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 8px 10px;
    background: var(--color-text);
    color: var(--color-background);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-main {
    min-height: 100vh;
}

.home-world {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    background: var(--color-background);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.home-world:active,
.home-world.is-space-panning {
    cursor: grabbing;
}

.home-world.has-hovered-trace {
    cursor: pointer;
}

.home-world__canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.home-world__edge {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 420ms ease-out;
}

.home-world__edge.is-active {
    opacity: 1;
}

.home-world__edge--top,
.home-world__edge--bottom {
    left: 0;
    width: 100%;
    height: 18%;
}

.home-world__edge--top {
    top: 0;
    background: linear-gradient(to bottom, rgba(17, 17, 17, 0.12), rgba(17, 17, 17, 0));
}

.home-world__edge--bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(17, 17, 17, 0.12), rgba(17, 17, 17, 0));
}

.home-world__edge--left,
.home-world__edge--right {
    top: 0;
    width: 18%;
    height: 100%;
}

.home-world__edge--left {
    left: 0;
    background: linear-gradient(to right, rgba(17, 17, 17, 0.12), rgba(17, 17, 17, 0));
}

.home-world__edge--right {
    right: 0;
    background: linear-gradient(to left, rgba(17, 17, 17, 0.12), rgba(17, 17, 17, 0));
}

.home-world__hud {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 2;
    display: flex;
    width: min(320px, calc(100vw - 40px));
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}

.home-world__kicker,
.home-world__title,
.home-world__description {
    margin: 0;
}

.home-world__kicker {
    font-size: 12px;
    letter-spacing: 0.08em;
}

.home-world__title {
    max-width: 12em;
    font-size: clamp(28px, 9vw, 56px);
    font-weight: 500;
    line-height: 1.05;
}

.home-world__description {
    max-width: 20em;
    color: var(--color-muted);
    font-size: 15px;
}

.home-world__start {
    margin-top: 8px;
    padding: 10px 14px;
    border: 1px solid var(--color-text);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--color-text);
    pointer-events: auto;
}

.home-world__start:focus-visible,
.home-debug-panel button:focus-visible,
.home-debug-panel input:focus-visible,
.home-info-layer button:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 3px;
}

.home-debug-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    display: flex;
    width: 176px;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(17, 17, 17, 0.16);
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(10px);
    cursor: default;
    pointer-events: auto;
    user-select: text;
}

.home-debug-panel__eyebrow {
    margin: 0;
    color: var(--color-muted);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.home-debug-panel__data {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    margin: 0;
}

.home-debug-panel__data div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.home-debug-panel dt {
    color: var(--color-muted);
}

.home-debug-panel dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.home-debug-panel__field {
    display: grid;
    gap: 4px;
    color: var(--color-muted);
    font-size: 12px;
}

.home-debug-panel input {
    width: 100%;
    min-height: 32px;
    border: 1px solid rgba(17, 17, 17, 0.18);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.82);
    color: var(--color-text);
}

.home-debug-panel__actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.home-debug-panel button {
    min-height: 32px;
    border: 1px solid rgba(17, 17, 17, 0.18);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.82);
    color: var(--color-text);
}

.home-info-layer {
    position: absolute;
    z-index: 4;
    width: 92px;
    padding: 8px;
    border: 1px solid rgba(17, 17, 17, 0.16);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    cursor: default;
    pointer-events: auto;
    user-select: text;
}

.home-info-layer[hidden] {
    display: none;
}

.home-info-layer__close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-muted);
    line-height: 1;
}

.home-info-layer__eyebrow {
    margin: 0 0 6px;
    padding-right: 18px;
    color: var(--color-muted);
    font-size: 10px;
    letter-spacing: 0.08em;
}

.home-info-layer__data {
    display: grid;
    gap: 2px;
    margin: 0;
    font-size: 11px;
}

.home-info-layer__data div {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.home-info-layer dt {
    color: var(--color-muted);
}

.home-info-layer dd {
    margin: 0;
    max-width: 48px;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .home-debug-panel {
        top: 12px;
        left: 12px;
        width: 148px;
        padding: 10px;
        font-size: 12px;
    }

    .home-world__hud {
        right: 12px;
        bottom: 12px;
        width: min(280px, calc(100vw - 24px));
    }

    .home-world__description {
        max-width: 16em;
        font-size: 14px;
    }

    .home-info-layer {
        width: 88px;
    }
}

.home-page {
    min-height: 100svh;
    padding: 24px;
}

.home-page__content {
    max-width: 720px;
}

.home-entry__title {
    margin: 0 0 24px;
    font-size: 32px;
    font-weight: 500;
    line-height: 1.15;
}

.home-entry__content > * {
    margin-top: 0;
    margin-bottom: 1em;
}
