/* css/righty.css -- the Righty "arriving soon" page (righty.html, built by js/righty.js).
   Served from the CDN in the app, so the design can change without an app release.
   Palette: the Righty orb of the bottom nav (butter yellow -> blush -> orchid by default) with an
   orange-to-pink accent, on a warm near-white; all of it follows the splash colour (see :root). Every looping animation is transform/opacity only
   and stops under prefers-reduced-motion. */

@font-face {
    font-family: "Inter";
    font-weight: 400;
    font-display: swap;
    src: url(fonts/Inter-Regular.woff2) format("woff2");
}
@font-face {
    font-family: "Inter";
    font-weight: 500;
    font-display: swap;
    src: url(fonts/Inter-Medium.woff2) format("woff2");
}
@font-face {
    font-family: "Inter";
    font-weight: 700 800;
    font-display: swap;
    src: url(fonts/Inter-Bold.woff2) format("woff2");
}

/* The palette follows the splash colour: js/brand-theme.js (loaded by js/rp-config.js) writes
   --rp-ry-* onto <html> from app_splash.bg_color, the same set the bottom nav's Righty orb uses,
   so the orb, this page and its button always match each other and the splash. These are the
   defaults (the default accent), as "R, G, B" so they can take an alpha. */
:root {
    --rp-ry-o1: 255, 243, 163;
    --rp-ry-o2: 255, 200, 196;
    --rp-ry-o3: 255, 174, 245;
    --rp-ry-c0: 255, 154, 61;
    --rp-ry-c1: 255, 116, 23;
    --rp-ry-c2: 255, 90, 95;
    --rp-ry-c3: 255, 79, 163;
    --rp-ry-v: 139, 92, 246;
    --rp-ry-bg1: 255, 250, 246;
    --rp-ry-bg2: 255, 247, 242;
    --rp-ry-bg3: 253, 241, 247;
    --rp-ry-b3: 255, 210, 176;
    --rp-ry-ink: 194, 65, 12;
    --rp-ry-ink2: 219, 39, 119;

    --ry-ink: #0f1222;
    --ry-ink-2: #4a5068;
    --ry-ink-3: #8a90a6;
    --ry-orange: rgb(var(--rp-ry-c1));
    --ry-orange-2: rgb(var(--rp-ry-c0));
    --ry-butter: rgb(var(--rp-ry-o1));
    --ry-blush: rgb(var(--rp-ry-o2));
    --ry-orchid: rgb(var(--rp-ry-o3));
    --ry-violet: rgb(var(--rp-ry-v));
    --ry-surface: rgb(var(--rp-ry-bg2));
}

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--ry-surface);
}

.ry-body {
    color: var(--ry-ink);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

.ry-app {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding:
        max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
        max(18px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    isolation: isolate;
}

/* Fallback (no script): the sentence, centred. */
.ry-fallback {
    margin: auto 0 16px;
    font-size: 1.6rem;
    line-height: 1.3;
    text-align: center;
}
.ry-fallback-link {
    margin: 0 auto auto;
    color: var(--ry-orange);
    font-weight: 700;
}

/* ── Background: slow aurora + a faint dot grid ───────────────────────── */
.ry-aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(120% 70% at 50% -10%, #fff 0%, transparent 60%),
        linear-gradient(180deg, rgb(var(--rp-ry-bg1)) 0%, var(--ry-surface) 55%, rgb(var(--rp-ry-bg3)) 100%);
}
.ry-blob {
    position: absolute;
    width: 70vmax;
    height: 70vmax;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
    will-change: transform;
}
.ry-blob--a {
    top: -30vmax;
    left: -25vmax;
    background: radial-gradient(circle, var(--ry-butter), transparent 65%);
    animation: ry-drift-a 18s ease-in-out infinite alternate;
}
.ry-blob--b {
    top: -10vmax;
    right: -35vmax;
    background: radial-gradient(circle, var(--ry-orchid), transparent 65%);
    animation: ry-drift-b 22s ease-in-out infinite alternate;
}
.ry-blob--c {
    bottom: -40vmax;
    left: -10vmax;
    background: radial-gradient(circle, rgb(var(--rp-ry-b3)), transparent 65%);
    opacity: .5;
    animation: ry-drift-c 26s ease-in-out infinite alternate;
}
.ry-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#0f122214 1px, transparent 1.2px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(80% 60% at 50% 38%, #000 0%, transparent 75%);
            mask-image: radial-gradient(80% 60% at 50% 38%, #000 0%, transparent 75%);
}
@keyframes ry-drift-a { to { transform: translate(12vmax, 8vmax) scale(1.08); } }
@keyframes ry-drift-b { to { transform: translate(-10vmax, 12vmax) scale(1.12); } }
@keyframes ry-drift-c { to { transform: translate(8vmax, -10vmax) scale(1.05); } }

/* ── Top bar ──────────────────────────────────────────────────────────── */
.ry-top {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: ry-rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
.ry-back {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #0f122214;
    border-radius: 50%;
    background: #ffffffb3;
    color: var(--ry-ink);
    box-shadow: 0 2px 10px #0f12220d;
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    cursor: pointer;
}
.ry-back:active { transform: scale(.94); }
.ry-back:focus-visible,
.ry-cta:focus-visible {
    outline: 2px solid var(--ry-orange);
    outline-offset: 3px;
}
.ry-brand {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.ry-brand b {
    padding: 2px 6px;
    margin-left: 2px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--ry-orange), rgb(var(--rp-ry-c3)));
    color: #fff;
    font-size: .7rem;
    letter-spacing: .06em;
    vertical-align: 2px;
}
.ry-pill {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid rgba(var(--rp-ry-c1), .18);
    border-radius: 99px;
    background: #ffffffc2;
    color: rgb(var(--rp-ry-ink));
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
}
.ry-pill-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ry-orange);
}
.ry-pill-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--ry-orange);
    animation: ry-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ry-ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.ry-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 0 12px;
}

.ry-orb-wrap {
    --orb: clamp(132px, 38vw, 200px);
    position: relative;
    display: grid;
    place-items: center;
    width: calc(var(--orb) * 1.9);
    height: calc(var(--orb) * 1.9);
    margin-bottom: 6px;
    animation: ry-pop .9s cubic-bezier(.2, 1.2, .3, 1) .1s both;
}
.ry-orb {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--orb);
    height: var(--orb);
    border-radius: 50%;
    background:
        radial-gradient(60% 50% at 32% 24%, #ffffffd9 0%, transparent 60%),
        linear-gradient(120deg, var(--ry-butter), var(--ry-blush) 50%, var(--ry-orchid));
    box-shadow:
        0 0 0 8px #ffffffcc,
        0 18px 50px rgba(var(--rp-ry-c3), .25),
        0 6px 18px rgba(var(--rp-ry-c1), .18),
        inset 0 -10px 24px rgba(var(--rp-ry-c1), .12);
    animation: ry-float 6s ease-in-out infinite;
}
.ry-mark {
    width: 58%;
    height: 58%;
    filter: drop-shadow(0 4px 8px rgba(var(--rp-ry-c1), .24));
}

/* Soft rings breathing out from the orb. */
.ry-ring {
    position: absolute;
    width: var(--orb);
    height: var(--orb);
    border-radius: 50%;
    border: 1.5px solid rgba(var(--rp-ry-c0), .33);
    animation: ry-wave 4.2s cubic-bezier(.2, .6, .3, 1) infinite;
}
.ry-ring--2 { animation-delay: 1.4s; border-color: rgba(var(--rp-ry-c3), .33); }
.ry-ring--3 { animation-delay: 2.8s; border-color: rgba(var(--rp-ry-v), .25); }
@keyframes ry-wave {
    0% { transform: scale(1); opacity: .9; }
    100% { transform: scale(1.85); opacity: 0; }
}

/* Three sparks on an orbit. */
.ry-orbit {
    position: absolute;
    width: calc(var(--orb) * 1.45);
    height: calc(var(--orb) * 1.45);
    border-radius: 50%;
    border: 1px dashed #0f12221a;
    animation: ry-spin 16s linear infinite;
}
.ry-orbit i {
    position: absolute;
    width: 10px;
    height: 10px;
    margin: -5px;
    border-radius: 50%;
    background: var(--ry-orange);
    box-shadow: 0 0 12px var(--ry-orange-2);
}
.ry-orbit i:nth-child(1) { top: 0; left: 50%; }
.ry-orbit i:nth-child(2) { top: 75%; left: 93.3%; background: rgb(var(--rp-ry-c3)); box-shadow: 0 0 12px rgba(var(--rp-ry-c3), .7); width: 8px; height: 8px; margin: -4px; }
.ry-orbit i:nth-child(3) { top: 75%; left: 6.7%; background: var(--ry-violet); box-shadow: 0 0 12px rgba(var(--rp-ry-v), .6); width: 7px; height: 7px; margin: -3.5px; }
@keyframes ry-spin { to { transform: rotate(360deg); } }
@keyframes ry-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.ry-eyebrow {
    margin: 0 0 14px;
    padding: 6px 12px;
    border-radius: 99px;
    background: #ffffffa6;
    border: 1px solid #0f12220f;
    color: var(--ry-ink-2);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .02em;
    animation: ry-rise .7s cubic-bezier(.2, .8, .2, 1) .35s both;
}

/* The typed headline. Its box is reserved for the full sentence up front (min-height in
   lines), so the page does not grow and jump while it types. */
.ry-title {
    max-width: 20ch;
    min-height: 4.4em;
    margin: 0 auto;
    font-size: clamp(1.6rem, 6.6vw, 2.6rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.03em;
    background: linear-gradient(100deg, var(--ry-ink) 0%, #2b2f4a 45%, rgb(var(--rp-ry-ink)) 80%, rgb(var(--rp-ry-ink2)) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}
.ry-caret {
    display: inline-block;
    width: .08em;
    height: .95em;
    margin-left: .06em;
    vertical-align: -.1em;
    border-radius: 2px;
    background: var(--ry-orange);
    animation: ry-blink 1s steps(1) infinite;
}
.ry-title.is-done .ry-caret { animation: ry-blink 1s steps(1) 3 forwards; }
@keyframes ry-blink { 50% { opacity: 0; } }

.ry-sub {
    max-width: 30ch;
    margin: 16px auto 0;
    color: var(--ry-ink-2);
    font-size: .98rem;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .6s ease, transform .6s ease;
}
.ry-actions {
    margin-top: 26px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .6s ease .15s, transform .6s ease .15s;
}
.ry-typed-done .ry-sub,
.ry-typed-done .ry-actions {
    opacity: 1;
    transform: none;
}

.ry-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 210px;
    min-height: 50px;
    padding: 0 26px;
    border-radius: 99px;
    background: linear-gradient(100deg, var(--ry-orange), rgb(var(--rp-ry-c2)) 60%, rgb(var(--rp-ry-c3)));
    color: #fff;
    font-weight: 700;
    font-size: .98rem;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(var(--rp-ry-c2), .28), inset 0 1px 0 #ffffff59;
}
.ry-cta:active { transform: scale(.97); }

.ry-foot {
    padding-top: 10px;
    color: var(--ry-ink-3);
    font-size: .74rem;
    text-align: center;
}
.ry-foot b { color: var(--ry-ink-2); }

@keyframes ry-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
@keyframes ry-pop {
    from { opacity: 0; transform: scale(.7); }
    to { opacity: 1; transform: none; }
}

/* Larger screens: a little more air. */
@media (min-width: 720px) {
    .ry-title { max-width: 22ch; }
    .ry-sub { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ry-blob,
    .ry-ring,
    .ry-orbit,
    .ry-orb,
    .ry-pill-dot::after,
    .ry-caret,
    .ry-top,
    .ry-eyebrow,
    .ry-orb-wrap { animation: none; }
    .ry-ring { display: none; }
    .ry-sub,
    .ry-actions { transition: none; }
}
