/* Scene pages (the holding page and the success page): the pixel scene, the
   typed headline, the growth cells, and the one-screen layout. Shared look:
   /assets/site.css. The scene is scaled by the smallest whole number that
   covers it (--px, set by /assets/scene.js). */
:root { --head-h: 3.5625rem; }

/* ---- hero: the scene ---- */
.hero-wrap { position: relative; }
.hero {
    --px: 4;
    position: relative; overflow: hidden; color: #fff; text-align: center;
    height: max(36rem, calc(100svh - var(--header-h) - var(--head-h)));
    background: url("/assets/scene.png") center bottom / cover no-repeat;
    image-rendering: pixelated;
}
.hero.px-ready { background-size: calc(312px * var(--px)) calc(144px * var(--px)); }
.hero::before {
    /* a light slate over the scene, and a soft glow behind the words only */
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 45% 45% at 50% 46%, rgba(var(--slate), 0.62), rgba(var(--slate), 0)),
        rgba(var(--slate), 0.12);
}
.hero-inner {
    position: relative; height: 100%; display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 0 1.25rem 4%;
}
.kicker { font-size: 0.75rem; color: rgba(255, 255, 255, 0.82); }
.hero h1 {
    margin-top: 2.1rem; font-family: var(--mono); font-weight: 500; letter-spacing: -0.03em;
    font-size: clamp(28px, calc(var(--frame-w) * 0.048), 96px); line-height: 1.3; white-space: nowrap;
    padding-right: 0.63em; /* room for the hanging cursor, so text and cursor centre together */
    display: grid;
}
/* an invisible copy of the finished line holds its space, so nothing moves while it types */
.hero h1 > .ghost, .hero h1 > .typed { grid-area: 1 / 1; }
.hero h1 > .ghost { visibility: hidden; }
/* the cursor hangs off the end of the text, so it can never wrap onto a line of its own */
.typed::after {
    content: ""; position: absolute; width: 0.5em; height: 0.9em; margin: 0.22em 0 0 0.13em;
    background: var(--lime); animation: blink 1.06s steps(1, end) infinite;
}
.typed.is-typing::after { animation: none; }
.subline { margin-top: 1.9rem; max-width: 36em; font-size: 1.1875rem; line-height: 1.5; color: rgba(255, 255, 255, 0.92); }
.signup { margin-top: 2.25rem; display: flex; width: 100%; max-width: 25rem; }
.signup input {
    flex: 1; min-width: 0; height: 3rem; padding: 0 1.25rem; border: 1px solid var(--ink); border-right: 0;
    border-radius: 0; background: var(--card); color: var(--ink); font: 400 0.875rem var(--mono);
}
.signup input::placeholder { color: var(--muted); opacity: 1; }
.signup button {
    position: relative; overflow: hidden; width: 3rem; height: 3rem; flex: none;
    border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: #fff;
    cursor: pointer; display: grid; place-items: center;
}
/* hover: lime rises from the bottom in four chunky pixel steps, and the arrow turns ink */
.signup button::before {
    content: ""; position: absolute; inset: 0; background: var(--lime);
    transform: translateY(100%); transition: transform 0.24s steps(4, end);
}
.signup button svg {
    position: relative; width: calc(5px * var(--spx)); height: calc(5px * var(--spx));
    transition: color 0s 0.12s;
}
.signup button:hover::before, .signup button:focus-visible::before { transform: translateY(0); }
.signup button:hover, .signup button:focus-visible { color: var(--ink); }
.signup input:focus-visible, .signup button:focus-visible { outline: 3px solid var(--lime); outline-offset: 0; z-index: 1; }
.index { position: absolute; right: var(--inset); bottom: 1.4rem; font: 500 1rem var(--mono); }

/* ---- progress ---- */
.progress-head { height: var(--head-h); display: flex; justify-content: space-between; align-items: center; padding: 0 var(--inset); font-size: 0.6875rem; }
.progress-head time { color: var(--muted); }
.grid-block { position: relative; }
.cells { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; }
.cell { position: relative; min-height: 14.5rem; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.cell + .cell::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--dash-y); }
.cell.is-now { background: var(--lime); }
.cell .stage-name { font-size: 0.6875rem; color: var(--muted); }
.cell.is-now .stage-name { color: var(--ink); }
.cell h2 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.cell p { font-size: 0.875rem; line-height: 1.5; color: var(--muted); max-width: 18em; }
.cell.is-now p { color: #2e2d28; }

/* ---- one screen: header, scene, progress and footer fit the window, no scrolling ---- */
@media (min-width: 701px) and (min-height: 560px) {
    .frame { display: flex; flex-direction: column; height: 100svh; }
    main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .hero-wrap { flex: 1; min-height: 17rem; }
    .hero { position: absolute; inset: 0; height: auto; }
    .cell { min-height: 0; padding: 1.25rem 1.5rem; }
    .site-footer { padding: 1rem var(--inset); }
}
/* short windows: drop the kicker (the wordmark already says who we are) and tighten up */
@media (min-width: 701px) and (max-height: 820px) {
    .kicker { display: none; }
    .hero h1 { margin-top: 0; }
    .subline { margin-top: 1.1rem; }
    .signup { margin-top: 1.4rem; }
    .cell { gap: 0.5rem; padding-top: 1rem; padding-bottom: 1rem; }
}
@media (max-width: 900px) {
    .cells { grid-template-columns: repeat(2, 1fr); }
    .cell:nth-child(3)::before { display: none; }
    .cell:nth-child(n + 3) { background-image: var(--dash-x); background-size: 100% 1px; background-repeat: no-repeat; }
    .cell.is-now { background-color: var(--lime); }
    .cross.mid { display: none; }
    .hero h1 { white-space: normal; }
}
@media (max-width: 640px) {
    .hero h1 { font-size: clamp(28px, 8.4vw, 40px); }
    .subline { font-size: 1rem; }
    .cells { grid-template-columns: 1fr; }
    .cell + .cell::before { display: none; }
    .cell:nth-child(n + 2) { background-image: var(--dash-x); background-size: 100% 1px; background-repeat: no-repeat; }
    .cell { min-height: 0; }
    .site-footer { flex-direction: column-reverse; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .typed::after { animation: none; }
    .signup button::before, .signup button svg { transition: none; }
}
/* ---- a square ink button with a label: same lime pixel-step hover as the arrow ---- */
.pixel-btn {
    position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 0.75rem;
    height: 3rem; padding: 0 1.25rem; border: 1px solid var(--ink); background: var(--ink); color: #fff;
    font: 500 0.75rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
}
.pixel-btn::before {
    content: ""; position: absolute; inset: 0; background: var(--lime);
    transform: translateY(100%); transition: transform 0.24s steps(4, end);
}
.pixel-btn > * { position: relative; transition: color 0s 0.12s; }
.pixel-btn svg { width: calc(5px * var(--spx)); height: calc(5px * var(--spx)); }
.pixel-btn:hover::before, .pixel-btn:focus-visible::before { transform: translateY(0); }
.pixel-btn:hover, .pixel-btn:focus-visible { color: var(--ink); }
.pixel-btn:focus-visible { outline: 3px solid var(--lime); outline-offset: 0; }
@media (prefers-reduced-motion: reduce) { .pixel-btn::before, .pixel-btn > * { transition: none; } }
