/*
 * The product page, redrawn 2026-10-02. It keeps the application's theme, which James defined as the
 * background and the colors: every color here is a variable of theme.css, or a tint of one. Type, layout
 * and motion are the page's own, made to sell.
 *
 * Every class starts with home-, so no other page is drawn over; the hand played in the hero is film.css.
 * Motion that is not asked for stands still: see the reduced-motion rule at the foot.
 */

/* ── The hero ─────────────────────────────────────────────────────────────── */

.home-hero { position: relative; overflow: clip; padding: 72px 0 64px; }
.home-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(55% 60% at 15% 0%, rgba(37, 198, 133, 0.20), transparent 70%),
        radial-gradient(45% 55% at 95% 35%, rgba(59, 130, 246, 0.14), transparent 70%);
}
.home-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(233, 238, 245, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(233, 238, 245, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 80% at 40% 0%, #000 20%, transparent 75%);
}
.home-hero__inner {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center;
}
.home-hero__words { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.home-hero__headline {
    font-size: clamp(44px, 5.6vw, 78px); font-weight: 700; line-height: 1.02; letter-spacing: -0.04em;
    padding-bottom: 0.08em; text-wrap: balance;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-primary) 45%, var(--accent-primary) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home-hero__subhead { font-size: clamp(15px, 1.25vw, 18px); line-height: 1.6; font-weight: 500; color: var(--text-secondary); max-width: 34em; }

.home-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.home-cta { padding: 13px 20px; font-size: 14px; border-radius: 12px; transition: transform 160ms ease, box-shadow 160ms ease; }
.home-cta:hover { transform: translateY(-1px); }
.home-cta .icon { color: currentColor; width: 18px; height: 18px; }
.home-cta--glow { box-shadow: 0 0 0 1px rgba(37, 198, 133, 0.45), 0 12px 32px -8px rgba(37, 198, 133, 0.6); }
.home-cta--glow:hover { box-shadow: 0 0 0 1px rgba(37, 198, 133, 0.6), 0 16px 40px -8px rgba(37, 198, 133, 0.75); }

/* ── What is true, scrolling past ──────────────────────────────────────────── */

.home-facts {
    overflow: hidden; padding: 18px 0;
    border-block: 1px solid var(--border-subtle); background: color-mix(in srgb, var(--bg-sidebar) 70%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.home-facts__track { display: flex; width: max-content; animation: home-marquee 40s linear infinite; }
.home-facts:hover .home-facts__track, .home-facts:has(.home-facts__pause input:checked) .home-facts__track { animation-play-state: paused; }
.home-facts__pause { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-sidebar); font-size: 11px; font-weight: 600; color: var(--text-secondary); cursor: pointer; }
.home-facts__pause:has(input:focus-visible) { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
.home-facts { position: relative; }
.home-facts__run { display: flex; gap: 56px; padding: 0 56px 0 0; margin: 0; list-style: none; }
.home-facts__run li { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--text-secondary); }
@keyframes home-marquee { to { transform: translateX(-50%); } }

/* ── Sections ──────────────────────────────────────────────────────────────── */

.home-section { padding-top: 104px; padding-bottom: 104px; }
.home-heading { display: flex; flex-direction: column; gap: 14px; margin-bottom: 44px; max-width: 760px; }
.home-heading--centered { align-items: center; text-align: center; margin-left: auto; margin-right: auto; }
.home-title { font-size: clamp(30px, 3.6vw, 48px); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.home-line { font-size: clamp(15px, 1.2vw, 17px); font-weight: 500; line-height: 1.65; color: var(--text-secondary); max-width: 40em; }

/* The notes: why PokerLens is different, in three steps, beside a player's notes. */
.home-notes { overflow-x: clip; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.home-notes__words { display: flex; flex-direction: column; gap: 16px; }
.home-steps { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: home-step; display: flex; flex-direction: column; gap: 26px; }
.home-step { position: relative; padding-left: 58px; counter-increment: home-step; display: flex; flex-direction: column; gap: 6px; }
.home-step::before {
    content: counter(home-step); position: absolute; left: 0; top: -4px;
    width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: var(--accent-dim); color: var(--accent-primary); font-weight: 700; font-size: 15px;
    box-shadow: 0 0 0 1px rgba(37, 198, 133, 0.35);
}
.home-step:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 42px; bottom: -22px; width: 1px; background: linear-gradient(var(--accent-dim), transparent); }
.home-step h3 { font-size: 17px; font-weight: 600; }
.home-step p { font-size: 14px; font-weight: 500; line-height: 1.6; color: var(--text-secondary); }

.home-notebook {
    position: relative; padding: 24px; border-radius: 22px; display: flex; flex-direction: column; gap: 12px;
    background: linear-gradient(160deg, rgba(29, 37, 48, 0.95), rgba(22, 28, 36, 0.8));
    border: 1px solid var(--border-strong);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(37, 198, 133, 0.08);
}
.home-notebook::before {
    content: ""; position: absolute; inset: -30% -20%; z-index: -1; pointer-events: none;
    background: radial-gradient(closest-side, rgba(37, 198, 133, 0.22), transparent);
}
.home-notebook__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; padding-bottom: 6px; }
.home-notebook__note {
    padding: 14px 16px; border-radius: 14px; display: flex; flex-direction: column; gap: 6px;
    background: var(--bg-raised); border: 1px solid var(--border-subtle); font-size: 14px; font-weight: 500; line-height: 1.55;
}
.home-notebook__note:first-of-type { border-color: rgba(48, 164, 108, 0.55); box-shadow: 0 0 24px rgba(48, 164, 108, 0.15); }

/* Everything else PokerLens does, as tiles of two sizes. */
.home-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.home-tile {
    position: relative; overflow: hidden; padding: 28px; border-radius: 20px;
    display: flex; flex-direction: column; gap: 12px;
    background: linear-gradient(180deg, var(--bg-surface), color-mix(in srgb, var(--bg-surface) 60%, transparent));
    border: 1px solid var(--border-subtle); color: inherit; text-decoration: none;
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
/* The tile is one target, but the link is its title alone, so a reader hears the name and not the blurb. */
.home-tile__link { color: inherit; text-decoration: none; }
.home-tile__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.home-tile__link:focus-visible { outline: none; }
.home-tile:has(.home-tile__link:focus-visible) { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
.home-tile::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 220ms ease;
    background: radial-gradient(60% 50% at 0% 0%, rgba(37, 198, 133, 0.14), transparent);
}
.home-tile:hover { transform: translateY(-4px); border-color: rgba(37, 198, 133, 0.45); box-shadow: 0 24px 50px -24px rgba(37, 198, 133, 0.4); }
.home-tile:hover::before { opacity: 1; }
.home-tile h3 { font-size: 18px; font-weight: 600; }
.home-tile p { font-size: 14px; font-weight: 500; line-height: 1.6; color: var(--text-secondary); }
.home-tile__more { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent-primary); }
.home-tile__more::after { content: "→"; transition: translate 220ms ease; }
.home-tile:hover .home-tile__more::after, .home-tile:has(.home-tile__link:focus-visible) .home-tile__more::after { translate: 4px 0; }
.home-tile:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; }
.home-tile--wide { grid-column: span 2; grid-row: span 2; }
.home-tile--wide h3 { font-size: 24px; letter-spacing: -0.02em; }
.home-rack {
    margin-top: auto; padding: 36px 20px; border-radius: 16px;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; font-size: 14px;
    background: radial-gradient(ellipse at 50% 30%, #1d6b51 0%, var(--bg-felt) 60%, #0a2a20 100%);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45);
}
.home-rack .film__name { padding-right: 0; }
.home-rack .film__panel { cursor: inherit; }
.home-rack .film__panel:nth-child(2) { transform: translateY(-10px); box-shadow: 0 0 0 3px rgba(48, 164, 108, 0.3), 0 12px 30px rgba(0, 0, 0, 0.5); }

/* Inside the application: the session screen tips up into view as it is scrolled to. */
.home-shots { overflow-x: clip; position: relative; perspective: 2000px; padding-bottom: 8%; }
.home-shot { padding: 8px; border-radius: 18px; background: var(--bg-raised); border: 1px solid var(--border-strong); }
.home-shot img { display: block; width: 100%; height: auto; border-radius: 12px; }
.home-shot--main { box-shadow: 0 50px 120px -40px rgba(37, 198, 133, 0.4); transform-origin: 50% 100%; }
.home-shot--side {
    position: absolute; right: 0; bottom: 0; width: 44%;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(37, 198, 133, 0.25);
}

.home-sites { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding-top: 24px; padding-bottom: 24px; }

/* The last word: the felt, lit from above. */
.home-final {
    position: relative; overflow: hidden; padding: 80px 32px; border-radius: 28px;
    display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
    background: radial-gradient(ellipse at 50% 0%, #1d6b51 0%, var(--bg-felt) 50%, #0a241c 100%);
    border: 1px solid rgba(37, 198, 133, 0.35);
    box-shadow: 0 40px 120px -40px rgba(37, 198, 133, 0.45);
}
.home-final .home-title { color: #e9eef5; max-width: 18em; }
.home-final .home-line { color: #b9c8c1; }
.home-final .home-actions { justify-content: center; margin-top: 8px; }

/* What scrolls into view rises into it, where the browser can tie motion to the scroll. */
@supports (animation-timeline: view()) {
    .reveal { animation: home-reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    .home-shot--main { animation: home-straighten linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
}
@keyframes home-reveal { from { opacity: 0; translate: 0 36px; } to { opacity: 1; translate: 0 0; } }
@keyframes home-straighten { from { transform: rotateX(22deg) scale(0.92); opacity: 0.6; } to { transform: none; opacity: 1; } }

/* ── Tablets and phones ────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .home-hero { padding-top: 56px; }
    .home-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
    .home-hero__words { align-items: center; text-align: center; max-width: 720px; margin: 0 auto; }
    .home-hero__subhead { margin: 0 auto; }
    .home-actions { justify-content: center; }
    .home-notes { grid-template-columns: minmax(0, 1fr); gap: 48px; }
    .home-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-tile--wide { grid-row: auto; }
    .home-tile:last-child { grid-column: span 2; }
    .home-section { padding-top: 80px; padding-bottom: 80px; }
}

@media (max-width: 640px) {
    .home-hero { padding-top: 40px; padding-bottom: 40px; }
    .home-hero__words { gap: 18px; }
    .home-actions { width: 100%; }
    .home-actions .home-cta { flex: 1 1 100%; }
    .home-bento { grid-template-columns: minmax(0, 1fr); }
    .home-tile--wide, .home-tile:last-child { grid-column: auto; }
    .home-rack { font-size: 11px; gap: 10px; padding: 24px 12px; }
    .home-rack .film__panel:nth-child(3) { display: none; }
    .home-rack .film__panel:nth-child(2) { transform: none; }
    .home-tile { padding: 22px; }
    .home-section { padding-top: 64px; padding-bottom: 64px; }
    .home-shots { padding-bottom: 0; display: flex; flex-direction: column; gap: 16px; }
    .home-shot--side { position: static; width: 100%; }
    .home-final { padding: 56px 20px; border-radius: 22px; }
    .home-step { padding-left: 52px; }
}

/* ── For a reader who asks for less motion ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .home-facts__track, .reveal, .home-shot--main { animation: none !important; }
    .home-tile, .home-cta { transition: none; }
    .home-facts { mask-image: none; }
    .home-facts__track { width: auto; }
    .home-facts__run { flex-wrap: wrap; justify-content: center; gap: 16px 40px; padding: 0 16px; }
    .home-facts__run[aria-hidden="true"] { display: none; }
}
