/*
 * Farewell page styles - redesigned to mirror the price-bee.com transition
 * page aesthetic: thin progress bar at the top, centred column layout, logo
 * transition row, big headline with an orange accent on the key word, an
 * orange-left-border callout, and a primary CTA.
 *
 * Brand tokens match the monitoring dashboard themes (accent #FF8939).
 * Motion gates behind prefers-reduced-motion: reduce.
 */

/* ------------------------------------------------------------------ */
/* Design tokens                                                      */
/* ------------------------------------------------------------------ */
:root {
    --bg:                #ffffff;
    --surface-soft:      #f8fafc;
    --border:            rgba(15, 23, 42, 0.08);
    --border-strong:     rgba(15, 23, 42, 0.18);

    --ink:               #0f172a;
    --ink-soft:          #334155;
    --ink-muted:         #64748b;
    --ink-faint:         #94a3b8;

    /* PriceBee orange (from monitoring theme + the blue/orange slash in the logo) */
    --accent:            #FF8939;
    --accent-strong:     #E07020;
    --accent-bg:         rgba(255, 137, 57, 0.12);
    --accent-blue:       #11A3FF;

    --space-1:           0.25rem;
    --space-2:           0.5rem;
    --space-3:           0.75rem;
    --space-4:           1rem;
    --space-5:           1.5rem;
    --space-6:           2rem;
    --space-7:           3rem;
    --space-8:           4rem;

    --font-system:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif;
    --radius:            12px;

    --ease-out:          cubic-bezier(0.16, 1, 0.3, 1);
    --reveal-duration:   620ms;
    --reveal-stagger:    90ms;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:             #0b1120;
        --surface-soft:   #111827;
        --border:         rgba(255, 255, 255, 0.06);
        --border-strong:  rgba(255, 255, 255, 0.14);
        --ink:            #f1f5f9;
        --ink-soft:       #cbd5e1;
        --ink-muted:      #94a3b8;
        --ink-faint:      #475569;
    }
}

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

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-system);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ------------------------------------------------------------------ */
/* Top progress bar                                                   */
/* ------------------------------------------------------------------ */
/* Slim blue+orange split right at the viewport edge, mirroring the
   price-bee.com transition cue. Two spans so each colour can carry a
   subtle gradient. */
.progress-bar {
    display: flex;
    width: 100%;
    height: 5px;
    flex-shrink: 0;
}

.progress-blue {
    flex: 0 0 35%;
    background: linear-gradient(90deg, var(--accent-blue), #4FBBFF);
}

.progress-orange {
    flex: 0 0 65%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

/* ------------------------------------------------------------------ */
/* Page wrapper (centred column)                                      */
/* ------------------------------------------------------------------ */
.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-5);
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    gap: var(--space-6);
}

/* ------------------------------------------------------------------ */
/* Logo transition row                                                */
/* ------------------------------------------------------------------ */
.logo-row {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin: 0;
}

.brand-logo {
    width: 130px;
    height: auto;
    color: var(--ink);
    flex-shrink: 0;
}

.arrow {
    width: 36px;
    height: auto;
    color: var(--ink-faint);
    flex-shrink: 0;
}

.mixer-icon {
    width: 110px;
    height: auto;
    flex-shrink: 0;
}

/* ------------------------------------------------------------------ */
/* Status chip                                                        */
/* ------------------------------------------------------------------ */
/* Small orange pill with a pulsing dot indicating retirement. Sits   */
/* between the logo transition row and the big headline.              */
.status {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.55em;
    padding: 0.35rem 0.85rem;
    background: var(--accent-bg);
    color: var(--accent-strong);
    border: 1px solid rgba(255, 137, 57, 0.25);
    border-radius: 9999px;
    font-size: 0.825rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    align-self: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-bg);
    flex-shrink: 0;
}

.status time {
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: no-preference) {
    .status-dot {
        animation: status-pulse 2.4s ease-in-out infinite;
    }
}

@keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(255, 137, 57, 0.45); }
    50%      { box-shadow: 0 0 0 6px rgba(255, 137, 57, 0); }
}

/* ------------------------------------------------------------------ */
/* Headline + subtitle                                                */
/* ------------------------------------------------------------------ */
.headline {
    margin: 0;
    font-size: clamp(1.875rem, 4vw, 2.875rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
    font-weight: 700;
    max-width: 18ch;
}

.headline .accent {
    color: var(--accent-strong);
}

.subtitle {
    margin: 0;
    font-size: clamp(1rem, 1.6vw, 1.125rem);
    color: var(--ink-soft);
    max-width: 48ch;
    display: flex;
    flex-direction: column;
    gap: 0.35em;
}

/* ------------------------------------------------------------------ */
/* Callout                                                            */
/* ------------------------------------------------------------------ */
.callout {
    width: 100%;
    max-width: 560px;
    padding: var(--space-5) var(--space-6);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    text-align: left;
}

.callout p {
    margin: 0;
    font-size: 1rem;
    color: var(--ink-soft);
    line-height: 1.55;
}

.callout strong {
    color: var(--ink);
    font-weight: 700;
    display: block;
    margin-bottom: var(--space-1);
}

/* ------------------------------------------------------------------ */
/* CTA                                                                */
/* ------------------------------------------------------------------ */
.cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.85rem 1.5rem;
    background: var(--accent);
    color: #ffffff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 8px 18px -10px rgba(255, 137, 57, 0.6);
    transition:
        background 180ms var(--ease-out),
        transform  180ms var(--ease-out),
        box-shadow 180ms var(--ease-out);
}

.cta svg {
    transition: transform 180ms var(--ease-out);
}

.cta:hover,
.cta:focus-visible {
    background: var(--accent-strong);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px -10px rgba(255, 137, 57, 0.7);
}

.cta:hover svg,
.cta:focus-visible svg {
    transform: translateX(3px);
}

/* ------------------------------------------------------------------ */
/* Concrete mixer mark (standalone illustration)                      */
/* ------------------------------------------------------------------ */
.mark {
    margin: 0;
    width: 100%;
    max-width: 360px;
}

.mark svg {
    width: 100%;
    height: auto;
}

@media (prefers-reduced-motion: no-preference) {
    .wheels circle:nth-child(odd) {
        transform-origin: center;
        transform-box: fill-box;
        animation: rolling 1.8s linear infinite;
    }

    .drum-stripes {
        animation: drum-spin 3.2s linear infinite;
    }

    .drop {
        transform-origin: center;
        transform-box: fill-box;
        opacity: 0;
        animation: pour 1.8s var(--ease-out) infinite;
    }
    .drop-1 { animation-delay: 0ms;   }
    .drop-2 { animation-delay: 400ms; }
    .drop-3 { animation-delay: 800ms; }

    .puddle {
        transform-origin: center;
        transform-box: fill-box;
        animation: puddle-pulse 2.4s ease-in-out infinite;
    }
}

@keyframes rolling {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

@keyframes drum-spin {
    from { transform: translateX(0); }
    to   { transform: translateX(-64px); }
}

@keyframes pour {
    0%   { transform: translateY(0)    scale(1);    opacity: 0;    }
    15%  { transform: translateY(0)    scale(1);    opacity: 0.95; }
    85%  { transform: translateY(18px) scale(0.5);  opacity: 0.15; }
    100% { transform: translateY(24px) scale(0.3);  opacity: 0;    }
}

@keyframes puddle-pulse {
    0%, 100% { transform: scaleX(1)   scaleY(1);   opacity: 0.35; }
    50%      { transform: scaleX(1.1) scaleY(1.3); opacity: 0.55; }
}

/* ------------------------------------------------------------------ */
/* Footer                                                             */
/* ------------------------------------------------------------------ */
.page-footer {
    padding: var(--space-5) var(--space-5);
    border-top: 1px solid var(--border);
    color: var(--ink-muted);
    font-size: 0.875rem;
    text-align: center;
    flex-shrink: 0;
}

.page-footer p {
    margin: 0;
}

.page-footer time {
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
    font-weight: 500;
}

/* ------------------------------------------------------------------ */
/* Mobile                                                             */
/* ------------------------------------------------------------------ */
@media (max-width: 560px) {
    .logo-row {
        flex-direction: column;
        gap: var(--space-3);
    }
    .arrow {
        transform: rotate(90deg);
    }
    .page {
        padding: var(--space-6) var(--space-4);
        gap: var(--space-5);
    }
}

/* ------------------------------------------------------------------ */
/* Staggered reveal                                                   */
/* ------------------------------------------------------------------ */
[data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity   var(--reveal-duration) var(--ease-out),
        transform var(--reveal-duration) var(--ease-out);
}

body.entered [data-reveal="0"] { transition-delay: 0ms; }
body.entered [data-reveal="1"] { transition-delay: 80ms; }
body.entered [data-reveal="2"] { transition-delay: 160ms; }
body.entered [data-reveal="3"] { transition-delay: 240ms; }
body.entered [data-reveal="4"] { transition-delay: 320ms; }
body.entered [data-reveal="5"] { transition-delay: 400ms; }
body.entered [data-reveal="6"] { transition-delay: 480ms; }
body.entered [data-reveal="7"] { transition-delay: 560ms; }

body.entered [data-reveal] {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ------------------------------------------------------------------ */
/* Focus visibility                                                   */
/* ------------------------------------------------------------------ */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}
