/* ==========================================================================
   joeyvilleneuve.ca - site.css
   Palette plus the name, hero, portrait and Overplus box.
   Shared styles are in core/core.css (loads first).

   Neutrals are the Overplus ones shifted to a cool hue. The mint is matched to
   the Overplus red by eye and is only 2.45:1 on paper, so controls use
   --accent-strong.
   ========================================================================== */

/* TOKENS -------------------------------------------------------------------*/
:root {
    --ink: #181B1D;
    --paper: #E0E8EC;
    --mint: #00A87D;           /* looks as bright as the Overplus red */
    --accent: var(--mint);
    --accent-strong: #00926D;  /* darker mint for 3:1 on paper (switch thumb) */

    /* light (default) */
    --ground: var(--paper);
    --figure: var(--ink);
    --muted: #4B545A;          /* secondary text, 7:1 on raised */
    --rule: #ADBCC5;           /* decorative hairlines */
    --line: #6D7A82;           /* control outlines and link underlines, 3.5:1 */
    --raised: #EFF4F7;         /* panels, cards, footer */
    --media: #D0DAE1;          /* behind posters and video */
    --grain-blend: multiply;
    --grain-opacity: 0.22;

    --wrap: 76rem;
    /* the Overplus mark uses Overplus's own ink/paper, keep in sync with overplus.ca/site.css */
    --mark-tile: #1C1A17;

    color-scheme: light;
}

:root[data-theme="dark"] {
    --ground: var(--ink);
    --figure: var(--paper);
    --muted: #929FA7;
    --rule: #32383B;
    --line: #636E74;
    --raised: #1E2225;
    --media: #101314;
    --accent-strong: var(--accent);   /* mint is already 5.7:1 on ink */
    --grain-blend: screen;
    --grain-opacity: 0.05;
    --mark-tile: #E9E6DF;
    color-scheme: dark;
}

/* hardcoded, ::backdrop doesn't reliably inherit custom properties */
.modal::backdrop {
    background: rgba(12, 14, 15, 0.6);
}

/* SITE NAME ----------------------------------------------------------------*/
.site-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--figure);
    text-decoration: none;
    white-space: nowrap;
}
/* mint square as the period */
.name-tile {
    display: inline-block;
    width: 0.3em;
    height: 0.3em;
    margin-left: 0.1em;
    background: var(--accent);
}
/* hop on hover (site.js adds the class) */
.name-tile.is-bouncing {
    animation: tile-hop 0.7s both;
}
@keyframes tile-hop {
    0% { transform: translateY(0); animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1); }
    34% { transform: translateY(-0.6em); animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.4); }
    62% { transform: translateY(0); animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1); }
    78% { transform: translateY(-0.14em); animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.4); }
    92%, 100% { transform: translateY(0); }
}

/* HERO ---------------------------------------------------------------------*/
.hero {
    padding-top: clamp(3rem, 9vh, 6rem);
}
.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 16rem);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
}
.hero__text {
    animation: rise 0.8s var(--ease) backwards;
}
.hero h1 {
    margin: 0.9rem 0 0.7rem;
    font-size: clamp(3rem, 1.8rem + 5vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    word-spacing: 0.06em;
    line-height: 0.9;
}
.hero__lead {
    max-width: 26ch;
    margin: 0 0 1.1rem;
    font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.015em;
}
.hero__bio {
    max-width: 60ch;
    margin: 0;
    color: var(--muted);
}

/* Overplus link box, same hover outline as the cards. Not on the page
   right now, kept in case it comes back */
.sibling {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 1rem;
    margin-top: 2rem;
    padding: 0.85rem 1.1rem;
    color: var(--figure);
    text-decoration: none;
    background: var(--raised);
    border: 1px solid var(--line);
    transition: border-color 0.2s, box-shadow 0.2s;
}
@media (hover: hover) {
    .sibling:hover {
        border-color: var(--figure);
        box-shadow: 0 0 0 1px var(--figure);
    }
}
.sibling__name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.sibling__desc {
    font-size: 0.95rem;
    color: var(--muted);
}

/* duotone portrait, colour version fades in on hover */
.portrait {
    position: relative;
    margin: 0;
    border: 1px solid var(--rule);
    animation: rise 0.8s 0.12s var(--ease) backwards;
}
.portrait img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--media);
}
.portrait__colour {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.portrait:hover .portrait__colour {
    opacity: 1;
}

/* 404 ----------------------------------------------------------------------*/
.lost h1 {
    font-size: clamp(2.75rem, 1.75rem + 6vw, 6rem);
}

/* RESPONSIVE ---------------------------------------------------------------*/
@media (max-width: 900px) {
    .hero {
        padding-top: 2rem;
    }
    .hero__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.75rem;
    }
    .portrait {
        order: -1;
        width: 7rem;
    }
}
