/* =========================================================================
   WSA Canteen Menu Converter
   Color palette from RefernzBilderFürWebseitDesign:
   Loud Indigo #7000FF · Wave #6B00F4 · Grey #666666 · Light Grey #EBE9E7
   ========================================================================= */

:root {
    --indigo:        #7000FF;
    --indigo-bright: #8A3BFF;
    --indigo-wave:   #6B00F4;
    --indigo-600:    #5E00D5;
    --indigo-800:    #3B0087;
    --indigo-900:    #260059;
    --indigo-950:    #16003A;
    --ink:           #0C0020;

    --grey:          #666666;
    --grey-200:      #EBE9E7;
    --grey-100:      #F5F4F3;
    --white:         #FFFFFF;

    --text:          #1A0B3B;
    --text-soft:     #5C5470;
    --danger:        #C42B4E;
    --success:       #17A673;

    --radius-lg: 28px;
    --radius:    16px;
    --radius-sm: 11px;

    --shadow-card: 0 40px 90px -30px rgba(10, 0, 40, .65), 0 4px 18px rgba(10, 0, 40, .25);
    --shadow-glow: 0 18px 44px -14px rgba(112, 0, 255, .65);

    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(.22, .8, .3, 1);
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: #EDE7FB;
    background: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -.02em; }
p  { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--indigo); color: #fff; }

:focus-visible {
    outline: 2px solid var(--indigo-bright);
    outline-offset: 3px;
    border-radius: 6px;
}

/* =========================================================================
   Background
   ========================================================================= */

.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% -10%, var(--indigo-800) 0%, var(--indigo-950) 45%, var(--ink) 100%);
}

.backdrop__wave {
    position: absolute;
    left: -20%;
    width: 140%;
    height: 78vh;
    background: url("assets/wsa-wave.png") center/cover no-repeat;
    will-change: transform;
}

.backdrop__wave--a {
    top: -12vh;
    opacity: .85;
    -webkit-mask-image: radial-gradient(80% 70% at 50% 35%, #000 25%, transparent 72%);
            mask-image: radial-gradient(80% 70% at 50% 35%, #000 25%, transparent 72%);
    animation: drift-a 34s var(--ease) infinite alternate;
}

.backdrop__wave--b {
    top: 34vh;
    opacity: .28;
    transform: scaleY(-1);
    filter: blur(2px) saturate(1.2);
    -webkit-mask-image: radial-gradient(70% 60% at 45% 50%, #000 10%, transparent 70%);
            mask-image: radial-gradient(70% 60% at 45% 50%, #000 10%, transparent 70%);
    animation: drift-b 46s var(--ease) infinite alternate;
}

@keyframes drift-a {
    from { transform: translate3d(-3%, 0, 0) scale(1.05); }
    to   { transform: translate3d(4%, 3vh, 0) scale(1.16); }
}
@keyframes drift-b {
    from { transform: scaleY(-1) translate3d(4%, 0, 0) scale(1.1); }
    to   { transform: scaleY(-1) translate3d(-5%, -2vh, 0) scale(1.22); }
}

.backdrop__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .5;
    will-change: transform;
}
.backdrop__blob--1 {
    width: 46vw; height: 46vw;
    top: 8vh; left: -10vw;
    background: radial-gradient(circle, var(--indigo) 0%, transparent 68%);
    animation: float-1 26s ease-in-out infinite;
}
.backdrop__blob--2 {
    width: 38vw; height: 38vw;
    top: 52vh; right: -8vw;
    background: radial-gradient(circle, var(--indigo-wave) 0%, transparent 66%);
    animation: float-2 32s ease-in-out infinite;
}

@keyframes float-1 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(6vw, 8vh); }
}
@keyframes float-2 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-7vw, -6vh); }
}

/* fine noise against gradient banding */
.backdrop__grain {
    position: absolute;
    inset: 0;
    opacity: .05;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
}

/* =========================================================================
   Topbar
   ========================================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px clamp(20px, 5vw, 56px);
    backdrop-filter: blur(14px);
    background: linear-gradient(to bottom, rgba(12, 0, 32, .55), rgba(12, 0, 32, 0));
}

.topbar__brand img {
    display: block;
    height: 30px;
    width: auto;
    /* Loud Indigo logo is rendered pure white for the dark background */
    filter: brightness(0) invert(1);
    transition: transform .5s var(--ease), filter .4s var(--ease);
}
.topbar__brand:hover img { transform: scale(1.04); }

.topbar__nav { display: flex; align-items: center; gap: 10px; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .01em;
    border-radius: 999px;
    white-space: nowrap;
    text-decoration: none;
    color: #D9CCFF;
    border: 1px solid rgba(214, 190, 255, .22);
    background: rgba(255, 255, 255, .05);
    transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.pill--link:hover { background: rgba(112, 0, 255, .45); color: #fff; border-color: transparent; transform: translateY(-1px); }

.dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--grey);
    box-shadow: 0 0 0 0 rgba(23, 166, 115, .55);
}
.dot.is-ok   { background: #35E0A1; animation: dot-pulse 2.4s ease-out infinite; }
.dot.is-down { background: #FF6A8A; }

@keyframes dot-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(53, 224, 161, .55); }
    70%  { box-shadow: 0 0 0 8px rgba(53, 224, 161, 0); }
    100% { box-shadow: 0 0 0 0 rgba(53, 224, 161, 0); }
}

/* =========================================================================
   Hero
   ========================================================================= */

main { display: block; }

.hero {
    max-width: 940px;
    margin: 0 auto;
    padding: clamp(48px, 9vh, 96px) clamp(20px, 5vw, 40px) clamp(28px, 5vh, 56px);
    text-align: center;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px 7px 12px;
    margin-bottom: 26px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #D9C7FF;
    border-radius: 999px;
    border: 1px solid rgba(214, 190, 255, .25);
    background: rgba(112, 0, 255, .18);
}

.spark {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--indigo-bright);
    box-shadow: 0 0 12px 2px rgba(138, 59, 255, .9);
    animation: spark 2.8s ease-in-out infinite;
}
@keyframes spark {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(.55); opacity: .5; }
}

.hero__title {
    font-size: clamp(2.9rem, 9vw, 5.6rem);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 12px 60px rgba(112, 0, 255, .5);
}

.hero__title-accent {
    background: linear-gradient(96deg, #fff 0%, #C9A8FF 40%, var(--indigo-bright) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    animation: sheen 9s linear infinite;
}
@keyframes sheen {
    0%   { background-position: 0 0; }
    100% { background-position: 220% 0; }
}

.hero__lead {
    max-width: 620px;
    margin: 24px auto 0;
    font-size: clamp(1rem, 2.2vw, 1.16rem);
    line-height: 1.65;
    color: #C6BAE0;
}

.hero__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 17px;
    font-size: .86rem;
    font-weight: 600;
    color: #E3D9FF;
    border-radius: 999px;
    border: 1px solid rgba(214, 190, 255, .2);
    background: rgba(255, 255, 255, .06);
    transition: transform .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
}
.chip:hover { transform: translateY(-3px); background: rgba(112, 0, 255, .3); border-color: rgba(214, 190, 255, .4); }
.chip__ico { color: var(--indigo-bright); font-size: 1rem; line-height: 1; }

.hero__scroll { margin-top: 44px; display: flex; justify-content: center; }
.hero__scroll-line {
    width: 1px; height: 54px;
    background: linear-gradient(to bottom, transparent, rgba(214, 190, 255, .7), transparent);
    animation: scroll-hint 2.6s ease-in-out infinite;
}
@keyframes scroll-hint {
    0%, 100% { opacity: .25; transform: scaleY(.7); }
    50%      { opacity: 1;   transform: scaleY(1); }
}

/* =========================================================================
   Card / Converter
   ========================================================================= */

.stage {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 clamp(16px, 5vw, 40px);
}

.card {
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--white);
    color: var(--text);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* glowing edge */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgba(112, 0, 255, .9), rgba(255, 255, 255, .15) 40%, rgba(107, 0, 244, .7));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.card__pane { padding: clamp(26px, 4.5vw, 42px); }
.card__pane--center { text-align: center; }

.card__head { margin-bottom: 30px; }
.card__head h2 { font-size: 1.6rem; color: var(--text); }
.card__head p  { margin-top: 8px; color: var(--text-soft); font-size: .95rem; }

/* ---- Steps ---- */

.step {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 16px;
    padding-bottom: 28px;
}
.step:not(:last-of-type)::after {
    content: "";
    position: absolute;
    left: 17px;
    top: 40px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--grey-200), rgba(235, 233, 231, 0));
}

.step__no {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    font-size: .9rem;
    font-weight: 700;
    color: var(--indigo);
    background: #F1EBFF;
    border: 1px solid #DFCEFF;
    transition: background .4s var(--ease), color .4s var(--ease), transform .4s var(--ease);
}
.step.is-done .step__no {
    background: var(--indigo);
    border-color: var(--indigo);
    color: #fff;
    transform: scale(1.06);
}

.step__label {
    display: block;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text);
}
.step__hint {
    margin-top: 5px;
    font-size: .86rem;
    line-height: 1.55;
    color: var(--text-soft);
}
.step__hint code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: .82em;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--grey-100);
    color: var(--indigo-600);
}

/* ---- Input field ---- */

.field { position: relative; margin-top: 14px; }

.field input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    font-family: inherit;
    font-size: .95rem;
    color: var(--text);
    background: var(--grey-100);
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.field input::placeholder { color: #A9A2BB; }
.field input:focus {
    outline: none;
    background: #fff;
    border-color: var(--indigo);
    box-shadow: 0 0 0 4px rgba(112, 0, 255, .13);
}

.field__toggle {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--grey);
    cursor: pointer;
    transition: background .25s var(--ease), color .25s var(--ease);
}
.field__toggle:hover { background: var(--grey-200); color: var(--indigo); }
.ico-eye { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.field__toggle[aria-pressed="true"] .ico-eye { stroke: var(--indigo); }

/* ---- Checkbox ---- */

.check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    font-size: .86rem;
    color: var(--text-soft);
    cursor: pointer;
    user-select: none;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
    position: relative;
    width: 19px; height: 19px;
    border-radius: 6px;
    border: 1.5px solid #D3CDE2;
    background: #fff;
    transition: background .25s var(--ease), border-color .25s var(--ease);
}
.check__box::after {
    content: "";
    position: absolute;
    left: 6px; top: 2px;
    width: 5px; height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .25s var(--ease);
}
.check input:checked + .check__box { background: var(--indigo); border-color: var(--indigo); }
.check input:checked + .check__box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 4px rgba(112, 0, 255, .18); }

/* ---- Dropzone ---- */

.drop {
    position: relative;
    margin-top: 14px;
    padding: 30px 22px;
    text-align: center;
    border-radius: var(--radius);
    border: 2px dashed #D8D3E4;
    background: var(--grey-100);
    cursor: pointer;
    transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.drop:hover { border-color: var(--indigo); background: #FAF7FF; }
.drop.is-drag {
    border-color: var(--indigo);
    background: #F4ECFF;
    transform: scale(1.015);
    box-shadow: var(--shadow-glow);
}
.drop.is-filled { cursor: default; border-style: solid; border-color: #E2DAF5; background: #FAF7FF; padding: 18px; }
.drop.is-error  { border-color: var(--danger); background: #FDF2F5; animation: shake .45s var(--ease); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-7px); }
    75%      { transform: translateX(7px); }
}

.drop__ico {
    display: grid;
    place-items: center;
    width: 52px; height: 52px;
    margin: 0 auto 14px;
    border-radius: 16px;
    color: var(--indigo);
    background: #fff;
    box-shadow: 0 8px 20px -8px rgba(112, 0, 255, .5);
    transition: transform .45s var(--ease);
}
.drop:hover .drop__ico,
.drop.is-drag .drop__ico { transform: translateY(-4px); }
.drop__ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.drop.is-drag .drop__ico svg { animation: bob .9s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.drop__title { font-weight: 700; color: var(--text); }
.drop__sub   { margin-top: 4px; font-size: .87rem; color: var(--text-soft); }
.link { color: var(--indigo); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.filecard {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    animation: pop-in .45s var(--ease) both;
}
@keyframes pop-in {
    from { opacity: 0; transform: translateY(8px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
.filecard__badge {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    height: 46px;
    border-radius: 12px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    color: #fff;
    background: linear-gradient(140deg, var(--indigo), var(--indigo-600));
    box-shadow: 0 8px 18px -8px rgba(112, 0, 255, .8);
}
.filecard__meta { min-width: 0; flex: 1; }
.filecard__name {
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.filecard__size { font-size: .82rem; color: var(--text-soft); margin-top: 2px; }
.filecard__clear {
    flex: 0 0 auto;
    width: 32px; height: 32px;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--grey);
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.filecard__clear:hover { background: #F3E9EE; color: var(--danger); transform: rotate(90deg); }

/* ---- Segmented Control ---- */

.segmented {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 14px;
    padding: 4px;
    border-radius: 13px;
    background: var(--grey-100);
}
.segmented__pill {
    position: absolute;
    top: 4px; left: 4px;
    width: calc(50% - 6px);
    height: calc(100% - 8px);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--indigo), var(--indigo-600));
    box-shadow: 0 8px 18px -8px rgba(112, 0, 255, .85);
    transition: transform .45s var(--ease);
}
.segmented[data-active="English"] .segmented__pill { transform: translateX(calc(100% + 4px)); }

.segmented__opt {
    position: relative;
    z-index: 1;
    padding: 11px 8px;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-soft);
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: color .35s var(--ease);
}
.segmented__opt.is-active { color: #fff; }
.segmented__tag {
    display: inline-block;
    margin-left: 7px;
    padding: 2px 7px;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    border-radius: 999px;
    background: rgba(0, 0, 0, .07);
    color: inherit;
    opacity: .8;
}
.segmented__opt.is-active .segmented__tag { background: rgba(255, 255, 255, .22); }

/* ---- Alert ---- */

.alert {
    display: flex;
    gap: 13px;
    margin: 4px 0 20px;
    padding: 15px 17px;
    border-radius: var(--radius-sm);
    background: #FDF2F5;
    border: 1px solid #F3D3DC;
    animation: pop-in .35s var(--ease) both;
}.alert[hidden] {
     display: none;
 }
.alert__ico {
    display: grid;
    place-items: center;
    flex: 0 0 24px;
    height: 24px;
    border-radius: 50%;
    font-size: .82rem;
    font-weight: 800;
    color: #fff;
    background: var(--danger);
}
.alert__title { font-size: .93rem; font-weight: 700; color: #8C1834; }
.alert__text  { margin-top: 3px; font-size: .87rem; line-height: 1.5; color: #A34860; word-break: break-word; }

/* ---- Buttons ---- */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 26px;
    font-family: inherit;
    font-size: .97rem;
    font-weight: 700;
    text-decoration: none;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), opacity .3s var(--ease), background .3s var(--ease);
}
.btn--go { width: 100%; margin-top: 8px; }

.btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-600) 55%, var(--indigo-wave) 100%);
    box-shadow: var(--shadow-glow);
}
/* shine stripe on hover */
.btn--primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform .8s var(--ease);
}
.btn--primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 22px 50px -14px rgba(112, 0, 255, .8); }
.btn--primary:hover:not(:disabled)::after { transform: translateX(120%); }
.btn--primary:active:not(:disabled) { transform: translateY(0) scale(.99); }
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }

.btn--ghost {
    color: var(--indigo);
    background: #F4EEFF;
}
.btn--ghost:hover { background: #EAE0FF; transform: translateY(-2px); }

.btn--quiet {
    margin-top: 26px;
    padding: 10px 20px;
    font-size: .88rem;
    color: var(--text-soft);
    background: transparent;
}
.btn--quiet:hover { color: var(--danger); background: var(--grey-100); }

.btn__arrow { transition: transform .35s var(--ease); }
.btn--primary:hover:not(:disabled) .btn__arrow { transform: translateX(4px); }
#downloadBtn:hover .btn__arrow { transform: translateY(3px); }

/* =========================================================================
   Progress
   ========================================================================= */

.pulse {
    position: relative;
    display: grid;
    place-items: center;
    width: 108px; height: 108px;
    margin: 6px auto 26px;
}
.pulse__mark {
    position: relative;
    z-index: 1;
    width: 72px;
    animation: mark-breathe 2.4s ease-in-out infinite;
}
@keyframes mark-breathe {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%      { transform: scale(1.08); opacity: .78; }
}
.pulse__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--indigo);
    opacity: 0;
    animation: ripple 2.4s ease-out infinite;
}
.pulse__ring:nth-child(2) { animation-delay: 1.2s; }
@keyframes ripple {
    0%   { transform: scale(.55); opacity: .55; }
    100% { transform: scale(1.25); opacity: 0; }
}

.progress__title { font-size: 1.42rem; color: var(--text); }
.progress__sub {
    margin-top: 9px;
    min-height: 1.4em;
    font-size: .93rem;
    color: var(--text-soft);
    transition: opacity .3s var(--ease);
}
.progress__sub.is-swapping { opacity: 0; }

.bar {
    position: relative;
    height: 11px;
    margin-top: 26px;
    border-radius: 999px;
    background: var(--grey-200);
    overflow: hidden;
}
.bar__fill {
    position: relative;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--indigo-wave), var(--indigo) 55%, var(--indigo-bright));
    transition: width .45s var(--ease);
}
/* running stripes while work is in progress */
.bar__fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(115deg,
        rgba(255, 255, 255, .32) 25%, transparent 25%,
        transparent 50%, rgba(255, 255, 255, .32) 50%,
        rgba(255, 255, 255, .32) 75%, transparent 75%);
    background-size: 26px 26px;
    animation: stripes 1s linear infinite;
}
.bar.is-done .bar__fill::after { animation: none; opacity: 0; transition: opacity .4s; }
@keyframes stripes { to { background-position: 26px 0; } }

.bar__pct {
    margin-top: 10px;
    font-size: .88rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--indigo);
}

.phases {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-top: 26px;
}
.phase {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: .84rem;
    color: #B4AEC3;
    transition: color .4s var(--ease);
}
.phase__dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--grey-200);
    transition: background .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
}
.phase.is-active { color: var(--indigo); font-weight: 700; }
.phase.is-active .phase__dot {
    background: var(--indigo);
    transform: scale(1.25);
    box-shadow: 0 0 0 5px rgba(112, 0, 255, .15);
}
.phase.is-done { color: var(--text-soft); }
.phase.is-done .phase__dot { background: var(--success); }

/* =========================================================================
   Result
   ========================================================================= */

.result__head {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-bottom: 24px;
}
.result__title { font-size: 1.42rem; color: var(--text); }
.result__sub   { margin-top: 5px; font-size: .88rem; color: var(--text-soft); word-break: break-all; }

.tick { flex: 0 0 auto; }
.tick svg { width: 52px; height: 52px; fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.tick circle {
    stroke: var(--success);
    stroke-dasharray: 152;
    stroke-dashoffset: 152;
    animation: draw .6s var(--ease) forwards;
}
.tick path {
    stroke: var(--success);
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: draw .4s var(--ease) .45s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.preview {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--grey-200);
    background: var(--grey-100);
    animation: pop-in .5s var(--ease) .2s both;
}
.preview iframe {
    display: block;
    width: 100%;
    height: 460px;
    border: 0;
}

.result__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    margin-top: 22px;
}
.result__actions #downloadBtn {
    width: 100%;
}
.result__actions #restartBtn {
    padding: 11px 22px;
    font-size: .9rem;
}

/* =========================================================================
   Process section
   ========================================================================= */

.how {
    max-width: 1080px;
    margin: clamp(70px, 12vh, 130px) auto 0;
    padding: 0 clamp(20px, 5vw, 40px);
}
.how__title {
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    color: #fff;
    text-align: center;
    margin-bottom: 38px;
}
.how__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 18px;
}
.how__card {
    position: relative;
    padding: 30px 26px 26px;
    border-radius: var(--radius);
    border: 1px solid rgba(214, 190, 255, .16);
    background: rgba(255, 255, 255, .045);
    backdrop-filter: blur(10px);
    transition: transform .45s var(--ease), background .45s var(--ease), border-color .45s var(--ease);
}
.how__card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, .085);
    border-color: rgba(214, 190, 255, .35);
}
.how__no {
    display: block;
    margin-bottom: 12px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .18em;
    color: var(--indigo-bright);
}
.how__card h3 { font-size: 1.12rem; color: #fff; }
.how__card p  { margin-top: 10px; font-size: .9rem; line-height: 1.65; color: #B7ACD0; }
.how__diet { display: flex; gap: 10px; margin-top: 16px; }
.how__diet img { height: 30px; width: auto; }

/* =========================================================================
   Footer
   ========================================================================= */

.footer {
    margin-top: clamp(70px, 12vh, 120px);
    padding: 40px 20px 48px;
    text-align: center;
    border-top: 1px solid rgba(214, 190, 255, .12);
}
.footer__logo {
    height: 24px;
    margin-bottom: 14px;
    filter: brightness(0) invert(1);
    opacity: .55;
}
.footer p { font-size: .8rem; color: #8479A0; }

/* =========================================================================
   Reveal animation
   ========================================================================= */

.reveal {
    opacity: 0;
    transform: translateY(26px);
}
.reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity .8s var(--ease) var(--d, 0ms), transform .8s var(--ease) var(--d, 0ms);
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 560px) {
    .topbar { padding: 14px 18px; }
    .topbar__brand img { height: 24px; }
    #apiStatus { display: none; }
    .step { grid-template-columns: 28px 1fr; gap: 12px; }
    .step__no { width: 28px; height: 28px; font-size: .8rem; }
    .step:not(:last-of-type)::after { left: 14px; }
    .preview iframe { height: 330px; }
    .phases { gap: 8px 14px; }
}

/* =========================================================================
   Reduced motion
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
