@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800;900&display=swap');

:root {
    --font-primary: 'Nunito', system-ui, -apple-system, sans-serif;
    
    /* Brand Palette - Coerente con le App Blazor */
    --color-brand: #7e57c2;
    --color-brand-dark: #4527a0;
    --color-brand-light: #b39ddb;
    --color-brand-rgb: 126, 87, 194;
    
    --color-accent: #ffee58;
    --color-accent-dark: #fbc02d;
    --color-accent-rgb: 255, 238, 88;
    
    --color-bg-totem: #fff8e7; /* Background crema del Totem */
    --color-bg-light: #fbf9ff;
    --color-bg-dark: #0f0e17;
    --color-surface: #ffffff;
    --color-surface-dark: #1b1a23;
    
    --color-text-dark: #2b1a4b;
    --color-text-muted: #6e5a8f;
    --color-text-white: #ffffff;
    --color-text-white-muted: rgba(255, 255, 255, 0.7);
    
    --color-success: #66bb6a;
    --color-warning: #ffa726;
    --color-error: #ef5350;
    --color-info: #42a5f5;
    
    --radius-totem: 16px;
    --radius-standard: 12px;
    --radius-round: 50%;
    
    --shadow-sm: 0 2px 8px rgba(43, 26, 75, 0.05);
    --shadow-md: 0 8px 24px rgba(43, 26, 75, 0.08);
    --shadow-lg: 0 16px 40px rgba(43, 26, 75, 0.12);
    --shadow-brand: 0 10px 30px rgba(126, 87, 194, 0.25);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Layout Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    position: relative;
}

/* --- Header / Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(251, 249, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(126, 87, 194, 0.08);
    transition: var(--transition-normal);
}

header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
    background-color: rgba(251, 249, 255, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-brand-dark);
}

.logo img {
    height: 38px;
    width: 38px;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(126, 87, 194, 0.2));
}

.logo-text {
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--color-accent-dark);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition-fast);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--color-brand);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-brand);
    transition: var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-standard);
    font-weight: 800;
    text-decoration: none;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
    font-family: var(--font-primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
    color: var(--color-text-white);
    box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(126, 87, 194, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-brand-dark);
    border: 2px solid var(--color-brand);
}

.btn-secondary:hover {
    background-color: rgba(126, 87, 194, 0.05);
    transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero {
    background: radial-gradient(circle at 85% 15%, rgba(255, 238, 88, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 15% 85%, rgba(126, 87, 194, 0.12) 0%, transparent 50%),
                var(--color-bg-light);
    padding-top: 10rem;
    padding-bottom: 8rem;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    /* 3.1rem e non 3.5: il titolo e' due frasi, e a 3.5 la seconda lasciava una
       parola orfana su una riga sua. `text-wrap: balance` distribuisce le righe
       invece di riempirle una per una, cosi' il taglio non dipende dalla larghezza
       esatta della finestra. */
    font-size: 3.1rem;
    font-weight: 900;
    line-height: 1.12;
    text-wrap: balance;
    color: var(--color-brand-dark);
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
}

.hero-content h1 span {
    background: linear-gradient(135deg, var(--color-brand) 0%, #311b92 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(126, 87, 194, 0.08);
    color: var(--color-brand-dark);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* --- Image / Interactive Preview on Hero --- */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    position: absolute;
    background-color: var(--color-surface);
    border-radius: var(--radius-standard);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
    animation: float 4s ease-in-out infinite alternate;
}

.floating-card-1 {
    top: 10%;
    left: -5%;
}

.floating-card-2 {
    bottom: 15%;
    right: -5%;
    animation-delay: 2s;
}

.floating-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.floating-icon.purple { background-color: var(--color-brand); }
.floating-icon.green { background-color: var(--color-success); }

/* --- App Switcher Section --- */
.switcher-section {
    background-color: #f6f3fa;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-brand-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.8px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.switcher-tabs {
    display: inline-flex;
    background-color: rgba(126, 87, 194, 0.08);
    padding: 0.5rem;
    border-radius: 100px;
    margin-bottom: 4rem;
}

.switch-btn {
    border: none;
    background: none;
    padding: 0.75rem 2rem;
    font-family: var(--font-primary);
    font-weight: 800;
    font-size: 1.125rem;
    border-radius: 100px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: var(--transition-normal);
}

.switch-btn.active {
    background-color: var(--color-brand);
    color: var(--color-text-white);
    box-shadow: var(--shadow-brand);
}

/* Area dei Contenuti dello Switcher */
.switcher-content {
    position: relative;
    min-height: 570px;
}

.app-presentation {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    text-align: left;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity var(--transition-normal), transform var(--transition-normal), visibility var(--transition-normal);
}

.app-presentation.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    position: relative;
}

.app-info h3 {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--color-brand-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.app-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--color-accent);
    color: var(--color-text-dark);
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.app-info p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.feature-list li {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-list li svg {
    color: var(--color-brand);
    flex-shrink: 0;
}

/* --- MOCKUP APP 1: Totem (Tablet / Mobile V2) --- */
.mockup-tablet {
    width: 320px;
    height: 520px;
    background-color: #2b1a4b;
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-lg), 0 30px 60px rgba(43, 26, 75, 0.2);
    margin: 0 auto;
    position: relative;
    border: 4px solid #4a3e6b;
    user-select: none;
}

/* Schermo interno del Totem */
.totem-screen {
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-totem);
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    font-family: 'Nunito', sans-serif;
    color: var(--color-text-dark);
}

/* Schermate del Totem gestite da JS */
.totem-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    background-color: var(--color-bg-totem);
    z-index: 1;
}

.totem-view.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* 1. SCHERMATA CARICAMENTO (Welcome / Screen Saver) */
.totem-view-loading {
    background-color: var(--color-brand-dark);
    color: white;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.totem-loading-logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
}

.totem-loading-logo-circle {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--color-accent);
    border-radius: var(--radius-round);
    animation: rotate 2s linear infinite;
}

.totem-loading-logo {
    position: absolute;
    top: 15px; left: 15px; width: 90px; height: 90px;
    border-radius: var(--radius-round);
    background-color: var(--color-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.totem-loading-logo img {
    width: 50px;
    height: 50px;
}

.totem-view-loading h3 {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.totem-view-loading p {
    font-size: 0.85rem;
    color: var(--color-brand-light);
    margin-bottom: 3rem;
}

.totem-progress-container {
    width: 80%;
    background-color: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
}

.totem-progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--color-accent);
    border-radius: 10px;
    transition: width 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.totem-progress-text {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--color-accent);
}

/* 2. SCHERMATA BENVENUTO (Ciao!) */
.totem-view-welcome {
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background-color: #f7f3f9;
}

.totem-welcome-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.totem-welcome-logo {
    width: 60px;
    height: 60px;
    background-color: var(--color-surface);
    border-radius: var(--radius-round);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.totem-welcome-logo img {
    width: 32px;
    height: 32px;
}

.totem-welcome-title {
    font-size: 2.25rem;
    font-weight: 900;
    color: #201730;
    display: flex;
    align-items: center;
    gap: 8px;
}

.totem-welcome-title span {
    animation: wave 1.5s ease infinite alternate;
}

.totem-welcome-subtitle {
    font-size: 1rem;
    font-weight: 800;
    color: #6a5d7c;
}

.totem-welcome-subtitle span {
    color: var(--color-brand);
    font-weight: 900;
}

.totem-welcome-bubble-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.totem-welcome-bubble {
    background-color: white;
    padding: 1rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    max-width: 140px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-text-dark);
}

.totem-welcome-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: white transparent;
    display: block;
    width: 0;
}

.totem-tap-button {
    background-color: var(--color-accent);
    color: var(--color-text-dark);
    padding: 0.9rem 1.8rem;
    border-radius: 100px;
    font-weight: 900;
    font-size: 1.05rem;
    box-shadow: 0 6px 18px rgba(251, 192, 45, 0.35);
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: 1.5rem;
    width: 85%;
    justify-content: center;
}

.totem-tap-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(251, 192, 45, 0.45);
}

.totem-tap-button-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: var(--radius-round);
    box-shadow: 0 0 8px var(--color-success);
    animation: flash 1.5s infinite;
}

/* 3. SCHERMATA LISTA DIPENDENTI (Chi sei?) */
.totem-view-employees {
    padding-top: 1rem;
}

.totem-inner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(126, 87, 194, 0.08);
    padding-bottom: 0.75rem;
}

.totem-inner-logo img {
    height: 24px;
}

.totem-btn-back {
    background: none;
    border: none;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-brand);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.totem-view-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--color-brand-dark);
}

.totem-view-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 700;
    margin-bottom: 1rem;
}

.totem-employee-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    max-height: 380px;
    padding-right: 2px;
}

.totem-employee-item {
    background-color: white;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1.5px solid transparent;
}

.totem-employee-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-brand-light);
}

.totem-emp-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 0.95rem;
}

.totem-emp-avatar.green { background-color: #4caf50; }
.totem-emp-avatar.blue { background-color: #2196f3; }
.totem-emp-avatar.red { background-color: #f44336; }

.totem-emp-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--color-text-dark);
}

/* 4. SCHERMATA INSERIMENTO PIN */
.totem-pin-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.totem-pin-dot {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-round);
    border: 2px solid var(--color-brand-light);
    background-color: transparent;
    transition: var(--transition-fast);
}

.totem-pin-dot.filled {
    background-color: var(--color-brand-dark);
    border-color: var(--color-brand-dark);
    transform: scale(1.15);
}

.totem-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 85%;
    margin: 0 auto;
}

.totem-key {
    background-color: white;
    border: none;
    border-radius: 8px;
    height: 42px;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-text-dark);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.totem-key:hover {
    background-color: var(--color-brand-light);
    color: white;
}

.totem-key:active {
    transform: scale(0.95);
}

.totem-key-empty {
    background: none;
    box-shadow: none;
    cursor: default;
}

.totem-key-empty:hover {
    background: none;
}

.totem-key-backspace {
    font-size: 0.9rem;
    background-color: rgba(110, 90, 143, 0.08);
}

.totem-btn-continue {
    background-color: #e0dbe8;
    color: #9c8fb3;
    width: 85%;
    margin: 1.25rem auto 0 auto;
    padding: 0.75rem;
    border-radius: 100px;
    font-weight: 800;
    border: none;
    cursor: not-allowed;
    text-align: center;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: var(--transition-normal);
}

.totem-btn-continue.active {
    background-color: var(--color-brand-dark);
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-brand);
}

.totem-btn-continue.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(69, 39, 160, 0.3);
}

/* 5. SCHERMATA SCELTA AZIONE (Che si fa?) */
.totem-actions-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.totem-action-btn {
    background-color: white;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    cursor: pointer;
    text-align: left;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    position: relative;
}

.totem-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-brand-light);
}

.totem-action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
}

.totem-action-icon.in {
    background-color: rgba(102, 187, 106, 0.15);
    color: var(--color-success);
}

.totem-action-icon.out {
    background-color: rgba(126, 87, 194, 0.15);
    color: var(--color-brand);
}

.totem-action-details {
    display: flex;
    flex-direction: column;
}

.totem-action-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text-dark);
}

.totem-action-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.totem-suggested-badge {
    position: absolute;
    top: 10px;
    right: 15px;
    background-color: var(--color-accent);
    color: var(--color-text-dark);
    font-size: 0.65rem;
    font-weight: 900;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(251, 192, 45, 0.3);
}

/* 6. SCHERMATA CONFERMA (Tu sei...) */
.totem-confirm-card {
    background-color: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border: 1px solid rgba(126, 87, 194, 0.05);
}

.totem-confirm-name {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--color-brand-dark);
    text-align: center;
    border-bottom: 1.5px solid rgba(126, 87, 194, 0.08);
    padding-bottom: 0.75rem;
}

.totem-confirm-table {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.totem-confirm-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 700;
}

.totem-confirm-label {
    color: var(--color-text-muted);
}

.totem-confirm-val {
    color: var(--color-text-dark);
    font-weight: 800;
}

.totem-btn-yes {
    background-color: var(--color-brand-dark);
    color: white;
    padding: 0.9rem;
    border-radius: 100px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 1.05rem;
    box-shadow: var(--shadow-brand);
    transition: var(--transition-fast);
    margin-top: 1.5rem;
    text-align: center;
}

.totem-btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(69, 39, 160, 0.4);
}

/* 7. SCHERMATA SUCCESSO (A presto!) */
.totem-view-success {
    background-color: var(--color-success);
    color: white;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    overflow: hidden;
}

.totem-success-circle {
    width: 90px;
    height: 90px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.totem-success-welcome {
    font-size: 1.6rem;
    font-weight: 900;
    margin-top: 1rem;
}

.totem-success-action-badge {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 0.35rem 1rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 1rem 0;
    text-transform: uppercase;
}

.totem-success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 85%;
    margin-bottom: 1rem;
}

.totem-btn-done {
    background-color: white;
    color: var(--color-success);
    border: none;
    padding: 0.75rem;
    border-radius: 100px;
    font-weight: 900;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-family: var(--font-primary);
    transition: var(--transition-fast);
}

.totem-btn-done:hover {
    transform: scale(1.02);
}

.totem-btn-print {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.7rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: var(--transition-fast);
}

.totem-btn-print:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Coriandoli animati */
.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #ffd54f;
    border-radius: 2px;
    z-index: 5;
    top: -10px;
    animation: fall 3s linear infinite;
}

/* --- MOCKUP APP 2: Owner (Desktop) --- */
.mockup-desktop {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1.6;
    background-color: #2b1a4b;
    border-radius: 20px;
    padding: 10px 10px 24px 10px;
    box-shadow: var(--shadow-lg), 0 30px 60px rgba(43, 26, 75, 0.15);
    position: relative;
    border: 3px solid #4a3e6b;
}

/* Piedistallo monitor */
.mockup-desktop::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 24px;
    background-color: #3b2c5c;
    border-radius: 0 0 10px 10px;
}

.mockup-desktop::before {
    content: '';
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 8px;
    background-color: #2b1a4b;
    border-radius: 4px;
}

/* Schermo interno Owner */
.desktop-screen {
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-light);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
}

/* Sidebar Dashboard Owner */
.desktop-sidebar {
    width: 25%;
    background-color: var(--color-brand-dark);
    color: white;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-logo {
    font-size: 0.9rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar-logo span { color: var(--color-accent); }

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-item.active, .sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Dashboard Content */
.desktop-content {
    flex-grow: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(126, 87, 194, 0.1);
    padding-bottom: 0.5rem;
}

.dashboard-title h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-brand-dark);
}

.dashboard-title span {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.widget {
    background-color: white;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(126, 87, 194, 0.05);
}

.widget-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.widget-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-brand);
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.widget-value small {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* Grafico SVG Animato */
.chart-container {
    background-color: white;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(126, 87, 194, 0.05);
}

.chart-svg {
    width: 100%;
    height: 80px;
}

.chart-line {
    fill: none;
    stroke: var(--color-brand);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 3s ease forwards;
}

.chart-gradient {
    fill: url(#chart-grad);
    opacity: 0.15;
}

/* Lista dipendenti in dashboard */
.employee-list-widget {
    grid-column: span 2;
}

.employee-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(126, 87, 194, 0.05);
    font-size: 0.75rem;
}

.employee-row:last-child {
    border-bottom: none;
}

.employee-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.employee-avatar {
    width: 24px;
    height: 24px;
    background-color: var(--color-brand-light);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-brand-dark);
    font-weight: 800;
    font-size: 0.65rem;
}

.employee-name {
    font-weight: 700;
}

.employee-status {
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 800;
}

.status-presente {
    background-color: rgba(102, 187, 106, 0.15);
    color: var(--color-success);
}

.status-uscito {
    background-color: rgba(239, 83, 80, 0.15);
    color: var(--color-error);
}

/* --- Features Section (Griglia) --- */
.features {
    background-color: var(--color-surface);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.feature-card {
    background-color: var(--color-bg-light);
    padding: 2.5rem;
    border-radius: var(--radius-totem);
    transition: var(--transition-normal);
    border: 1px solid rgba(126, 87, 194, 0.05);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    background-color: var(--color-surface);
    border-color: rgba(126, 87, 194, 0.15);
}

.feature-card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(126, 87, 194, 0.1) 0%, rgba(126, 87, 194, 0.2) 100%);
    color: var(--color-brand);
    border-radius: var(--radius-standard);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.feature-card h4 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-brand-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.feature-card p {
    color: var(--color-text-muted);
}

/* --- CTA Section --- */
.cta {
    background: linear-gradient(135deg, var(--color-brand-dark) 0%, #1a0933 100%);
    color: white;
    text-align: center;
    padding: 8rem 0;
    overflow: hidden;
}

.cta-container {
    position: relative;
    z-index: 2;
}

.cta h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.cta p {
    font-size: 1.25rem;
    color: var(--color-brand-light);
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: var(--color-text-dark);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 238, 88, 0.4);
}

.btn-outline-white {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: white;
    transform: translateY(-2px);
}

/* Decorative circles */
.cta::before, .cta::after {
    content: '';
    position: absolute;
    border-radius: var(--radius-round);
    background: radial-gradient(circle, rgba(126, 87, 194, 0.15) 0%, transparent 70%);
}

.cta::before {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -200px;
}

.cta::after {
    width: 500px;
    height: 500px;
    bottom: -200px;
    right: -200px;
}

/* --- Footer --- */
footer {
    background-color: var(--color-bg-dark);
    color: var(--color-text-white-muted);
    padding: 4rem 0 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand h4 {
    font-size: 1.5rem;
    color: white;
    font-weight: 900;
    margin-bottom: 1rem;
}

.footer-brand h4 span {
    color: var(--color-accent);
}

.footer-brand p {
    max-width: 320px;
}

.footer-links h5 {
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--color-text-white-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 4px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    font-size: 0.9rem;
}

/* Il recapito vive su fondo scuro: senza questa regola eredita il blu di default
   del browser, che li' e' praticamente illeggibile. */
.footer-bottom a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 700;
}

.footer-bottom a:hover,
.footer-bottom a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --- Animations --- */
@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-12px); }
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes wave {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(15deg); }
}

@keyframes flash {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes popIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(530px) rotate(360deg);
        opacity: 0.3;
    }
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.75rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .floating-card-1 {
        left: 5%;
    }
    
    .floating-card-2 {
        right: 5%;
    }
    
    .app-presentation {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }
    
    .nav-menu {
        display: none; /* In un sito reale ci sarebbe un hamburger menu */
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* --- Blocco ambiente di staging ---
   Iniettato da docs/deploy/Publish-Landing.ps1 solo nella copia pubblicata
   su stg.here-iam.it: mai presente nella build di produzione. */
.staging-block {
    background-color: var(--color-bg-dark);
    padding: 3rem 0;
}

.staging-block .staging-tag {
    display: inline-block;
    background-color: var(--color-warning);
    color: var(--color-bg-dark);
    border-radius: 999px;
    padding: 0.25rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.staging-block h3 {
    color: var(--color-text-white);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.staging-block p {
    color: var(--color-text-white-muted);
    margin-bottom: 1.5rem;
}

.staging-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.staging-links li {
    background-color: var(--color-surface-dark);
    border: 1px solid rgba(126, 87, 194, 0.25);
    border-radius: var(--radius-standard);
    padding: 1rem 1.25rem;
    transition: var(--transition-normal);
}

.staging-links li:hover {
    border-color: var(--color-brand-light);
    transform: translateY(-2px);
}

.staging-links a {
    color: var(--color-text-white);
    text-decoration: none;
    font-weight: 700;
    display: block;
}

.staging-links a:hover {
    color: var(--color-accent);
}

.staging-links span {
    display: block;
    color: var(--color-text-white-muted);
    font-size: 0.82rem;
    margin-top: 0.25rem;
}
