/*
Theme Name: Coming Soon Catalogo
Theme URI: https://example.com
Author: Digital Consultant
Author URI: https://example.com
Description: Tema Coming Soon professionale con sfondo full-screen, logo, testo personalizzabile e pulsante download catalogo. Completamente personalizzabile via Customizer WordPress.
Version: 1.1.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coming-soon-catalogo
Tags: coming-soon, one-page, full-screen, customizable, portfolio
*/

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: -webkit-fill-available;
}

/*
   SFONDO FULL SCREEN — strategia iOS-safe
   Su iOS Safari position:fixed sui figli del body quando
   il body e' scrollabile causa lo sfondo che scorre.
   Soluzione: sfondo direttamente sul body (scroll, non fixed)
   + overlay tramite body::before con position:fixed.
*/
body {
    font-family: var(--cs-body-font, 'Helvetica Neue', sans-serif);
    color: #fff;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-text-size-adjust: 100%;
    background-color: var(--cs-bg-color, #111111);
    background-image: var(--cs-bg-image, none);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--cs-overlay-color, rgba(0,0,0,0.45));
    z-index: 0;
    pointer-events: none;
}

.cs-background,
.cs-overlay {
    display: none;
}

/* ===========================
   LAYOUT PRINCIPALE
=========================== */
.cs-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: var(--cs-wrapper-padding-v, 80px);
    padding-bottom: calc(var(--cs-wrapper-padding-v, 80px) + 48px);
    padding-left: var(--cs-wrapper-padding-h, 24px);
    padding-right: var(--cs-wrapper-padding-h, 24px);
    text-align: center;
}

/* ===========================
   LOGO
=========================== */
.cs-logo {
    margin-bottom: var(--cs-logo-mb, 28px);
    animation: fadeInDown 0.9s ease both;
    width: 100%;
}

.cs-logo-img-wrap {
    display: block;
    margin: 0 auto;
    max-width: var(--cs-logo-max-width, 220px);
}

.cs-logo-img-wrap img,
.cs-logo-img-wrap svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0 auto;
}

.cs-logo-text {
    font-family: var(--cs-logo-font, 'Georgia', serif);
    font-size: var(--cs-logo-size, 2.8rem);
    font-weight: var(--cs-logo-weight, 700);
    color: var(--cs-logo-color, #ffffff);
    letter-spacing: var(--cs-logo-letter-spacing, 0.08em);
    text-transform: var(--cs-logo-transform, uppercase);
    line-height: var(--cs-logo-line-height, 1.1);
}

/* ===========================
   TITOLO / HEADLINE
=========================== */
.cs-headline {
    font-family: var(--cs-headline-font, 'Georgia', serif);
    font-size: var(--cs-headline-size, 1.5rem);
    font-weight: var(--cs-headline-weight, 300);
    color: var(--cs-headline-color, #ffffff);
    letter-spacing: var(--cs-headline-letter-spacing, 0.15em);
    text-transform: var(--cs-headline-transform, uppercase);
    line-height: var(--cs-headline-line-height, 1.5);
    margin-bottom: var(--cs-headline-mb, 20px);
    max-width: 700px;
    animation: fadeInUp 0.9s ease 0.2s both;
}

/* ===========================
   SOTTOTITOLO / DESCRIZIONE
=========================== */
.cs-subtext {
    font-family: var(--cs-body-font, 'Helvetica Neue', sans-serif);
    font-size: var(--cs-subtext-size, 1rem);
    font-weight: var(--cs-subtext-weight, 300);
    color: var(--cs-subtext-color, rgba(255,255,255,0.80));
    letter-spacing: var(--cs-subtext-letter-spacing, 0.03em);
    text-transform: var(--cs-subtext-transform, none);
    line-height: var(--cs-subtext-line-height, 1.8);
    max-width: 560px;
    margin-bottom: var(--cs-subtext-mb, 44px);
    animation: fadeInUp 0.9s ease 0.4s both;
}

/* ===========================
   DIVISORE DECORATIVO
=========================== */
.cs-divider {
    width: var(--cs-divider-width, 60px);
    height: var(--cs-divider-height, 1px);
    background: var(--cs-accent-color, #c8a96e);
    margin: 0 auto var(--cs-divider-mb, 36px);
    animation: fadeIn 1s ease 0.3s both;
}

/* ===========================
   PULSANTE DOWNLOAD CATALOGO
=========================== */
.cs-btn-wrap {
    animation: fadeInUp 0.9s ease 0.6s both;
    width: 100%;
    display: flex;
    justify-content: center;
}

.cs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: var(--cs-btn-padding-v, 16px) var(--cs-btn-padding-h, 40px);
    font-family: var(--cs-btn-font, 'Helvetica Neue', sans-serif);
    font-size: var(--cs-btn-size, 0.85rem);
    font-weight: var(--cs-btn-weight, 600);
    letter-spacing: var(--cs-btn-letter-spacing, 0.18em);
    line-height: var(--cs-btn-line-height, 1.2);
    text-transform: var(--cs-btn-transform, uppercase);
    text-decoration: none;
    color: var(--cs-btn-text-color, #111111);
    background: var(--cs-btn-bg, #c8a96e);
    border: var(--cs-btn-border-width, 2px) solid var(--cs-btn-border-color, #c8a96e);
    border-radius: var(--cs-btn-radius, 0px);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: var(--cs-btn-full-width, auto);
    max-width: 440px;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
}

.cs-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.12);
    transform: translateX(-110%);
    transition: transform 0.3s ease;
    border-radius: inherit;
}

.cs-btn:hover::before,
.cs-btn:active::before {
    transform: translateX(0);
}

.cs-btn:hover,
.cs-btn:active {
    color: var(--cs-btn-text-color, #111111);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.cs-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ===========================
   COUNTDOWN (opzionale)
=========================== */
.cs-countdown {
    display: flex;
    gap: 24px;
    margin-bottom: 44px;
    animation: fadeInUp 0.9s ease 0.5s both;
    flex-wrap: wrap;
    justify-content: center;
}

.cs-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
}

.cs-countdown-number {
    font-family: var(--cs-headline-font, 'Georgia', serif);
    font-size: 2.4rem;
    font-weight: 300;
    color: #ffffff;
    line-height: 1;
}

.cs-countdown-label {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-top: 6px;
}

/* ===========================
   SOCIAL LINKS
=========================== */
.cs-social {
    display: flex;
    gap: 16px;
    margin-top: 48px;
    animation: fadeIn 1s ease 0.8s both;
    flex-wrap: wrap;
    justify-content: center;
}

.cs-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: var(--cs-social-radius, 0px);
    -webkit-tap-highlight-color: transparent;
}

.cs-social a:hover,
.cs-social a:active {
    border-color: var(--cs-accent-color, #c8a96e);
    color: var(--cs-accent-color, #c8a96e);
}

.cs-social a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ===========================
   FOOTER
=========================== */
.cs-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
    text-align: center;
    z-index: 3;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.4);
    animation: fadeIn 1.2s ease 1s both;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
    pointer-events: none;
}

.cs-footer a {
    pointer-events: all;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.cs-footer a:hover {
    color: var(--cs-accent-color, #c8a96e);
}

/* ===========================
   ANIMAZIONI
=========================== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===========================
   TABLET 768px
=========================== */
@media (max-width: 768px) {
    .cs-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ===========================
   MOBILE 600px
=========================== */
@media (max-width: 600px) {
    .cs-logo-img-wrap {
        max-width: min(var(--cs-logo-max-width, 220px), 70vw);
    }
    .cs-logo-text {
        font-size: clamp(1.4rem, 8vw, var(--cs-logo-size, 2.8rem));
    }
    .cs-headline {
        font-size: clamp(0.95rem, 5.5vw, var(--cs-headline-size, 1.5rem));
        letter-spacing: clamp(0.04em, 1.2vw, var(--cs-headline-letter-spacing, 0.15em));
    }
    .cs-subtext {
        font-size: clamp(0.85rem, 3.8vw, var(--cs-subtext-size, 1rem));
    }
    .cs-btn {
        font-size: clamp(0.72rem, 3.2vw, var(--cs-btn-size, 0.85rem));
        min-width: min(260px, 82vw);
    }
    .cs-countdown { gap: 14px; }
    .cs-countdown-number { font-size: 1.8rem; }
    .cs-social { margin-top: 32px; gap: 12px; }
}

/* ===========================
   SMALL 360px
=========================== */
@media (max-width: 360px) {
    .cs-headline { font-size: clamp(0.88rem, 4.8vw, 1rem); letter-spacing: 0.06em; }
    .cs-subtext { font-size: 0.82rem; }
}

/* ===========================
   iOS SAFE AREAS (notch / home bar)
=========================== */
@supports (padding: env(safe-area-inset-left)) {
    .cs-wrapper {
        padding-left: max(var(--cs-wrapper-padding-h, 24px), env(safe-area-inset-left));
        padding-right: max(var(--cs-wrapper-padding-h, 24px), env(safe-area-inset-right));
    }
}
