/* ============================================================================
 * GP App Door - Entry flow (slice E2)
 * ----------------------------------------------------------------------------
 * The first-launch Welcome layer (decision D9), from
 * docs/plans/2026-07-26-app-entry-flow.md. The front-door sun/moon theme switch
 * (D1 as amended) left this file with the owner's 2026-09-03 ruling: no theme
 * choice during signup or first entry, Settings is the one theme control
 * (docs/plans/2026-09-03-theme-light-default.md).
 *
 * Enqueued by inc/gp-app-entry.php on app-door ENTRY SCREENS only (the login page
 * today, plus E3's password-help and coach-access screens once they land). The
 * website door never loads a byte of this file.
 *
 * TOKENS: Tier-2 / Tier-3 semantics only, per CLAUDE.md. No raw hex, no raw
 * duration or curve. Every token consumed here already resolves under
 * [data-theme="dark"] in assets/css/gp-base.css, which is what makes the whole
 * screen flip correctly from one attribute.
 *
 * COMPONENTS: the primary CTA consumes the frozen library's .gp-btn +
 * .gp-btn-primary. This file only gives it the door's SIZE (52px target, 12px
 * corner, full width). It never redefines the fill, which is what makes the
 * Podium action law (black on light, gold on dark, via --gp-color-primary) apply
 * to the door for free rather than being re-stated here.
 *
 * TARGETS: 52px on the primary controls, 44px minimum on everything else
 * including the quiet link, per decision D8.
 *
 * FOCUS: ink in both themes (--gp-color-text), never gold. D8: "Focus rings are
 * ink in both themes (DESIGN.md interaction states), not gold. Gold focus fails
 * 3:1 on white." The shared --gp-color-focus token is still gold site-wide; that
 * is a token-layer change for a coordinated slice, not something a feature file
 * gets to redefine, so the entry screens name the ink they need directly.
 *
 * SECONDARY INK: --gp-color-text-secondary, not --gp-color-text-muted. D8 again,
 * paraphrased so no literal color lands in this file: light-mode secondary and
 * faint ink take the Podium ink-2 / ink-3 values rather than the website grays,
 * which fixes every small-text contrast failure. That failure is real and
 * measured. --gp-color-text-muted resolves to the gray-500 primitive, which lands
 * at 4.35:1 on the light canvas, under the 4.5:1 AA floor for normal text, and the
 * lede, the quiet link and the coach line are all normal text.
 * --gp-color-text-secondary is the existing Tier-2 semantic for exactly this role
 * and measures 9.51:1 light / 13.20:1 dark. Repointing --gp-color-text-muted
 * itself would be the tidier fix but it is a site-wide token change, which belongs
 * to a coordinated token slice, not to a feature file.
 *
 * @package Gymnastics_Plus
 * @since 3.0.0
 * ============================================================================ */

/* ----------------------------------------------------------------------------
 * 1. LAYER VISIBILITY (D9)
 * ----------------------------------------------------------------------------
 * The login layer is the DEFAULT and the Welcome layer is hidden. That direction
 * is deliberate: with JavaScript unavailable neither the pre-paint decision
 * script nor the in-page layer swap can run, and the correct thing to be left
 * looking at is the real login form, which still posts to wp-login.php on its
 * own and still carries a Create account link.
 *
 * gpa_entry_layer_script() (inc/gp-app-entry.php, wp_head priority -90, before
 * any stylesheet link is printed) adds .gpa-entry-welcome to <html> when this
 * device has no memory of a successful sign-in. So the swap below is resolved
 * before the browser has a stylesheet to paint with: there is no flash of the
 * wrong layer in either direction.
 * -------------------------------------------------------------------------- */

.gpa-entry-welcome-layer {
    display: none;
}

html.gpa-entry-welcome .gpa-entry-welcome-layer {
    display: flex;
}

html.gpa-entry-welcome .gp-login__panel,
html.gpa-entry-welcome .gp-login__footer {
    display: none;
}

/* ----------------------------------------------------------------------------
 * 2. THE WELCOME LAYER
 * ----------------------------------------------------------------------------
 * Three bands in one column: the brand + message centered in whatever space is
 * left, the actions docked under it, and the coach fine print last. The fine
 * print is deliberately tertiary (D9: "never the focal point") and still clears
 * a 44px target.
 * -------------------------------------------------------------------------- */

.gpa-entry-welcome-layer {
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding: 32px 24px 12px;
}

.gpa-entry-welcome__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* The app icon: the exact artwork the member just tapped on their home screen. */
.gpa-entry-welcome__mark {
    display: block;
    width: 76px;
    height: 76px;
    margin: 0 0 24px;
}

.gpa-entry-welcome__title {
    margin: 0 0 12px;
    font-size: var(--gp-t-lg);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--gp-color-text);
}

/* The brand name never splits across lines. Measured on real devices 2026-08-23:
   at 393pt (iPhone 16) and 440pt (17 Pro Max) the natural wrap broke as
   "Welcome to Gymnastics / Plus", stranding one word on the first screen a
   member ever sees. 375pt (SE) happened to break correctly, which is why this
   stayed invisible until all three widths were walked. */
.gpa-entry-welcome__brand {
    white-space: nowrap;
}

.gpa-entry-welcome__actions {
    flex: 0 0 auto;
    width: 100%;
    max-width: 360px;
    margin: 32px auto 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Size + shape only. .gp-btn-primary owns the fill, so the action law applies. */
.gpa-entry-welcome__cta {
    width: 100%;
    min-height: 52px;
    padding: 0 20px;
    border-radius: var(--gp-r-sm);
    font-size: var(--gp-t-body);
    font-weight: 600;
    text-decoration: none;
}

.gpa-entry-welcome__secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: var(--gp-r-sm);
    font-size: var(--gp-t-sub);
    font-weight: 500;
    color: var(--gp-color-text-secondary);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition:
        color var(--gp-motion-duration-fast) var(--gp-motion-ease-out),
        transform var(--gp-motion-duration-instant) var(--gp-motion-ease-out);
}

@media (hover: hover) {
    .gpa-entry-welcome__secondary:hover {
        color: var(--gp-color-text);
    }
}

.gpa-entry-welcome__secondary:active {
    transform: scale(var(--gp-press-scale-button));
}

.gpa-entry-welcome__fineprint {
    flex: 0 0 auto;
    margin: 12px 0 0;
    text-align: center;
    font-size: var(--gp-t-foot);
    /* Safe-area padding is already carried by .gp-login (the shared page
       container), so this only adds the visual breathing room under it. */
    padding-bottom: 8px;
}

.gpa-entry-welcome__fineprint a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    color: var(--gp-color-text-secondary);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--gp-motion-duration-fast) var(--gp-motion-ease-out);
}

@media (hover: hover) {
    .gpa-entry-welcome__fineprint a:hover {
        color: var(--gp-color-text);
        text-decoration: underline;
    }
}

/* Ink focus, both themes (D8). */
.gpa-entry-welcome-layer a:focus-visible {
    outline: 2px solid var(--gp-color-text);
    outline-offset: 2px;
    border-radius: var(--gp-r-xs);
}

/* ----------------------------------------------------------------------------
 * 3. WELCOME ENTRANCE
 * ----------------------------------------------------------------------------
 * The same authored moment the login layer already has ("the doorway rises to
 * meet you, once"), so the two layers read as one screen changing rather than
 * two different designs. Transform + opacity only, so it costs the main thread
 * nothing on the frame the splash hands off.
 * -------------------------------------------------------------------------- */

html.gpa-entry-welcome .gpa-entry-welcome-layer > * {
    animation: gpa-entry-rise var(--gp-motion-duration-base) var(--gp-motion-ease-out) both;
}

html.gpa-entry-welcome .gpa-entry-welcome-layer > *:nth-child(1) { animation-delay: 0ms; }
html.gpa-entry-welcome .gpa-entry-welcome-layer > *:nth-child(2) { animation-delay: 60ms; }
html.gpa-entry-welcome .gpa-entry-welcome-layer > *:nth-child(3) { animation-delay: 120ms; }

@keyframes gpa-entry-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------------------------------
 * 4. REDUCED MOTION
 * ----------------------------------------------------------------------------
 * The state still changes, only the motion collapses (DESIGN.md interaction
 * states). The press scale IS the pressed state, so it is kept and only its
 * transition is dropped by the global reduced-motion rule in gp-base.css.
 * -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html.gpa-entry-welcome .gpa-entry-welcome-layer > * {
        animation: none;
    }
}

/* ----------------------------------------------------------------------------
 * 6. THE E3 SCREENS: PASSWORD HELP + COACH ACCESS
 * ----------------------------------------------------------------------------
 * Slice E3 of docs/plans/2026-07-26-app-entry-flow.md: the app-door halves of
 * forgot password, check your email, reset password, password updated, coach
 * request access, and coach request sent.
 *
 * ONE ANATOMY, SIX SCREENS. Every one of them is the same object: the GP app
 * icon at the top, a title, a line of plain help, then either one form or one
 * confirmation, with a single primary action and one quiet link. The back
 * chevron sits top left and the sun/moon switch (section 4) top right, so the
 * two of them read as the ends of one top bar exactly as decision D1 describes,
 * without either screen having to build a bar.
 *
 * WHY THESE SCREENS CARRY NO INLINE <style> OF THEIR OWN, unlike the login
 * template: they are three templates showing six screens off one anatomy, so an
 * inline block would be the same CSS written three times, drifting from the day
 * it landed. The one pair of rules that genuinely cannot wait for a stylesheet
 * link (the canvas paint, so the near-black splash hands off with no white
 * frame) is printed by gpa_entry_boot_style() in inc/gp-app-entry.php.
 *
 * Same laws as the rest of this file: Tier-2/3 tokens only, ink focus rings in
 * both themes, 52px primary targets and a 44px floor on everything else, and the
 * primary fill left to .gp-btn-primary so the Podium action law applies for free.
 * -------------------------------------------------------------------------- */

/* ---- 6.1 Page canvas ---- */

body.gpa-entry-body {
    margin: 0;
    font-family: var(--gp-font-family);
    /* The CANVAS token, with the fields on the PANEL token above it: the same
       pairing the login half uses, and what makes a filled field readable. */
    background: var(--gp-color-bg);
    color: var(--gp-color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.gpa-entry-body *,
body.gpa-entry-body *::before,
body.gpa-entry-body *::after {
    box-sizing: border-box;
}

/* There is no theme chrome on these templates (they render their own document),
   but a stray header/footer from a plugin must never appear on the door. */
body.gpa-entry-body .site-header,
body.gpa-entry-body .site-footer,
body.gpa-entry-body #masthead,
body.gpa-entry-body #colophon {
    display: none !important;
}

.gpa-entry {
    display: flex;
    flex-direction: column;
    /* THE KEYBOARD IS WHAT MAKES THIS SCROLL. Measured on the simulator by the
    gate, 2026-09-10: with nothing focused the page will not scroll at all,
    and with a field focused it becomes scrollable by exactly the amount the
    visible area shrank. A vh unit sizes the layout against the FULL viewport
    while the visual viewport gets shorter, and the difference turns into
    overflow, which is what carried the header toward the island. dvh tracks
    the shrinking viewport, so the page keeps fitting; the vh line above it
    stays as the fallback for anything that does not know dvh. */
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---- 6.2 Back chevron (top left) ---- */

/* ONE BACK CONTROL ACROSS THE WHOLE PRE-PORTAL. The owner, 2026-09-06: "I do
   want to clean up the back button on these pages", and before that, during the
   walk work: "every back button and icon should look the same".

   It was a bare chevron in secondary grey, floating on the canvas with nothing
   under it, while the signup walk's back (.gpa-walk__back in inc/gp-app-entry.php)
   is a 40px white disc with a border and full-strength ink. Two controls doing
   one job, three taps apart. This is now the walk's control: same size, same
   surface, same border, same ink, so a member crossing from Welcome to the walk
   never sees it change.

   The geometry stays FIXED rather than borrowing the walk's viewport-centre
   trick, because these screens have no walk chrome to sit inside; 20px from the
   left matches where the walk's lands, and the safe-area inset is still paid. */
.gpa-entry__back {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 16px);
    left: 20px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--gp-r-full);
    background: var(--gp-color-surface);
    border: 1px solid var(--gp-color-border);
    color: var(--gp-color-text);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition:
        color var(--gp-motion-duration-fast) var(--gp-motion-ease-out),
        transform var(--gp-motion-duration-instant) var(--gp-motion-ease-out);
}

/* 18px, the walk's chevron size, inside the walk's 40px disc. */
.gpa-entry__back svg {
    display: block;
    width: 18px;
    height: 18px;
}

@media (hover: hover) {
    .gpa-entry__back:hover { color: var(--gp-color-text); }
}

.gpa-entry__back:active { transform: scale(var(--gp-press-scale-icon)); }

.gpa-entry__back:focus-visible {
    outline: 2px solid var(--gp-color-text);
    outline-offset: 2px;
}

/* ---- 6.3 The column ---- */

.gpa-entry__panel {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Top padding clears the fixed chevron/switch row on a short screen. */
    padding: 72px 24px 32px;
}

.gpa-entry__content {
    width: 100%;
    max-width: 360px;
}

.gpa-entry__mark {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
}

.gpa-entry__title {
    margin: 0 0 8px;
    font-size: var(--gp-t-md);
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -0.015em;
    text-align: center;
    color: var(--gp-color-text);
}

/* Programmatic focus only (the coach screen moves focus to the success title);
   it must never draw a ring of its own. */
.gpa-entry__title:focus { outline: none; }

.gpa-entry__lede {
    margin: 0 0 24px;
    font-size: var(--gp-t-sub);
    line-height: 1.55;
    text-align: center;
    color: var(--gp-color-text-secondary);
}

/* ---- 6.4 Alerts (quiet inline text, no boxes, same as the login half) ---- */

/* THE ERROR FLOATS OVER THE PAGE INSTEAD OF PUSHING IT. Owner ruling
   2026-09-06, on the coach screen's overflow: "float over the page".

   THE DEFECT IT CLOSES: this was an in-flow <p> above the form, so on a failed
   submit it pushed everything below it down. /coach-access/ is the tallest
   screen in the entry flow and was ALREADY over the fold in that state on a
   375x667 phone (measured: slack 0, overflowing) before any of today's work.
   Out of flow, it costs the layout nothing and the no-scrolling rule finally
   holds in the error state too, not just at rest.

   THE LOOK IS THE LIBRARY'S, NOT A NEW ONE. The templates now carry .gp-toast
   and .gp-toast-error from assets/css/gp-core.css, which is the frozen
   component for exactly this (transient message, floating depth). Only the
   PLACEMENT is overridden here: the library container pins to the bottom above
   --gp-bottom-nav-height, and these screens have no bottom nav and DO have
   their submit button down there, so a bottom toast would cover the one control
   the member needs to press again. Top, therefore, where it can only cover the
   mark.

   IT CANNOT EAT A TAP. pointer-events: none, so a field or button underneath
   stays reachable even while the message sits over it. It carries no controls
   of its own, so nothing is lost by making it inert. */
.gpa-entry__alert {
    position: fixed;
    /* BELOW THE BACK CONTROL, not over it. At +16 this banner sat exactly on
       top of the back button (fixed at the same +16, 40px tall) and hid the
       screen's only way out. Taps still reached it, because this element is
       pointer-events: none, so the numbers all passed and only the screenshot
       showed it: navigation you cannot see is navigation you do not have.
       +64 clears the 40px control and its inset, and lands the banner over the
       mark, which is the one thing on these screens that can be covered
       without costing the member anything. */
    top: calc(env(safe-area-inset-top, 0px) + 64px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 40px);
    max-width: 360px;
    margin: 0;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

/* .gp-toast sets display:flex, which BEATS the hidden attribute, and the coach
   screen ships this element hidden until a submit fails. Without this line that
   screen would carry a permanent empty red bar across the top. The generic
   lesson, learned here the hard way before: an attribute never wins against a
   display rule. */
.gpa-entry__alert[hidden] { display: none !important; }

/* "Sent again." after a resend. It rides inside the lede sentence rather than
   becoming a second block, because the screen has not changed, only one fact
   about it has. */
.gpa-entry__resent {
    color: var(--gp-color-success);
    font-weight: 500;
}

/* ---- 6.5 Fields ---- */

.gpa-entry__field { margin-bottom: 14px; }

.gpa-entry__field--reveal { position: relative; }

.gpa-entry__label {
    display: block;
    margin-bottom: 6px;
    font-size: var(--gp-t-foot);
    font-weight: 500;
    color: var(--gp-color-text-secondary);
}

.gpa-entry__input,
.gpa-entry__select,
.gpa-entry__textarea {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    background: var(--gp-color-surface);
    /* The border stays in the box model at 1px so focus can colour it without
       moving the field by a pixel. It used to rest at TRANSPARENT, which meant
       the edge of an input was carried only by the fill sitting on the canvas:
       measured 2026-08-23 that is a 4.7% luminance step on dark and 3.9% on
       light (white on near-white), and the owner could not see the fields at
       all. It now rests on the border token. Same defect existed in
       page-membership-login.php and was fixed there in the same pass; this is
       the copy the APP DOOR entry flow actually renders, which is the one that
       was on screen. */
    border: 1px solid var(--gp-color-border);
    border-radius: var(--gp-r-sm);
    font-family: inherit;
    font-size: var(--gp-t-sub);
    color: var(--gp-color-text);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var(--gp-motion-duration-fast) var(--gp-motion-ease-out);
}

.gpa-entry__textarea {
    height: auto;
    min-height: 96px;
    padding: 14px 16px;
    line-height: 1.5;
    resize: vertical;
}

.gpa-entry__field--reveal .gpa-entry__input { padding-right: 52px; }

.gpa-entry__input::placeholder,
.gpa-entry__textarea::placeholder {
    color: var(--gp-color-text-muted);
}

.gpa-entry__input:focus,
.gpa-entry__select:focus,
.gpa-entry__textarea:focus {
    outline: none;
    border-color: var(--gp-color-text);
}

.gpa-entry__input:focus-visible,
.gpa-entry__select:focus-visible,
.gpa-entry__textarea:focus-visible {
    outline: 2px solid var(--gp-color-text);
    outline-offset: 2px;
}

/* The native select arrow is drawn by the OS in ITS colour, which is black on a
   dark canvas. Drawn here as a background chevron in currentColor instead, so it
   is correct in both themes. Encoded stroke is currentColor via mask-free SVG,
   so no raw hex lands in this file. */
.gpa-entry__select {
    padding-right: 44px;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                      linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 22px) calc(50% + 2px), calc(100% - 16px) calc(50% + 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.gpa-entry__hint {
    margin: 6px 0 0;
    font-size: var(--gp-t-foot);
    color: var(--gp-color-text-secondary);
}

.gpa-entry__eye {
    position: absolute;
    right: 4px;
    /* Sits on the input, not on the label above it. */
    bottom: 4px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--gp-color-text-muted);
    -webkit-tap-highlight-color: transparent;
    transition:
        color var(--gp-motion-duration-fast) var(--gp-motion-ease-out),
        transform var(--gp-motion-duration-instant) var(--gp-motion-ease-out);
}

.gpa-entry__eye svg { width: 18px; height: 18px; }

@media (hover: hover) {
    .gpa-entry__eye:hover { color: var(--gp-color-text); }
}

.gpa-entry__eye:active { transform: scale(var(--gp-press-scale-icon)); }

.gpa-entry__eye:focus-visible {
    outline: 2px solid var(--gp-color-text);
    outline-offset: 2px;
    border-radius: var(--gp-r-full);
}

/* ---- 6.6 Actions ---- */

/* Size and shape only. .gp-btn-primary owns the fill, so black-on-light and
   gold-on-dark come from the token layer, not from here. */
.gpa-entry__submit {
    width: 100%;
    min-height: 52px;
    margin-top: 8px;
    padding: 0 20px;
    border: none;
    border-radius: var(--gp-r-sm);
    font-size: var(--gp-t-body);
    font-weight: 600;
    text-decoration: none;
}

.gpa-entry__submit:disabled {
    opacity: 0.6;
    cursor: default;
}

.gpa-entry__submit:focus-visible {
    outline: 2px solid var(--gp-color-text);
    outline-offset: 2px;
}

/* The quiet second action: a plain link with a full 44px hit area (D8). */
.gpa-entry__quiet-row {
    margin-top: 8px;
    text-align: center;
}

.gpa-entry__quiet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 8px;
    background: none;
    border: 0;
    font-family: inherit;
    font-size: var(--gp-t-foot);
    color: var(--gp-color-text-secondary);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--gp-motion-duration-fast) var(--gp-motion-ease-out);
}

@media (hover: hover) {
    .gpa-entry__quiet:hover {
        color: var(--gp-color-text);
        text-decoration: underline;
    }
}

.gpa-entry__quiet:focus-visible {
    outline: 2px solid var(--gp-color-text);
    outline-offset: 2px;
    border-radius: var(--gp-r-xs);
}

.gpa-entry__quiet:disabled {
    opacity: 0.6;
    cursor: default;
    text-decoration: none;
}

/* ---- 6.7 Fine print ---- */

.gpa-entry__footer {
    flex: 0 0 auto;
    padding: 8px 24px 20px;
    text-align: center;
    font-size: var(--gp-t-cap);
    color: var(--gp-color-text-secondary);
}

.gpa-entry__footer a {
    color: inherit;
    text-decoration: none;
}

@media (hover: hover) {
    .gpa-entry__footer a:hover { text-decoration: underline; }
}

/* ---- 6.8 Confirmation screens ---- */

/* "Check your email", "Password updated", "Request sent". The mark at the top is
   already the brand anchor, so the confirmation adds one small check rather than
   a second big graphic competing with it. */
.gpa-entry__check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 auto 14px;
    border-radius: var(--gp-r-full);
    /* The success semantic, at the intensity a confirmation wants: the ring is
       the colour, the fill stays the panel, so it never shouts. */
    border: 2px solid var(--gp-color-success);
    color: var(--gp-color-success);
}

.gpa-entry__check svg { width: 20px; height: 20px; }

/* ---- 6.9 Entrance ---- */

/* The same authored moment the login and Welcome layers have, so all six screens
   read as one door. Transform and opacity only. */
/* FILL MODE IS `backwards`, NOT `both`, AND THAT IS A BUG FIX RATHER THAN A
   TIDY-UP. `both` holds the LAST keyframe forever, and this animation ends at
   transform: translateY(0), so every direct child of the entry content kept a
   permanent identity transform. Any transform, identity included, makes an
   element the containing block for its fixed AND absolutely positioned
   descendants, so the floating error alert below resolved its `top` against
   whichever wrapper it happened to sit in and landed 127px down the page,
   across the title. Found by dumping the ancestor chain rather than guessing:
   DIV[data-gpa-coach-form], transform matrix(1,0,0,1,0,0).

   `backwards` keeps what the fill mode was actually for, which is applying the
   FROM keyframe during the animation-delay so a staggered child cannot flash at
   full opacity before its turn. It drops only the forwards hold, and the end
   state (opacity 1, translateY(0)) is the element's natural state anyway, so
   nothing moves. It also stops promoting every child to its own layer for the
   life of the page. */
.gpa-entry__content > * {
    animation: gpa-entry-rise var(--gp-motion-duration-base) var(--gp-motion-ease-out) backwards;
}

.gpa-entry__content > *:nth-child(1) { animation-delay: 0ms; }
.gpa-entry__content > *:nth-child(2) { animation-delay: 40ms; }
.gpa-entry__content > *:nth-child(3) { animation-delay: 80ms; }
.gpa-entry__content > *:nth-child(4) { animation-delay: 120ms; }
.gpa-entry__content > *:nth-child(5) { animation-delay: 160ms; }
.gpa-entry__content > *:nth-child(6) { animation-delay: 200ms; }
.gpa-entry__content > *:nth-child(7) { animation-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
    .gpa-entry__content > * { animation: none; }
}

/* ---- 6.10 Small screens ---- */

@media (max-width: 480px) {
    .gpa-entry__panel { padding: 68px 20px 24px; }
}

/* ==========================================================================
   THE FIELD CARD (owner, 2026-08-31)
   ==========================================================================
   "Lets add the college request page fields on a card like the account creation
   page."

   The same surface the Create account screen got, made reusable here rather than
   written into one template, so the next entry screen that grows past two fields
   inherits it instead of re-deriving it. Section 17 of the mobile design system
   is the rule this implements: the fields go on ONE surface, the heading and the
   button stay off it.

   Opt-in, not automatic. A single-field screen like Forgot password does not
   need a box drawn round one input, and drawing one would make the door look
   busier rather than clearer. Add the class when a screen has enough questions
   to read as a group.
   ========================================================================== */
.gpa-entry__card {
    background: var(--gp-color-surface);
    border: 1px solid var(--gp-color-border);
    border-radius: var(--gp-r-lg, 16px);
    padding: 14px 14px 10px;
    margin-bottom: 12px;
}

/* The last field inside carries no trailing margin: the card's own padding is
   the space, and doubling them is what makes a card look loose at the bottom. */
.gpa-entry__card > .gpa-entry__field:last-child,
.gpa-entry__card > .gpa-coach-note:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------------------------------------------
 * 12. DEPTH ACROSS THE PRE-PORTAL
 * ----------------------------------------------------------------------------
 * The owner, 2026-09-06, after the survey: "do everything i want as much done
 * as possible across all pages of pre portal pages nothing should look flat".
 *
 * WHAT WAS ACTUALLY FLAT was measured across all seven pre-portal screens
 * rather than guessed: both back controls, every input, select and textarea,
 * every primary button, the Apple and Google buttons, and the checklist panel.
 * The account-type cards already carried depth and are the reference the rest
 * is being matched to.
 *
 * NO FROZEN FILE IS TOUCHED, and that is the reason these selectors are the
 * screen-scoped ones rather than .gp-btn-primary. The primary button lives in
 * assets/css/gp-core.css, the frozen library, and giving IT a shadow would
 * change every button in the app, portal included, off the back of a
 * pre-portal ask. Whether the library should carry depth is a real question,
 * it is just not this slice's to answer: it is flagged to the orchestrator.
 * Everything below rides gp-app-entry.css, which loads on all seven pre-portal
 * screens and, verified, on NO website-door page.
 *
 * TWO LEVELS, NOT ONE, because "nothing looks flat" should not mean
 * "everything looks the same". e1 is the resting depth for surfaces you read
 * or type into; e2 is the raised depth for the thing you press. That is the
 * same pair the account-type cards already use (rest at e1, lift to e2 when
 * chosen), so the hierarchy is consistent rather than newly invented here.
 *
 * The focus rings on these screens are outlines, not shadows, so nothing below
 * can swallow a focus state.
 * -------------------------------------------------------------------------- */

/* Surfaces you read or type into. */
.gpa-entry__back,
.gpa-walk__back,
.gpa-entry__input,
.gpa-entry__select,
.gpa-entry__textarea,
.gp-apple-btn,
.gp-google-btn,
html.gp-app .pmpro_form_input {
    box-shadow: var(--gp-e1);
}

/* The thing you press. Raised, so the action reads as the action. */
.gpa-entry__submit,
.gpa-entry-welcome__cta,
.gpa-age__cta,
html.gp-app .pmpro_btn-submit-checkout {
    box-shadow: var(--gp-e2);
}

/* THE CHECKLIST PANEL STAYS FLAT, by the owner's own follow-up minutes after
   "nothing should look flat": "dont do the panel on the account type page".
   It is the one surface on these screens nobody can tap, and depth would have
   made it read as a third card next to the two real choices. Left here as a
   note rather than silence so the next depth pass does not "finish the job"
   by adding it. */

/* ----------------------------------------------------------------------------
 * 13. THE VERIFICATION SCREEN: THE ADDRESS GETS ITS OWN LINE
 * ----------------------------------------------------------------------------
 * The owner, 2026-09-06: "its too wordy and i would like the email address on
 * its own line".
 *
 * The address is the one thing on this screen a member actually needs to READ,
 * because it is how they catch the typo that is the whole reason the mail never
 * arrived. It was buried mid sentence and wrapping across two lines with words
 * on either side of it. On its own line, in the text colour rather than the
 * lede's quieter grey, it reads as the fact it is.
 *
 * NO GOLD BUTTON RULE LIVES HERE ANY MORE. An earlier pass repointed this
 * screen's action to the walk's purple to escape the gold; the owner then ruled
 * the screen light-only with a black button, which the theme pin in
 * inc/gp-app-theme.php delivers by construction (primary is near-black on
 * light). The override is gone rather than left switched off.
 * -------------------------------------------------------------------------- */
.gpa-vp__to {
    display: block;
    margin: 6px 0 2px;
    font-weight: 600;
    color: var(--gp-color-text);
    overflow-wrap: anywhere;
}

.gpa-vp__after {
    display: block;
}
