/* About page: a small visual novel. Placeholder art for now (grey silhouette, simple laptop and
   boba); the commissioned sprites replace .about-character's contents later. Built on tokens.css. */

/* Placeholder interface: plain greys, no violet or glow, until the real interface design pass. */
.about-vn {
    --violet: #9a9a9a;
    --violet-light: #c8c8c8;
    --hairline: #3c3c3c;
    --hairline-strong: #6b6b6b;
    --panel: #161616;
    --glow: none;
    --ph-hover: rgba(255, 255, 255, .06);
}

body.is-light-mode .about-vn {
    --violet: #6b6b6b;
    --violet-light: #444;
    --hairline: #c9c9c9;
    --hairline-strong: #8f8f8f;
    --panel: #f2f2f2;
    --ph-hover: rgba(0, 0, 0, .05);
}

.about-view {
    position: relative;
    z-index: 1;
    min-height: 100svh;
    margin-left: 3.75rem;
    transition: margin-left .35s cubic-bezier(.3, .5, .25, 1);
}

.site-sidebar-expanded .about-view {
    margin-left: 16rem;
}

.about-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.about-vn {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100svh;
    padding: clamp(1rem, 2.5vh, 1.75rem) clamp(1rem, 4vw, 3.5rem) clamp(1rem, 3vh, 2rem);
    color: var(--ink);
    font-family: var(--font-body);
    user-select: none;
}

/* ---- top row: meter, journal, start over ---- */

.about-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.about-meter {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: min(22rem, 100%);
}

.about-meter-label {
    min-width: 7.5rem;
    color: var(--violet-light);
}

.about-meter-track {
    position: relative;
    flex: 1;
    height: .4rem;
    border: 1px solid var(--hairline-strong);
    border-radius: .15rem;
    overflow: hidden;
}

.about-meter-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--violet);
    transition: width .6s cubic-bezier(.3, .5, .25, 1);
}

.about-meter-mark {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--hairline-strong);
}

.about-hud-buttons {
    display: flex;
    gap: .5rem;
}

.about-hud-button {
    padding: .45rem .8rem;
    border: 1px solid var(--hairline);
    border-radius: .2rem;
    background: transparent;
    color: var(--muted);
    font: 600 .62rem/1 var(--font-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}

.about-hud-button:hover,
.about-hud-button:focus-visible {
    border-color: var(--hairline-strong);
    color: var(--ink);
}

.about-hud-button.is-pinged {
    animation: about-ping .7s ease-out;
}

@keyframes about-ping {
    0% { border-color: var(--ink); color: var(--ink); }
    100% { border-color: var(--hairline); }
}

/* ---- the scene: plain labelled placeholders until the commissioned art arrives ---- */

.about-stage {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: end;
    min-height: 11rem;
    margin-top: 1rem;
}

/* the classic grey box with a cross through it */
.about-ph {
    position: relative;
    display: grid;
    place-content: center;
    gap: .3rem;
    border: 1px solid #6b6b6b;
    background:
        linear-gradient(to top right, transparent calc(50% - .5px), #5a5a5a calc(50% - .5px), #5a5a5a calc(50% + .5px), transparent calc(50% + .5px)),
        linear-gradient(to bottom right, transparent calc(50% - .5px), #5a5a5a calc(50% - .5px), #5a5a5a calc(50% + .5px), transparent calc(50% + .5px)),
        #2e2e2e;
    color: #d8d8d8;
    font: 600 .62rem/1.2 Arial, Helvetica, sans-serif;
    letter-spacing: .08em;
    text-align: center;
    text-transform: uppercase;
}

.about-ph-label,
.about-ph-note {
    position: relative;
    padding: .1rem .35rem;
    background: #2e2e2e;
}

.about-ph-note {
    color: #f0c040;
}

.about-character {
    width: clamp(8rem, min(22vw, 30vh), 17rem);
    aspect-ratio: 4 / 5;
    transition: opacity .5s;
}

.is-left .about-character {
    opacity: 0;
}

/* a small hop whenever the expression changes (skipped when animations are off) */
.about-character.is-face-change {
    animation: about-face-change .28s ease-out;
}

@keyframes about-face-change {
    0% { transform: translateY(0); }
    35% { transform: translateY(-.35rem); }
    100% { transform: translateY(0); }
}

.about-table {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(1.5rem, 6vw, 5rem);
    width: min(40rem, 100%);
    height: 2.4rem;
    pointer-events: none;
}

.about-table > .about-ph-label {
    position: absolute;
    right: .5rem;
    bottom: .4rem;
}

.about-object {
    margin-bottom: 1.6rem; /* stands on the table */
    padding: 0;
    cursor: default;
    pointer-events: auto;
}

.about-vn.is-at-menu .about-object {
    cursor: pointer;
}

.about-vn.is-at-menu .about-object:hover,
.about-vn.is-at-menu .about-object:focus-visible {
    border-color: #f0c040;
    outline: none;
}

.about-laptop {
    width: clamp(6rem, 10vw, 8rem);
    height: 4.6rem;
    transition: height .5s;
}

.about-laptop-state::before {
    content: "open";
}

.is-half-closed .about-laptop {
    height: 2.6rem;
}

.is-half-closed .about-laptop-state::before {
    content: "half-closed";
}

.is-angled-away .about-laptop-state::before {
    content: "turned away";
}

.is-angled-away .about-laptop {
    animation: about-angle-away 1.2s step-end;
}

@keyframes about-angle-away {
    0% { border-color: #f0c040; }
}

.about-boba {
    width: 2.6rem;
    height: 4.2rem;
}

/* ---- the textbox ---- */

.about-dialogue {
    position: relative;
    width: min(48rem, 100%);
    min-height: 10.5rem;
    margin: 1.25rem auto 0;
    padding: 1.1rem 1.4rem 1.2rem;
    border: 1px solid var(--hairline-strong);
    border-radius: .3rem;
    background: var(--panel);
    cursor: pointer;
}

.about-speaker {
    min-height: .7rem;
    margin-bottom: .55rem;
    color: var(--violet-light);
}

.about-line {
    min-height: 2.9em;
    margin: 0;
    color: var(--page-copy);
    font-size: clamp(.98rem, 1.25vw, 1.08rem);
    line-height: 1.5;
    user-select: text;
}

.about-line [data-live] {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--violet-light);
}

.about-hint {
    position: absolute;
    right: 1.4rem;
    bottom: .75rem;
    opacity: .6;
}

.about-choices {
    /* two columns when there's room, so a long topic menu doesn't push the scene off screen */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr));
    gap: .4rem;
    margin-top: .8rem;
}

.about-choices:empty {
    display: none;
}

.about-choice {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: .6rem .8rem;
    border: 1px solid var(--hairline);
    border-radius: .2rem;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: .92rem;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.about-choice:hover,
.about-choice:focus-visible {
    border-color: var(--hairline-strong);
    background: var(--ph-hover);
    outline: none;
}

.about-choice.is-seen {
    color: var(--muted);
}

.about-choice-key {
    display: grid;
    place-items: center;
    flex: none;
    width: 1.35rem;
    height: 1.35rem;
    border: 1px solid var(--hairline);
    border-radius: .3rem;
    color: var(--muted);
    font: .65rem/1 var(--font-mono);
}

.about-choice-new {
    margin-left: auto;
    color: var(--violet-light);
}

/* ---- journal ---- */

.about-journal {
    position: absolute;
    top: 4rem;
    right: clamp(1rem, 4vw, 3.5rem);
    z-index: 3;
    width: min(22rem, calc(100% - 2rem));
    max-height: calc(100% - 6rem);
    overflow: auto;
    padding: 1rem 1.2rem;
    border: 1px solid var(--hairline-strong);
    border-radius: .3rem;
    background: var(--panel);
    backdrop-filter: blur(10px);
    user-select: text;
}

.about-journal h2 {
    margin-bottom: .75rem;
    color: var(--violet-light);
}

.about-journal ul {
    display: grid;
    gap: .6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.about-journal li {
    padding-left: .8rem;
    border-left: 1px solid var(--hairline-strong);
    color: var(--page-copy);
    font-size: .85rem;
    line-height: 1.45;
}

.about-journal [data-live] {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.about-journal-empty {
    margin: 0;
    color: var(--muted);
    font-size: .85rem;
}

.about-noscript {
    max-width: 30rem;
    margin: 2rem auto;
    color: var(--muted);
}

/* ---- phones ---- */

@media (max-width: 720px) {
    .about-view,
    .site-sidebar-expanded .about-view {
        margin-left: 0;
    }

    .about-vn {
        padding-top: 4.25rem; /* room for the sidebar's toggle */
    }

    .about-hint {
        display: none;
    }
}
