/* ==========================================================================
   SHOWCASE.CSS - Sito Vetrina www.welook.it
   Tema Normale (Light) & Scuro (Dark) con rilevamento automatico di sistema
   Responsive per Smartphone, Tablet e Desktop
   ========================================================================== */

:root {
    color-scheme: light dark;

    /* Palette Tema Normale (Light) */
    --bg: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-subtle: #f1f5f9;
    --text: #0f172a;
    --text-muted: #475569;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    --primary: #1a73e8;
    --primary-hover: #1557b0;
    --primary-soft: rgba(26, 115, 232, 0.10);
    --primary-contrast: #ffffff;

    --accent: #0ea5e9;
    --success: #15803d;
    --success-bg: #dcfce7;
    --success-border: #86efac;
    --error: #b91c1c;
    --error-bg: #fee2e2;
    --error-border: #fca5a5;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.14);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --header-h: 72px;
}

/* Tema Scuro automatico quando il sistema/browser è in Dark Mode */
@media (prefers-color-scheme: dark) {
    html[data-theme="auto"],
    html:not([data-theme]) {
        color-scheme: dark;
        --bg: #070b14;
        --bg-elevated: #111827;
        --bg-subtle: #1e293b;
        --text: #f1f5f9;
        --text-muted: #94a3b8;
        --border: #1f2937;
        --border-strong: #334155;

        --primary: #60a5fa;
        --primary-hover: #93c5fd;
        --primary-soft: rgba(96, 165, 250, 0.14);
        --primary-contrast: #071124;

        --accent: #38bdf8;
        --success: #4ade80;
        --success-bg: rgba(34, 197, 94, 0.14);
        --success-border: rgba(74, 222, 128, 0.35);
        --error: #f87171;
        --error-bg: rgba(239, 68, 68, 0.14);
        --error-border: rgba(248, 113, 113, 0.35);

        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
        --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 20px 45px -12px rgba(0, 0, 0, 0.65);
    }
}

/* Tema Scuro forzato manualmente */
html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #070b14;
    --bg-elevated: #111827;
    --bg-subtle: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #1f2937;
    --border-strong: #334155;

    --primary: #60a5fa;
    --primary-hover: #93c5fd;
    --primary-soft: rgba(96, 165, 250, 0.14);
    --primary-contrast: #071124;

    --accent: #38bdf8;
    --success: #4ade80;
    --success-bg: rgba(34, 197, 94, 0.14);
    --success-border: rgba(74, 222, 128, 0.35);
    --error: #f87171;
    --error-bg: rgba(239, 68, 68, 0.14);
    --error-border: rgba(248, 113, 113, 0.35);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 45px -12px rgba(0, 0, 0, 0.65);
}

/* Tema Chiaro forzato manualmente */
html[data-theme="light"] {
    color-scheme: light;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--primary);
    color: var(--primary-contrast);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    z-index: 2000;
    font-weight: 600;
}

.skip-link:focus {
    left: 12px;
}

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   HEADER & NAVIGAZIONE
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.brand-link:hover {
    color: var(--text);
}

.brand-logo {
    height: 36px;
    width: auto;
    border-radius: 8px;
    display: block;
}

.brand-logo.logo-light,
.preview-brand img.logo-light {
    display: block;
}

.brand-logo.logo-dark,
.preview-brand img.logo-dark {
    display: none;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] .brand-logo.logo-light,
    html[data-theme="auto"] .preview-brand img.logo-light,
    html:not([data-theme]) .brand-logo.logo-light,
    html:not([data-theme]) .preview-brand img.logo-light {
        display: none;
    }

    html[data-theme="auto"] .brand-logo.logo-dark,
    html[data-theme="auto"] .preview-brand img.logo-dark,
    html:not([data-theme]) .brand-logo.logo-dark,
    html:not([data-theme]) .preview-brand img.logo-dark {
        display: block;
    }
}

html[data-theme="dark"] .brand-logo.logo-light,
html[data-theme="dark"] .preview-brand img.logo-light {
    display: none;
}

html[data-theme="dark"] .brand-logo.logo-dark,
html[data-theme="dark"] .preview-brand img.logo-dark {
    display: block;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    margin-right: auto;
}

.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-subtle);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Controllo Tema */
.theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    color: var(--text);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.theme-btn:hover {
    border-color: var(--primary);
}

.theme-btn-text {
    display: inline;
}

/* Selettore Lingua con bandiere SVG */
.lang-dropdown {
    position: relative;
}

.lang-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.lang-dropdown-btn:hover {
    border-color: var(--primary);
}

.lang-dropdown-btn .flag-icon,
.lang-option .flag-icon {
    margin: 0 !important;
}

.lang-caret {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.lang-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 160px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 6px;
    z-index: 1200;
}

.lang-dropdown-menu.open {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 500;
    white-space: nowrap;
}

.lang-option:hover {
    background: var(--bg-subtle);
    color: var(--text);
}

.lang-option.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
}

/* Pulsanti CTA */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.96rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-sm {
    min-height: 40px;
    padding: 6px 14px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-contrast);
    box-shadow: var(--shadow-sm);
}

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

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
}

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

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.tier-card.is-disabled {
    opacity: 0.72;
}

.tier-card.is-disabled.featured {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-block {
    width: 100%;
}

/* Hamburger Mobile */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    color: var(--text);
    cursor: pointer;
    font-size: 1.25rem;
}

.mobile-drawer {
    display: none;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px 20px;
}

.mobile-drawer.open {
    display: block;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.mobile-nav-list .nav-link {
    display: block;
    padding: 12px 14px;
    font-size: 1rem;
}

.mobile-drawer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ==========================================================================
   MAIN & SEZIONI
   ========================================================================== */
main {
    flex: 1;
}

.section {
    padding: clamp(44px, 6vw, 84px) 0;
}

.section-alt {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 44px;
}

.eyebrow {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

h1 {
    font-size: clamp(2rem, 4.4vw, 3.1rem);
    line-height: 1.14;
    letter-spacing: -0.025em;
    font-weight: 800;
    margin-bottom: 16px;
}

h2 {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 800;
    margin-bottom: 12px;
}

h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.lead {
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    color: var(--text-muted);
}

/* ==========================================================================
   HERO & ANTEPRIMA APP
   ========================================================================== */
.hero {
    padding: clamp(40px, 6vw, 84px) 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 44px;
    align-items: center;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-sublink {
    margin-top: 16px;
    font-size: 0.94rem;
    color: var(--text-muted);
}

.hero-sublink a {
    font-weight: 600;
}

/* Card anteprima dispositivo */
.app-preview-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-lg);
}

.preview-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.preview-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.preview-brand img {
    height: 28px;
    width: auto;
    border-radius: 6px;
}

.preview-pill {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
}

.preview-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.preview-tile {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-tile-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.preview-tile-title {
    font-weight: 700;
    font-size: 0.94rem;
}

.preview-tile-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   GRIGLIE & CARD
   ========================================================================== */
.cards-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cards-grid-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.cards-grid-features > .card {
    flex: 1 1 300px;
    max-width: 360px;
}

.cards-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.cards-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.96rem;
}

/* CTA Band */
.cta-band {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(28px, 4vw, 48px);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cta-band-copy {
    max-width: 620px;
}

/* ==========================================================================
   PAGINA COS'È L'APP
   ========================================================================== */
.feature-detail-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.feature-detail-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 3.5vw, 38px);
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 24px;
    align-items: start;
}

.feature-detail-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
}

.check-list {
    list-style: none;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.check-list li {
    position: relative;
    padding-left: 26px;
    color: var(--text-muted);
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: 800;
}

/* ==========================================================================
   PAGINA SOSTIENICI
   ========================================================================== */
.tier-card {
    position: relative;
    justify-content: space-between;
}

.tier-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.tier-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 8px 0 12px;
}

.tier-card .btn {
    margin-top: 22px;
}

/* ==========================================================================
   MODULI (REGISTRAZIONE & CONTATTI)
   ========================================================================== */
.form-shell {
    max-width: 560px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 28px;
    align-items: start;
}

.form-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 3.5vw, 36px);
    box-shadow: var(--shadow-md);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

.input-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-password-wrap .form-control {
    padding-right: 46px;
}

.pw-toggle-btn {
    position: absolute;
    right: 6px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pw-toggle-btn:hover {
    color: var(--text);
    background: var(--bg-subtle);
}

.form-hint {
    margin-top: 6px;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}

.alert-error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error);
}

.form-footer-note {
    margin-top: 18px;
    text-align: center;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 40px 0 28px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

.footer-title {
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.94rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ==========================================================================
   MEDIA QUERIES (Tablet & Smartphone)
   ========================================================================== */
@media (max-width: 980px) {
    .desktop-nav,
    .header-open-app-btn {
        display: none;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cards-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .theme-btn-text {
        display: none;
    }

    .cards-grid-4,
    .cards-grid-3,
    .cards-grid-2,
    .form-row-2,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .feature-detail-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-detail-icon {
        width: 56px;
        height: 56px;
        font-size: 1.7rem;
    }

    .hero-actions .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
