@font-face
{
    font-family: "Shippori Mincho B1";
    src: url("./fonts/shippori-mincho-b1-latin-500-normal.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}
@font-face
{
    font-family: "Shippori Mincho B1";
    src: url("./fonts/shippori-mincho-b1-latin-700-normal.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}
@font-face
{
    font-family: "Instrument Sans Variable";
    src: url("./fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}
:root
{
    --water: #0E3B43;
    --vermilion: #F2542D;
    --cream: #F5EFE0;
    --gold: #E0B04A;
    --deep: #082A31;
    --night: #061C24;
    --ink: #10262B;
    --pad: #2E6F5E;
    --pad-light: #4C9A7A;
    --stone: #6F8480;
    --stone-light: #8FA39D;
    --wood: #7A4A2E;
    --blush: #F6B8A8;
    --ice: #CFE6E4;
    --amber: #C98F3A;
    --display: "Shippori Mincho B1", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --text: "Instrument Sans Variable", system-ui, sans-serif;
    --out: cubic-bezier(0.22, 1, 0.36, 1);
    --inout: cubic-bezier(0.65, 0, 0.35, 1);
    color: var(--cream);
    font-family: var(--text);
    color-scheme: dark;
}
*
{
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
html, body, #pond
{
    width: 100%;
    height: 100%;
    height: 100dvh;
    overscroll-behavior: none;
}
#pond, canvas, #interface
{
    position: fixed;
    inset: 0;
}
canvas
{
    width: 100%;
    height: 100%;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
#water
{
    background: radial-gradient(ellipse at center, #0E3B43, #082A31);
}
#surface
{
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23F5EFE0' opacity='.7'/%3E%3C/svg%3E") 12 12, crosshair;
    outline-offset: -4px;
}
#interface
{
    pointer-events: none;
    text-shadow: 0 1px 18px rgba(8, 42, 49, 0.55);
}
button, a
{
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto;
    touch-action: manipulation;
}
button
{
    color: inherit;
    font: 600 13px var(--text);
    border: 0;
    cursor: pointer;
    background: transparent;
    min-height: 44px;
    transition: color 240ms var(--out), background 240ms var(--out), transform 240ms var(--out);
}
button:active
{
    transform: scale(0.96);
}
button:focus-visible, a:focus-visible, canvas:focus-visible
{
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
svg
{
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}
.intro, .wordmark
{
    position: absolute;
    left: calc(56px + env(safe-area-inset-left));
    top: calc(56px + env(safe-area-inset-top));
}
.intro
{
    transition: opacity 800ms var(--inout), transform 800ms var(--inout);
}
h1
{
    font: 500 clamp(44px, 8.4vw, 128px)/0.95 var(--display);
    letter-spacing: -0.01em;
    margin: 0 0 22px -4px;
}
.tagline
{
    font-size: 17px;
    line-height: 1.45;
    opacity: 0.78;
    margin: 0;
}
.hints
{
    display: flex;
    gap: 20px;
    position: absolute;
    left: calc(56px + env(safe-area-inset-left));
    top: calc(56px + clamp(44px, 8.4vw, 128px) * 0.95 + 76px + env(safe-area-inset-top));
    transition: opacity 600ms var(--inout), top 600ms var(--inout);
}
.hint
{
    display: flex;
    gap: 7px;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(245, 239, 224, 0.72);
    white-space: nowrap;
}
.hint svg
{
    width: 14px;
    height: 14px;
}
.hint.done
{
    opacity: 0.35;
}
.hint.done svg
{
    color: var(--gold);
}
.wordmark
{
    font: 700 22px var(--display);
    opacity: 0;
    transition: opacity 400ms var(--inout) 300ms;
}
.touched .intro
{
    opacity: 0;
    transform: translateY(-12px);
}
.touched .wordmark
{
    opacity: 1;
}
.touched .hints
{
    top: calc(112px + env(safe-area-inset-top));
}
.hints.dismissed
{
    opacity: 0;
}
.dock
{
    position: absolute;
    bottom: calc(24px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    height: 56px;
    border-radius: 999px;
    background: rgba(8, 42, 49, 0.62);
    border: 1px solid rgba(245, 239, 224, 0.14);
    backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 12px 40px rgba(4, 22, 27, 0.35);
    transition: opacity 240ms var(--out), margin-bottom 240ms var(--out);
    pointer-events: auto;
}
.seasons
{
    display: flex;
    gap: 4px;
    position: relative;
}
.season-thumb
{
    position: absolute;
    height: 44px;
    width: 105px;
    left: 0;
    top: 0;
    background: var(--cream);
    border-radius: 999px;
    transition: transform 360ms var(--out), width 360ms var(--out);
}
.season-button
{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    width: 105px;
    border-radius: 999px;
}
.season-button[aria-pressed="true"]
{
    color: var(--water);
}
.season-button:hover:not([aria-pressed="true"]), .toggle:hover
{
    background: rgba(245, 239, 224, 0.08);
}
.divider
{
    width: 1px;
    height: 22px;
    background: rgba(245, 239, 224, 0.17);
    margin: 0 6px;
}
.toggle
{
    position: relative;
    border-radius: 999px;
    display: grid;
    place-items: center;
    width: 44px;
}
.toggle[aria-pressed="true"]
{
    color: var(--gold);
}
.toggle[aria-pressed="true"]::after
{
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    bottom: 3px;
}
.tooltip
{
    position: absolute;
    bottom: calc(100% + 15px);
    background: var(--deep);
    color: var(--cream);
    padding: 9px 13px;
    font: 500 12px var(--text);
    border-radius: 999px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 240ms var(--out);
    white-space: nowrap;
}
.toggle:hover .tooltip, .toggle:focus-visible .tooltip
{
    opacity: 1;
    transition-delay: 400ms;
}
.focus-button, .primary
{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--water);
    padding: 0 18px;
    white-space: nowrap;
}
.focus-button:hover, .primary:hover
{
    background: var(--cream);
}
.credit
{
    position: absolute;
    left: calc(56px + env(safe-area-inset-left));
    bottom: calc(40px + env(safe-area-inset-bottom));
    font-size: 11px;
    color: var(--cream);
    opacity: 0.6;
    text-decoration: none;
    transition: opacity 240ms var(--out);
}
.credit:hover
{
    opacity: 1;
}
.season-card
{
    position: absolute;
    width: 100%;
    top: 34%;
    text-align: center;
    opacity: 0;
}
.season-card h2
{
    font: 500 clamp(40px, 6vw, 92px)/1.2 var(--display);
    margin: 0 0 10px;
}
.season-card p
{
    font-size: 15px;
    opacity: 0.78;
    margin: 0;
}
.season-card.reveal
{
    animation: season-reveal 2.8s var(--out) both;
}
@keyframes season-reveal
{
    0% { opacity: 0; transform: translateY(12px); }
    18%, 75% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-4px); }
}
.idle .dock
{
    opacity: 0;
    margin-bottom: -8px;
    pointer-events: none;
}
.idle .wordmark, .idle .credit
{
    opacity: 0;
    pointer-events: none;
}
.focusing .dock, .focusing .intro, .focusing .hints, .focusing .wordmark, .focusing .credit
{
    opacity: 0;
    pointer-events: none;
    transition: opacity 800ms var(--inout);
}
.focusing #surface
{
    cursor: none;
}
.focus-hud
{
    opacity: 0;
    transition: opacity 800ms var(--inout);
}
.focusing .focus-hud
{
    opacity: 1;
}
.time-left
{
    position: absolute;
    bottom: calc(36px + env(safe-area-inset-bottom));
    left: calc(56px + env(safe-area-inset-left));
    font: 500 28px var(--display);
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    color: rgba(245, 239, 224, 0.28);
}
.progress
{
    position: absolute;
    height: 2px;
    bottom: 0;
    width: 100%;
    background: rgba(245, 239, 224, 0.1);
}
.progress span
{
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: left;
    transform: scaleX(0);
    background: rgba(224, 176, 74, 0.55);
}
.focus-controls
{
    position: absolute;
    top: calc(24px + env(safe-area-inset-top));
    right: calc(24px + env(safe-area-inset-right));
    border-radius: 999px;
    background: rgba(8, 42, 49, 0.75);
    border: 1px solid rgba(245, 239, 224, 0.14);
    padding: 2px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: auto;
    transition: opacity 240ms var(--out);
}
.focus-controls button
{
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 999px;
}
.focus-controls button:hover
{
    background: rgba(245, 239, 224, 0.1);
}
.focus-hud:not(.awake) .focus-controls
{
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}
body:not(.focusing) .focus-controls, body:not(.focusing) .focus-controls button
{
    pointer-events: none;
    visibility: hidden;
}
.complete
{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, calc(100% - 40px));
    background: rgba(8, 42, 49, 0.88);
    border: 1px solid rgba(245, 239, 224, 0.14);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 40px rgba(4, 22, 27, 0.35);
    text-align: center;
    pointer-events: auto;
}
.complete[hidden]
{
    display: none;
}
.complete h2
{
    font: 500 36px/1.2 var(--display);
    margin: 0 0 16px;
}
.complete p
{
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.78;
    margin: 0 0 24px;
}
.complete button
{
    width: 100%;
}
.invitation
{
    animation: invitation 2.4s var(--inout) 3;
}
@keyframes invitation
{
    0%, 100% { box-shadow: 0 0 0 0 rgba(224, 176, 74, 0); }
    45% { box-shadow: 0 0 0 4px rgba(224, 176, 74, 0.24); }
}
.sr-only
{
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}
@media (max-width: 899px), (orientation: portrait)
{
    .intro, .wordmark
    {
        left: calc(20px + env(safe-area-inset-left));
        top: calc(32px + env(safe-area-inset-top));
    }
    .intro
    {
        max-width: 50vw;
    }
    h1
    {
        font-size: clamp(44px, 9vw, 76px);
        margin: 0 0 18px -2px;
    }
    .tagline
    {
        font-size: 15px;
        max-width: 180px;
    }
    .hints
    {
        flex-direction: column;
        gap: 13px;
        top: calc(172px + env(safe-area-inset-top));
        left: calc(20px + env(safe-area-inset-left));
    }
    .touched .hints
    {
        top: calc(89px + env(safe-area-inset-top));
    }
    .dock
    {
        left: calc(12px + env(safe-area-inset-left));
        right: calc(12px + env(safe-area-inset-right));
        width: auto;
        transform: none;
        height: 60px;
        padding: 5px;
        gap: 0;
    }
    .seasons
    {
        width: 50%;
        gap: 0;
        flex-shrink: 0;
    }
    .season-button
    {
        width: 25%;
        padding: 0;
        min-height: 48px;
    }
    .season-thumb
    {
        height: 48px;
    }
    .season-button .label, .focus-button .label, .divider
    {
        display: none;
    }
    .toggle, .focus-button
    {
        width: 12.5%;
        padding: 0;
        min-width: 0;
        min-height: 48px;
    }
    .focus-button
    {
        gap: 3px;
        font-size: 10px;
    }
    .focus-button svg
    {
        width: 16px;
    }
    .credit
    {
        left: calc(20px + env(safe-area-inset-left));
        bottom: calc(102px + env(safe-area-inset-bottom));
        font-size: 10px;
    }
    .time-left
    {
        left: calc(20px + env(safe-area-inset-left));
    }
    .season-card
    {
        top: 38%;
    }
}
@media (prefers-reduced-motion: reduce)
{
    *, *::before, *::after
    {
        animation-duration: 400ms !important;
        transition-duration: 150ms !important;
        transition-delay: 0ms !important;
    }
    .intro, .season-card
    {
        transform: none !important;
    }
    .invitation
    {
        animation: none;
    }
    .season-card.reveal
    {
        animation-duration: 2.8s !important;
        animation-name: season-reduced;
    }
    @keyframes season-reduced
    {
        0%, 100% { opacity: 0; }
        18%, 75% { opacity: 1; }
    }
}
