/*
 * Free trial sign-up: the world behind it and the sunrise.
 *
 * Built rule for rule from the approved mock, plans/trial-orientation/mocks/
 * signup.css and flock.css (branch trial-orientation), 7 Nov 2026. The art is
 * the app's own landscape set, each piece placed so its cropped edge is hidden.
 * The steps themselves are free-trial-steps.css.
 *
 * Every rule is gated on `.trial-page`, and the colours are this page's own
 * tokens rather than mainv2.css's, so nothing here can move another page.
 */

.trial-page {
    --ink: #1A2718; --forest: #255928; --green: #307233; --leaf: #3E9342; --brand: #44A148;
    --mint-wash: #F3FDF4; --mint: #DAF1DB; --mint-line: #C5E2C6; --muted: #536255;
    --sunshine: #FDE272; --sun-soft: #FEEE95;
    --hills-h: calc(100vw * 41 / 375);   /* Hills.svg at full width keeps its own shape */
    --ground-h: 9vh;
    margin: 0; min-height: 100%;
    background: #E4F2E3;
    font-family: Montserrat, system-ui, sans-serif; color: var(--ink); overflow-x: hidden;
}

/* ---------- the world ---------- */

.trial-page .su-world {
    position: fixed; inset: 0; z-index: 0; overflow: hidden;
    background: linear-gradient(180deg, #CFE7F7 0%, #DFEFF9 35%, #EDF6F6 62%, #F1F8F0 82%, #E4F2E3 100%);
}
.trial-page .su-world::after {   /* warm light at sunrise */
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 92%, rgba(254, 238, 149, 0.8), rgba(253, 226, 114, 0.22) 50%, transparent 78%);
    transition: opacity 3s ease;
}
.trial-page.is-sunrise .su-world::after { opacity: 1; }

/* Corner clouds: flat on the left and faded at the bottom, so they hang from the
   top corners with the flat side against the screen edge. The right one is the
   same art mirrored. */
.trial-page .su-corner { position: absolute; top: 0; width: 30vw; max-width: 520px; height: auto; }
.trial-page .su-corner--l { left: 0; }
.trial-page .su-corner--r { right: 0; transform: scaleX(-1); }

/* The land: horizon clouds, then the pale back hills, then the green hills, each
   full width and resting on solid ground, so no flat bottom ever shows. */
.trial-page .su-land { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--hills-h) + var(--ground-h) + 180px); }
.trial-page .su-ground { position: absolute; left: 0; right: 0; bottom: 0; height: var(--ground-h); background: var(--brand); }
.trial-page .su-hills, .trial-page .su-backhills, .trial-page .su-horizon-clouds { position: absolute; left: 0; width: 100%; height: auto; display: block; }
.trial-page .su-hills { bottom: calc(var(--ground-h) - 6px); }
.trial-page .su-backhills { bottom: calc(var(--ground-h) + var(--hills-h) * 0.35); }
.trial-page .su-horizon-clouds { bottom: calc(var(--ground-h) + var(--hills-h) * 0.12); width: 70%; left: 15%; opacity: 0.9; }

/* The sun: a whole circle, so it can rise without a cut edge */
.trial-page .su-sun {
    position: absolute; left: 50%; width: clamp(300px, 22vw, 460px); aspect-ratio: 1; transform-origin: center; translate: -50% 0; border-radius: 50%;
    background: radial-gradient(circle, #FFF6C2 0%, var(--sun-soft) 55%, var(--sunshine) 100%);
    bottom: calc(var(--ground-h) + var(--hills-h) * 0.4);
    transform: translateY(140%); opacity: 0;
    transition: transform 3.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1.2s ease;
}
.trial-page.is-sunrise .su-sun { transform: translateY(42%); opacity: 1; }

/* ---------- the app's gulls (My Quest's rules, css/my-quest/06-world.css) ---------- */

.trial-page .tr-flock {
    position: absolute; left: 1.5%; top: 17%; width: 200px; height: auto; opacity: 0; pointer-events: none;
    --fly-x: 18vw; --fly-y: -110px; --flight: 30s;
}
.trial-page .tr-flock svg { width: 100%; height: auto; overflow: visible; }
/* Backlit against a bright sky, a gull reads as a dark mark, not a white one. */
.trial-page .tr-flock path { fill: #6E8FA6; }
.trial-page .tr-flock .mq-bird { transform-box: fill-box; transform-origin: 50% 62%; animation: tr-flap 0.86s ease-in-out infinite; }
.trial-page .tr-flock.is-flying { animation: tr-flyoff var(--flight) cubic-bezier(.42, .06, .62, 1) forwards; }
@keyframes tr-flap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.55); } }
@keyframes tr-flyoff {
    0%   { transform: translate(0, 40px) scale(1); opacity: 0; }
    10%  { opacity: 0.85; }
    62%  { opacity: 0.7; }
    100% { transform: translate(var(--fly-x), var(--fly-y)) scale(0.3); opacity: 0; }
}

/* ---------- top bar ---------- */

.trial-page .su-top {
    position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between;
    max-width: 1200px; margin: 0 auto; padding: 16px 32px;
}
.trial-page .su-brand { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 999px; background: #fff; box-shadow: 0 6px 20px rgba(26, 39, 24, 0.08); }
.trial-page .su-logo { display: block; height: 46px; width: auto; }
.trial-page .su-top__signin { padding: 10px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); font: 500 14px/1 Montserrat, sans-serif; color: var(--muted); }
.trial-page .su-top__signin a { color: var(--green); font-weight: 700; text-decoration: none; margin-left: 4px; }

/* ---------- the stage ---------- */

.trial-page .su-stage { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: 0 24px 34vh; }
/* The refusal screens keep today's width. */
.trial-page .su-stage > .state:not(.su-card):not(.su-finale) { width: min(560px, 100%); }

/* ---------- sunrise ---------- */

.trial-page .su-finale { position: absolute; top: 7vh; left: 0; right: 0; text-align: center; padding: 0 24px; }
.trial-page .su-finale > * { opacity: 0; transform: translateY(14px); animation: su-up 0.8s cubic-bezier(0.2, 0.9, 0.3, 1) forwards; }
.trial-page .su-finale > :nth-child(1) { animation-delay: 1.8s; }
.trial-page .su-finale > :nth-child(2) { animation-delay: 2.2s; }
.trial-page .su-finale > :nth-child(3) { animation-delay: 3.0s; }
@keyframes su-up { to { opacity: 1; transform: none; } }
.trial-page .su-finale__title { margin: 0 auto 32px; font: 700 50px/1.12 Montserrat, sans-serif; letter-spacing: -0.02em; color: var(--ink); }
.trial-page .su-finale__title > span { display: block; }
.trial-page .su-finale__title em { font-style: normal; color: var(--leaf); }
/* Two classes, or free-trial-steps.css's .su-next (loaded after this file) wins. */
.trial-page .su-next.su-next--big { display: inline-flex; align-items: center; height: 60px; padding: 0 36px; font-size: 18px; text-decoration: none; box-shadow: 0 12px 30px rgba(37, 89, 40, 0.3); }

/* ---------- a phone: the same pieces, nothing new drawn (Kevin, 7 Nov 2026) ---------- */

@media (max-width: 760px) {
    .trial-page .su-top { padding: 12px 16px; }
    .trial-page .su-logo { height: 34px; }
    .trial-page .su-top__signin { padding: 8px 12px; font-size: 13px; }
    .trial-page .su-corner { width: 46vw; }
    .trial-page .su-stage { padding: 0 16px 24vh; }
    .trial-page .su-finale { top: 4vh; }
    .trial-page .su-finale__title { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    .trial-page .tr-flock { display: none; }
    .trial-page .su-sun, .trial-page .su-world::after { transition: none; }
    .trial-page .su-finale > * { animation: none; opacity: 1; transform: none; }
}
