/* Craft layer: how controls respond. Values come from the 2026-11-11 reference study
   (Linear and Meta Muse press scale 0.97-0.98, colour steps on hover, nothing lifts). */

.heroButton,
.fieldCastChoices button,
.fieldSeasonChoices button,
.contactLink,
.fieldSelectionLink,
.logMore {
    transition:
        transform var(--dur-press) var(--ease-out),
        background-color var(--dur-hover) var(--ease-standard),
        border-color var(--dur-hover) var(--ease-standard),
        color var(--dur-hover) var(--ease-standard),
        box-shadow var(--dur-press) var(--ease-out);
}

/* Nothing lifts or glows: hover is a colour step in place. */
.heroButton:hover,
.heroButtonPrimary:hover,
.fieldCastChoices button:hover,
.fieldSeasonChoices button:hover,
.contactLink:hover,
.fieldSelectionLink:hover,
.logMore:hover {
    transform: none;
}

/* Console-button press: every control rests on a hard 2px shadow and presses 2px down into it. */
.heroButton,
.fieldCastChoices button,
.fieldSeasonChoices button,
.contactLink {
    box-shadow: 0 2px 0 var(--lab-line-strong);
}

.heroButtonPrimary,
.heroButtonPrimary:hover,
body.dark-mode .heroButtonPrimary,
body.dark-mode .heroButtonPrimary:hover {
    box-shadow: 0 2px 0 color-mix(in srgb, var(--lab-accent) 70%, black);
}

.heroButton::before {
    display: none;
}

@media (hover: hover) {
    .heroButtonPrimary:hover {
        background: var(--lab-accent-hover);
        border-color: var(--lab-accent-hover);
    }
}

/* Press gives a little, one shade darker, then springs back. */
.heroButton:active,
.fieldCastChoices button:active,
.fieldSeasonChoices button:active,
.contactLink:active,
.fieldSelectionLink:active,
.logMore:active,
.heroButtonPrimary:active,
body.dark-mode .heroButtonPrimary:active {
    transform: translateY(2px);
    box-shadow: none;
}

.heroButtonPrimary:active {
    background: color-mix(in srgb, var(--lab-accent-hover) 86%, black);
    border-color: color-mix(in srgb, var(--lab-accent-hover) 86%, black);
}

/* Type: balanced wrapping on display heads; buttons untracked. */
.heroTitle,
.fieldIntro .heroTitle,
.sectionTitle {
    text-wrap: balance;
}

.heroButton {
    letter-spacing: 0;
}

/* Mono is for dates, versions and code; the subtitle is prose. */


#navigation .navFindButton.nav-link {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
}

/* Surfaces: a hairline plus two soft layers (after Linear). Hover deepens the shadow; nothing lifts. */
:root {
    --shadow-card-craft: 0 0 0 1px var(--lab-line), 0 1px 2px rgb(0 0 0 / 0.08), 0 8px 24px -12px rgb(0 0 0 / 0.22);
    --shadow-card-craft-hover: 0 0 0 1px var(--lab-line-strong), 0 1px 2px rgb(0 0 0 / 0.1), 0 16px 36px -14px rgb(0 0 0 / 0.32);
}

body.dark-mode {
    --shadow-card-craft: 0 0 0 1px var(--lab-line), 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.6);
    --shadow-card-craft-hover: 0 0 0 1px var(--lab-line-strong), 0 1px 2px rgb(0 0 0 / 0.35), 0 16px 36px -14px rgb(0 0 0 / 0.75);
}

/* The image box holds its size and a tint before the image arrives. */


/* Field controls: one cast choice in the toolbar; the season pair sits quietly in the map's corner. */
.fieldCastChoices,
.fieldSeasonChoices,
.fieldCastChoices button,
.fieldSeasonChoices button {
    border-radius: var(--radius-control);
}

.fieldWorld .fieldSeasonChoices {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 30;
    padding: 2px;
    gap: 2px;
}

.fieldWorld .fieldSeasonChoices button {
    min-width: 0;
    width: 44px;
    height: 40px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}


/* Links: a tinted, offset underline that takes the link colour on hover. */
.logEntry a,
.logMore,
.sectionIntro a,
.contactCopy a,
.heroProof,
.heroTextLink {
    text-decoration-line: underline;
    text-decoration-color: var(--lab-line-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-color var(--dur-ui) var(--ease-standard), color var(--dur-hover) var(--ease-standard), transform var(--dur-press) var(--ease-out);
}

@media (hover: hover) {
    .logEntry a:hover,
    .logMore:hover,
    .sectionIntro a:hover,
    .contactCopy a:hover,
    .heroProof:hover {
        text-decoration-color: currentColor;
    }
}

/* The proof line: a count and a date anyone can check against the lab log. */
.heroProofLine {
    margin: 18px 0 0;
}

.heroProof {
    color: var(--lab-muted);
    font-family: var(--font-data);
    font-size: 14px;
}

/* Pixel display type: whole-pixel sizes, never tracked, never below 16px. */
.heroTitle,
.fieldIntro .heroTitle,
.fieldToolbarTitle {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
}

.heroTitle,
.fieldIntro .heroTitle {
    font-size: 96px;
}

/* The line under the wordmark is prose, so it is Lato (spec section 3). */
.heroTitle .title-line {
    font-family: var(--font-body);
    font-size: 32px;
    font-weight: 400;
    line-height: 1.2;
    display: block;
    margin-top: 16px;
}

.fieldToolbarTitle {
    font-size: 24px;
}

@media (max-width: 560px) {
    .heroTitle,
    .fieldIntro .heroTitle {
        font-size: 48px;
    }

    .heroTitle .title-line {
        font-size: 24px;
    }
}

/* The secondary action is a quiet text link beside the one button. */
.heroTextLink {
    align-self: center;
    margin-left: 8px;
    color: var(--lab-ink);
    font-family: var(--font-body);
    font-weight: 700;
}

@media (hover: hover) {
    .heroTextLink:hover {
        color: var(--lab-accent);
        text-decoration-color: currentColor;
    }
}

.heroTextLink:focus-visible {
    outline: 3px solid var(--lab-accent);
    outline-offset: 4px;
}

/* Vellum's shape: the words sit on top, the cast spreads wide beneath them and spills
   past the hero's lower edge. A wide field also gives 2x characters room to move. */
@media (min-width: 900px) {
    #heroSection {
        position: relative;
        z-index: 2;
    }

    #portfolioField {
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        min-height: 0;
        gap: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    .fieldIntro {
        padding-top: 0;
        padding-bottom: 0;
    }

    .fieldScene {
        position: relative;
        width: 100%;
        max-width: 1000px;
        margin: 8px auto -200px;
    }

    /* The toolbar sits in the map's empty sky instead of a row of its own, so the cast
       climbs onto the first screen. The season pair keeps the top-left corner. */
    .fieldToolbar {
        position: absolute;
        top: 12px;
        left: 120px;
        right: 12px;
        z-index: 31;
        padding: 0;
    }

    .fieldIntro .heroProofLine {
        margin-top: 12px;
    }

    .heroTitle .title-line {
        margin-top: 8px;
    }

}

/* RPG skin: one 9-slice pixel frame (images/ui, built by scripts/build-portfolio-field-art.py).
   The hard 2px shadow lives in the art, so framed boxes drop their soft shadows. */
.pixelFrame {
    border-style: solid;
    border-width: 8px;
    border-radius: 0;
    border-image: url(../images/ui/pixel-frame-day.svg) 8 fill / 8px / 0 stretch;
    image-rendering: pixelated;
    background: none;
    box-shadow: none;
}

body.dark-mode .pixelFrame {
    border-image-source: url(../images/ui/pixel-frame-night.svg);
}

/* Projects as item cards: the frame replaces the soft shadow; hover brightens, nothing lifts. */


/* Filters as a game menu: pixel type, a ► cursor on the active item, its width reserved on every
   item so choosing one never shifts the row. */


/* The pressed toggle rests on the same hard shadow as every control. */
.fieldCastChoices button[aria-pressed="true"],
.fieldSeasonChoices button[aria-pressed="true"],
body.dark-mode .fieldCastChoices button[aria-pressed="true"],
body.dark-mode .fieldSeasonChoices button[aria-pressed="true"] {
    box-shadow: 0 2px 0 var(--lab-line-strong);
}

/* The field card as an RPG dialogue box: the speaker's portrait, a pixel name tag, the line. */
.fieldSelectionCard.pixelFrame {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 12px;
    align-items: start;
}

/* The link and every later line stay in the text column; the portrait owns column one. */
.fieldSelectionCard.pixelFrame > :not(.fieldSelectionPortrait):not(.fieldSelectionClose) {
    grid-column: 2;
}

.fieldSelectionCard.pixelFrame,
body.dark-mode .fieldSelectionCard.pixelFrame {
    background: none;
}

.fieldSelectionPortrait {
    width: 64px;
    height: 80px;
    image-rendering: pixelated;
}

.fieldSelectionTitle {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
}

/* Phones: the hero actions leave the launcher's column free, so it never covers them. */
@media (max-width: 560px) {
    .heroActions {
        padding-right: 64px;
    }
}

/* Without JS the deck cannot flip, so the plain project grid stands in for it. */

