/* Palette e font dal sito vecchioamarodelcapo.com e dal KV "Il momento ghiacciato".
   Capo Display e Texta Narrow sono proprietari: sostituiti con Bebas Neue e Barlow Condensed. */
:root {
    --navy: #0b2342;
    --navy-deep: #061529;
    --ice: #5bb3cb;
    --yellow: #f7c600;
    --yellow-hover: #ffd52b;
    --yellow-active: #c49d00;
    --black: #1d1d1b;
    --text: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Lora", Georgia, serif;
    background:
        radial-gradient(120% 60% at 50% 0%, rgba(91, 179, 203, 0.28), transparent 70%),
        linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    background-color: var(--navy-deep);
    color: white;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 500px;
    min-height: 100dvh;
    padding: 2.5rem 1.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 240px;
    max-width: 80%;
    margin-bottom: 2.5rem;
}

/* Schermate */
.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.screen.active {
    display: flex;
}

h1 {
    font-family: "Bebas Neue", "Barlow Condensed", sans-serif;
    font-weight: 400;
    font-size: 3rem;
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(10, 106, 175, 0.5);
}

p {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.5;
}

/* Form */
#upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.file-name {
    font-size: 0.85rem;
    font-style: italic;
    word-break: break-all;
}

/* Bottoni (pillola, come .o-button del sito) */
.btn {
    display: inline-block;
    width: 100%;
    max-width: 300px;
    padding: 0.9em 1.125em;
    border: 3px solid transparent;
    border-radius: 100px;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s linear;
}

.btn-primary {
    background: var(--yellow);
    color: var(--black);
}

.btn-primary:hover {
    background: var(--yellow-hover);
}

.btn-primary:active {
    background: var(--yellow-active);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover,
.btn-secondary:active {
    background: white;
    color: var(--navy);
}

/* Progress bar */
.progress-bar-container {
    width: 100%;
    max-width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--yellow);
    border-radius: 100px;
    transition: width 0.2s;
}

#progress-text {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--yellow);
}

/* Spinner */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--ice);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* QR */
#qr-container {
    margin: 0.5rem 0 1rem;
    padding: 14px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

#qr-container canvas,
#qr-container img {
    display: block;
}

/* Footer */
.tagline {
    margin-top: auto;
    padding-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.claim {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.responsible {
    font-size: 0.75rem;
    color: var(--text);
}
