/* The front page, in screens.
 *
 * Each section fills the view under the bar and the page snaps from one to
 * the next. The bar stays put, so a screen never scrolls it away and the
 * first snap point is the top of the page. The footer is the last stop. */
html.isHome { scroll-snap-type: y mandatory; scroll-padding-top: var(--navH, 97px); }
/* A screen taller than the view: a stop only when one is near, never a jolt past what has not been read. */
html.isHome.isLoose { scroll-snap-type: y proximity; }
.isHome > nav {
    position: sticky; top: 0; z-index: 60;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.isHome .screen { scroll-snap-align: start; scroll-snap-stop: always; box-sizing: border-box; min-height: calc(100svh - var(--navH, 97px)); }
.isHome > footer { scroll-snap-align: end; }

/* The first screen: the line, its caption and the one button in the middle;
   the places Lafter is elsewhere around them, each at its own tilt. */
.isHome .hero { position: relative; max-width: none; margin: 0; padding: 2rem 2rem 3rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.heroInner { max-width: 800px; }
/* The tournaments, named in gold in the caption, are the way to them. */
.hero p a.featEm { color: var(--gold); text-decoration: none; }
.hero p a.featEm:hover { color: var(--gold-light); text-decoration: underline; text-underline-offset: 0.16em; }
.heroMedia { position: absolute; inset: 0; pointer-events: none; }
.mediaTile {
    position: absolute; left: var(--x, auto); right: var(--r, auto); top: var(--y, auto); bottom: var(--b, auto);
    pointer-events: auto;
    display: inline-flex; align-items: center; gap: 0.7rem;
    padding: 0.7rem 1.1rem 0.7rem 0.9rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0,0,0,calc(0.35 * var(--shk)));
    color: var(--heading); text-decoration: none;
    font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; line-height: 1;
    /* The whole tile breathes, mark and name riding inside it; the tilt and
       the phone's lift are part of the same transform, so nothing inside
       moves on its own. */
    transform: rotate(var(--tilt, 0deg)) translateY(var(--dy, 0px));
    animation: tilePulse 3.4s ease-in-out infinite;
    animation-delay: var(--beat, 0s);
    transition: border-color 0.25s, color 0.25s, box-shadow 0.25s;
}
@keyframes tilePulse {
    0%, 100% { transform: rotate(var(--tilt, 0deg)) translateY(var(--dy, 0px)) scale(1); }
    50% { transform: rotate(var(--tilt, 0deg)) translateY(var(--dy, 0px)) scale(1.06); }
}
/* Hovered it puffs up where it sits, tilt and all. */
.mediaTile:hover { animation: none; transform: rotate(var(--tilt, 0deg)) translateY(var(--dy, 0px)) scale(1.12); border-color: var(--gold-dim); color: var(--gold); box-shadow: 0 10px 24px rgba(0,0,0,calc(0.4 * var(--shk))), 0 0 0 1px color-mix(in srgb, var(--gold) 12%, transparent); }
/* The mark alone, in gold, no tile around it: a square box is the site's
   icon for a feature card, and these are not features. */
/* Each mark's box is cut to its own drawing, so the three fill the same 36px. */
.mediaTile .mediaIcon { width: 36px; height: 36px; flex: none; fill: none; stroke: var(--brand, var(--gold)); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* The way down: a chevron under the button, bobbing, that takes the page to
   the next screen. The screens below have none. */
/* The hover sits on a still wrapper: the chevron itself moves, and a hover
   on a thing that slides out from under the cursor flickers on and off. */
.heroDownWrap { display: block; width: 64px; margin: 1.2rem auto 0; padding: 8px; cursor: pointer; opacity: 1; transition: opacity 0.4s ease; }
/* "show the arrows after page standstill and remove once they start scrolling but remove smoothly" (the owner,
   2026-11-26): the page moving, they fade out and take no press; it standing still again, they fade back (index.php
   sets isMoving). */
html.isMoving .heroDownWrap { opacity: 0; pointer-events: none; transition-duration: 0.25s; }
@media (prefers-reduced-motion: reduce) { .heroDownWrap { transition: none; } }
.heroDown { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0; background: none; border: 0; padding: 0; color: var(--gold-light); cursor: pointer; animation: heroBob 2.4s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(224,197,106,0.45)); }
.heroDown svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Hovered it holds still where it is. */
.heroDownWrap:hover .heroDown { animation-play-state: paused; }
.isHome .screen { position: relative; }

/* The tools light up one after another while the screen is in view: the
   electric border the site's first steps had, cell by cell down the rows. */
/* The current is a second border around the card, bent by a noise filter
   (#electric, in the page) that re-rolls many times a second: a jagged,
   crawling line. The card itself holds still and stays readable. */
.isHome .feature { position: relative; transition: transform 0.25s, box-shadow 0.25s; }
/* The current is the card's edge while it runs: the card's own border goes
   clear and the jagged line sits where it was. One line, never two. */
.isHome .feature.isLit, .isHome .feature:hover, .isHome .feature.isOut { border-color: transparent; }
/* The card trembles under the current, a hair at a time, in steps like the
   line: the whole card moves as one, so its words stay readable. The hover's
   lift is a transform; this is translate, so the two add. */
.isHome .feature.isLit, .isHome .feature:hover { animation: cardShake 0.36s steps(1, end) infinite; }
@keyframes cardShake {
    0% { translate: 0 0; }
    18% { translate: 0.7px -0.4px; }
    37% { translate: -0.6px 0.5px; }
    55% { translate: 0.5px 0.7px; }
    74% { translate: -0.7px -0.5px; }
    90% { translate: 0.3px -0.3px; }
    100% { translate: -0.2px 0.4px; }
}
.isHome .feature:hover { box-shadow: 0 8px 24px rgba(0,0,0,calc(0.4 * var(--shk))); }
.isHome .feature.isLit::after, .isHome .feature:hover::after, .isHome .feature.isOut::after {
    content: ''; position: absolute; inset: -1px; z-index: 1; pointer-events: none;
    border: 2px solid var(--gold-light); border-radius: 5px;
    filter: url(#electric) drop-shadow(0 0 4px rgba(240,184,64,0.85)) drop-shadow(0 0 10px color-mix(in srgb, var(--gold) 45%, transparent));
    animation: electric-flicker 0.42s steps(1, end) infinite;
}
@keyframes electric-flicker {
    0% { opacity: 1; border-color: var(--gold-light); }
    23% { opacity: 0.6; border-color: var(--gold); }
    31% { opacity: 1; border-color: #fff1c0; }
    47% { opacity: 0.75; border-color: var(--gold-dim); }
    58% { opacity: 1; border-color: var(--gold-light); }
    79% { opacity: 0.5; border-color: var(--gold); }
    88% { opacity: 1; border-color: #fff1c0; }
    100% { opacity: 0.9; border-color: var(--gold-light); }
}
/* A phone: the current is a soft gold edge that breathes. The jagged line is
   an SVG noise filter re-rolled eight times a second with two drop shadows
   on top, and a phone redraws the whole card for every roll; the tremble is a
   second animation on the same card. Neither is here. What moves is one
   opacity, which costs nothing. */
@media (hover: none), (max-width: 760px) {
    .isHome .feature.isLit, .isHome .feature:hover { animation: none; }
    .isHome .feature.isLit::after, .isHome .feature:hover::after, .isHome .feature.isOut::after {
        filter: none;
        box-shadow: 0 0 10px rgba(240,184,64,0.5), inset 0 0 8px rgba(240,184,64,0.12);
        animation: electric-breathe 2.4s ease-in-out infinite;
    }
}
@keyframes electric-breathe {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
/* While anything is out of its place, the ones pulled out carry the current and the cycle's cell goes quiet: what is out is what is picked. */
body.isToyOut .feature.isLit:not(.isOut):not(:hover)::after { display: none; }
body.isToyOut .feature.isLit:not(.isOut):not(:hover) { border-color: var(--border); animation: none; }
/* With a card under the cursor, that one alone: the cycle's cell keeps its plain edge. */
.isHome .features:has(.feature:hover) .feature.isLit:not(:hover):not(.isOut)::after { display: none; }
.isHome .features:has(.feature:hover) .feature.isLit:not(:hover):not(.isOut) { border-color: var(--border); }

/* A card dragged out of its slot flies: it falls, bounces off the view's edges
   and the bar, and lies where it stops, its current with it. The slot it left
   stays hollow until it is back: dragged in, bounced in by more than half, or
   the page scrolled. */
.isHome .feature.isOut { position: fixed; z-index: 55; margin: 0; cursor: grabbing; transition: none; transform: none; animation: none; box-shadow: 0 18px 40px rgba(0,0,0,0.6); user-select: none; -webkit-user-select: none; }
.isHome .feature.isOut.isSnap { transition: left 0.18s ease-out, top 0.18s ease-out; }
.isHome .feature.isOut.isGone { opacity: 0; transition: opacity 0.18s; }
/* Over a bar slot: the card shrinks toward the hand, so the slot shows under it. */
.isHome .feature.isOut.isNearSlot { transform: scale(0.42); transform-origin: var(--hx, 50%) var(--hy, 50%); transition: transform 0.15s; }
/* Into a bar slot: the card shrinks to the slot and fades; the quick link takes its place. */
.isHome .feature.isOut.isPark { transition: left 0.22s ease-in, top 0.22s ease-in, width 0.22s ease-in, height 0.22s ease-in, opacity 0.22s; opacity: 0; overflow: hidden; }
.isHome .feature.isBack { animation: featBack 0.3s ease-out; }
@keyframes featBack { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.featureSlot { box-sizing: border-box; border: 1px dashed var(--gold-dim); border-radius: 4px; background: rgba(0,0,0,0.28); box-shadow: inset 0 3px 10px rgba(0,0,0,0.5); transition: border-color 0.2s, box-shadow 0.2s; }
.featureSlot.isNear { border-color: var(--gold-light); box-shadow: inset 0 0 0 1px rgba(224,197,106,0.25), inset 0 3px 10px rgba(0,0,0,0.5); }
/* The button the pointer lands on: one gentle swell and a ring going out from
   it, press this; then as it was. The pointer presses nothing itself. */
.isHome .badge.isLanded { animation: badgeLand 1.1s ease-out 1; }
@keyframes badgeLand {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(240,184,64,0.6); }
    35% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(240,184,64,0.3), 0 0 14px rgba(240,184,64,0.5); }
    100% { transform: scale(1); box-shadow: 0 0 0 16px rgba(240,184,64,0), 0 0 0 rgba(240,184,64,0); }
}

/* Data Usage: a drawn pointer that leaves your cursor, finds a button and presses it. */
/* It eases out of where it starts and into where it lands, a hand's move, not a dart's. */
.handCursor { position: fixed; left: 0; top: 0; width: 28px; height: 28px; z-index: 70; pointer-events: none; opacity: 0; transform: translate(-4px, -2px); transition: left 1.6s cubic-bezier(0.6, 0.02, 0.2, 1), top 1.6s cubic-bezier(0.6, 0.02, 0.2, 1), opacity 0.5s ease, transform 0.2s ease; fill: none; stroke: var(--gold-light); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(224,197,106,0.5)); }
.handCursor.isOn { opacity: 1; }
.handCursor.isPress { transform: translate(-4px, -2px) scale(0.82); }
@keyframes heroBob { 0%, 100% { transform: translateY(0); opacity: 0.7; } 50% { transform: translateY(7px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mediaTile, .heroDown, .isHome .feature.isLit, .isHome .feature:hover, .isHome .feature.isLit::after, .isHome .feature:hover::after, .isHome .feature.isOut::after { animation: none; } .handCursor { display: none; } }
/* Lafter's sponsors (index.php): a slot stands where a tile would, and the tile in it, tilt and breath and all. An open
   one is a dashed outline, the sponsor page's stand-in; a sponsor's is its logo. */
.sponsorSlot { position: absolute; left: var(--x, auto); right: var(--r, auto); top: var(--y, auto); bottom: var(--b, auto); }
.sponsorSlot > .mediaTile { position: static; }
.sponsorSlot > .mediaTile[hidden] { display: none; }
.sponsorTile { min-height: calc(36px + 1.4rem + 2px); }
.sponsorTile.isOpen { border-style: dashed; border-color: var(--gold-dim); color: var(--gold); }
.sponsorTile img { display: block; height: 36px; width: auto; max-width: 150px; object-fit: contain; }
/* A name with no logo wraps past 200px rather than reaching across the line. */
.sponsorTile:not(:has(img)) { max-width: 200px; white-space: normal; line-height: 1.1; }
.sponsorSlot[hidden], .sponsorTile.isSpare { display: none; }
@media (max-width: 1100px) { .mediaTile { font-size: 1.15rem; } }
/* A narrow screen has no room beside the line: the three sit under the
   button, still each at its own tilt and height. */
@media (max-width: 760px) {
    .heroMedia { position: static; display: flex; justify-content: center; align-items: flex-start; gap: 0.9rem; flex-wrap: wrap; margin-top: 2.6rem; }
    .mediaTile { position: static; min-height: 44px; }
    .sponsorSlot { position: static; }
}

/* The second and third screens: what they hold, in the middle of the screen.
   The tools sit a little tighter than on a page that scrolls, so the nine of
   them and the Connector fit one screen on a laptop. */
.isHome .features { margin: 0 auto; padding: 2.6rem 2rem; gap: 0.9rem; align-content: center; }
.isHome .feature { padding: 1.1rem 1.25rem; }
/* A title that goes somewhere says so: the site's chevron after it, small, dim gold, lit with the title. Feste's
   too, whose card opens Feste from its corner. A card that only tells (Mirth) has none.
   Its middle is the middle of the small letters: half an x-height over the baseline, by the font's own measure
   (ex), so it sits on the line of the word whatever the face. It had ridden 2.5px over that. */
.isHome a.feature-head h3::after, .isHome a.feature h3::after, .isHome button.feature h3::after, .isHome a.featTool > b::after {
    content: ''; display: inline-block; box-sizing: border-box; width: 0.4em; height: 0.4em; margin-left: 0.55em; vertical-align: calc(0.5ex - 0.2em);
    border-top: 2px solid var(--gold-dim); border-right: 2px solid var(--gold-dim); transform: rotate(45deg);
    transition: border-color 0.2s;
}
.isHome a.feature-head:hover h3::after, .isHome a.feature:hover h3::after, .isHome button.feature:hover h3::after, .isHome a.featTool:hover > b::after { border-color: var(--gold); }
/* The tools' two chevrons: back up, over them, and on, under them. The first
   screen's chevron, each in the middle of its band, so the gap from the bar
   to the chevron, from it to the tools, from the tools to the next and from
   that to the foot of the screen are one size.
   The bands are the grid's first and last rows and split what the tools
   leave of the screen. A band's box takes in the row gap beside it, so it is
   the whole of the empty band and its middle is the band's middle. A band
   too short for a chevron with air round it draws none and costs the screen
   nothing: the tools keep the room they had. Stacked in one column the
   tools fill the screen and a thumb moves it: no bands.
   Signed out, the theme switch is pinned to the foot of the view, in the
   middle, where the second chevron would stand. Where the chevrons fit with
   it there, the screen keeps the switch's place clear at its foot (--foot,
   set by the page, which knows how tall the tools came out): the tools sit
   between the bar and the switch and the gaps are still one size. Where
   they do not fit, --foot is nothing and the screen is as it was. */
.screenBand { display: none; }
@media (min-width: 769px) {
    .isHome .features { padding-top: 0; padding-bottom: var(--foot, 0px); grid-template-rows: minmax(1.7rem, 1fr) repeat(4, auto) minmax(1.7rem, 1fr); }
    /* The chevron is out of the band's flow, so the band is as tall as the screen leaves it and no taller. It is
       drawn where the page has found room (isRoomy, 80px or more, set by a watcher in the page). A size container
       did that here in CSS, and each time a card's hover changed the browser styled the band's inside again and
       started the chevron's bob over: run a pointer across the cards and the two chevrons jumped about. */
    .screenBand { display: block; position: relative; grid-column: 1 / -1; min-height: 0; }
    .screenBand .heroDownWrap { display: none; position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
    .screenBand.isRoomy .heroDownWrap { display: block; }
    .features > .screenBand.isTop { grid-row: 1; margin-bottom: -0.9rem; }
    .features > .screenBand.isEnd { grid-row: 6; margin-top: -0.9rem; }
    /* The last screen, a column with its card in the middle: a band over the card with the way back up, and its
       empty twin under it, so the card stays where it was. Each takes in the screen's own padding on its side, so
       it is the whole of the empty band. */
    .screenData > .screenBand { flex: 1 1 0; align-self: stretch; }
    .screenData > .screenBand.isTop { margin-top: -2rem; }
    .screenData > .screenBand.isEnd { margin-bottom: -2rem; }
    .screenBand .heroDownWrap { margin: 0; }
}
/* The one that points up rises as it bobs. */
.heroDown.isUp { animation-name: heroBobUp; }
@keyframes heroBobUp { 0%, 100% { transform: translateY(0); opacity: 0.7; } 50% { transform: translateY(-7px); opacity: 1; } }
.isHome .screenData { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem; }
.isHome .data-section { width: 100%; margin: 0 auto; }
