/*
Theme Name: UPGRADE Communication
Theme URI: https://upgradecommunication.it
Author: UPGRADE Communication
Author URI: https://upgradecommunication.it
Description: Tema one-page personalizzato per UPGRADE Communication — Communication Trainers. Design minimale, elegante, con sfondo bianco e accento rosso. Ottimizzato per WordPress 6.9.
Version: 1.0.0
Tested up to: 6.9
Requires at least: 6.0
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: upgrade-comm
Tags: one-page, custom-logo, translation-ready
*/

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

:root {
    --white: #FFFFFF;
    --off-white: #FAFAFA;
    --light-gray: #F2F2F2;
    --mid-gray: #B0B0B0;
    --dark-gray: #3A3A3A;
    --black: #1A1A1A;
    --accent: #bb011b;
    --accent-hover: #9a0016;
    --accent-light: rgba(187, 1, 27, 0.07);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: var(--white);
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ============================================
   UTILITY
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.section-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.section-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    font-weight: 300;
    color: var(--dark-gray);
    line-height: 1.8;
    max-width: 620px;
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.5s var(--ease-out);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 0;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.logo svg,
.logo img {
    height: 28px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dark-gray);
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease-out);
}

.nav-links a:hover { color: var(--black); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    padding: 0.6rem 1.6rem !important;
    border: 1px solid var(--accent) !important;
    color: var(--accent) !important;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.4s var(--ease-out);
}

.nav-cta:hover {
    background: var(--accent) !important;
    color: var(--white) !important;
}

.nav-cta::after { display: none !important; }

/* Mobile menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 1100;
    background: none;
    border: none;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--black);
    transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

@media (max-width: 900px) {
    .menu-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.5s var(--ease-out);
        padding: 2rem;
    }
    .nav-links.open { right: 0; }
    .nav-links a { font-size: 1.1rem; }
    .nav-cta { text-align: center; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 8rem 0 6rem;
}

/* Animated grid background */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* Floating orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.06;
    animation: orbFloat 12s ease-in-out infinite;
    pointer-events: none;
}
.hero-orb-1 {
    width: 500px; height: 500px;
    background: var(--accent);
    top: -10%; right: -5%;
    animation-delay: 0s;
}
.hero-orb-2 {
    width: 350px; height: 350px;
    background: #000;
    bottom: -5%; left: -5%;
    animation-delay: -4s;
}
.hero-orb-3 {
    width: 250px; height: 250px;
    background: var(--accent);
    top: 40%; left: 30%;
    animation-delay: -8s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(187, 1, 27, 0.25);
    padding: 0.5rem 1.5rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 0.3s forwards;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 7vw, 7.5rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    overflow: hidden;
}

.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(100%);
    animation: slideUp 1.2s var(--ease-out) forwards;
}
.hero-title .line:nth-child(1) { animation-delay: 0.5s; }
.hero-title .line:nth-child(2) { animation-delay: 0.7s; }
.hero-title .line:nth-child(3) { animation-delay: 0.9s; }

.hero-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}

@keyframes slideUp {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
    to { opacity: 1; }
}

.hero-sub {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    font-weight: 300;
    color: var(--dark-gray);
    max-width: 540px;
    margin: 0 auto 3rem;
    line-height: 1.8;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 1.2s forwards;
}

.hero-ctas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 1.5s forwards;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(187, 1, 27, 0.2);
    color: var(--white);
}
.btn-primary .arrow { transition: transform 0.3s; }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--black);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid var(--black);
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
}
.btn-secondary:hover { background: var(--black); color: var(--white); }

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 2s forwards;
    z-index: 2;
}
.scroll-indicator span {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mid-gray);
}
.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--mid-gray);
    position: relative;
    overflow: hidden;
}
.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}

/* Mobile hero adjustments */
@media (max-width: 768px) {
    .hero {
        padding: 7rem 0 8rem;
        min-height: 100vh;
        min-height: 100dvh;
    }
    .hero-badge { margin-bottom: 2rem; }
    .hero-sub { margin-bottom: 2.5rem; }
    .hero-ctas { gap: 1rem; }
    .btn-primary,
    .btn-secondary {
        padding: 0.9rem 2rem;
        font-size: 0.72rem;
    }
    .scroll-indicator { bottom: 1.5rem; }
}

@media (max-width: 480px) {
    .hero-ctas {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   MARQUEE STRIP
   ============================================ */
.marquee-strip {
    padding: 1.5rem 0;
    border-top: 1px solid var(--light-gray);
    border-bottom: 1px solid var(--light-gray);
    overflow: hidden;
    white-space: nowrap;
}

.marquee-track {
    display: flex;
    animation: marquee 30s linear infinite;
}

.marquee-item {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mid-gray);
    padding: 0 2rem;
    flex-shrink: 0;
}

.marquee-item .dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 2rem;
    vertical-align: middle;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    padding: clamp(5rem, 10vw, 10rem) 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
}

.about-left .section-title {
    margin-bottom: 2rem;
}

.about-right {
    padding-top: 1rem;
}

.about-text {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.9;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

.about-text strong {
    font-weight: 500;
    color: var(--black);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--light-gray);
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--mid-gray);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .about-stats { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

@media (max-width: 480px) {
    .about-stats { grid-template-columns: 1fr; text-align: center; }
}

/* ============================================
   AREAS / SERVICES SECTION
   ============================================ */
.areas {
    padding: clamp(5rem, 10vw, 10rem) 0;
    background: var(--off-white);
}

.areas-header {
    text-align: center;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.areas-header .section-subtitle {
    margin: 0 auto;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--light-gray);
    border: 1px solid var(--light-gray);
}

.area-card {
    background: var(--white);
    padding: clamp(1.8rem, 3vw, 3rem);
    position: relative;
    transition: all 0.5s var(--ease-out);
    cursor: default;
}

.area-card:hover {
    background: var(--off-white);
}

.area-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.5s var(--ease-out);
}

.area-card:hover::before { width: 100%; }

.area-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--light-gray);
    line-height: 1;
    margin-bottom: 1.5rem;
    transition: color 0.5s;
}

.area-card:hover .area-number { color: var(--accent); }

.area-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.area-tagline {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 300;
    font-style: italic;
    color: var(--accent);
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.area-desc {
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--dark-gray);
    line-height: 1.7;
}

@media (max-width: 1024px) {
    .areas-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .areas-grid { grid-template-columns: 1fr; }
}

/* ============================================
   PLANS / PRICING
   ============================================ */
.plans {
    padding: clamp(5rem, 10vw, 10rem) 0;
}

.plans-header {
    text-align: center;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.plans-header .section-subtitle {
    margin: 0 auto;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.plan-card {
    border: 1px solid var(--light-gray);
    padding: clamp(1.8rem, 3vw, 2.5rem);
    position: relative;
    transition: all 0.5s var(--ease-out);
}

.plan-card:hover {
    border-color: var(--black);
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.06);
}

.plan-card.featured {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--white);
}

.plan-card.featured:hover {
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(187, 1, 27, 0.15);
}

.plan-card.featured .plan-target,
.plan-card.featured .plan-feature {
    color: rgba(255,255,255,0.75);
}

.plan-card.featured .plan-divider {
    background: rgba(255,255,255,0.2);
}

.plan-badge {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mid-gray);
    margin-bottom: 2rem;
}

.plan-card.featured .plan-badge {
    color: rgba(255,255,255,0.55);
}

.plan-name {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 2.5vw, 2.2rem);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.plan-target {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--dark-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.plan-divider {
    width: 100%;
    height: 1px;
    background: var(--light-gray);
    margin: 1.5rem 0;
}

.plan-features {
    list-style: none;
}

.plan-feature {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--dark-gray);
    padding: 0.6rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    line-height: 1.5;
}

.plan-feature .check {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

.plan-card.featured .check path { stroke: rgba(255,255,255,0.75); }

.plan-cta {
    display: block;
    text-align: center;
    padding: 0.9rem;
    margin-top: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid currentColor;
    transition: all 0.4s var(--ease-out);
}

.plan-card:not(.featured) .plan-cta:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.plan-card.featured .plan-cta {
    background: var(--white);
    color: var(--accent);
    border-color: var(--white);
}

.plan-card.featured .plan-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    .plans-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .plans-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}

/* ============================================
   CTA BAND
   ============================================ */
.cta-band {
    background: var(--black);
    color: var(--white);
    padding: clamp(4rem, 8vw, 7rem) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-band .section-title {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-band .section-title em {
    color: var(--accent);
}

.cta-band .section-subtitle {
    color: rgba(255,255,255,0.6);
    margin: 0 auto 2.5rem;
}

.cta-band .btn-primary {
    background: var(--accent);
    color: var(--white);
}

.cta-band .btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 10px 40px rgba(187, 1, 27, 0.3);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    padding: clamp(5rem, 10vw, 10rem) 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
}

.contact-item {
    margin-bottom: 2.5rem;
}

.contact-item-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mid-gray);
    margin-bottom: 0.6rem;
}

.contact-item-value {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    font-weight: 400;
}

.contact-item-value a {
    position: relative;
    transition: color 0.3s;
}

.contact-item-value a:hover { color: var(--accent); }

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    border-top: 1px solid var(--light-gray);
    padding: 3rem 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--mid-gray);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.75rem;
    color: var(--mid-gray);
    transition: color 0.3s;
}

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

.footer-social {
    display: flex;
    gap: 1.2rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.footer-social a:hover {
    border-color: var(--accent);
    background: var(--accent);
}

.footer-social a:hover svg { fill: var(--white); }
.footer-social svg { width: 14px; height: 14px; fill: var(--dark-gray); transition: fill 0.3s; }

@media (max-width: 600px) {
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* ============================================
   CURSOR FOLLOWER (desktop only)
   ============================================ */
.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.15s ease;
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .cursor-dot { display: block; }
}

/* ============================================
   WP ADMIN BAR COMPAT
   ============================================ */
body.admin-bar .navbar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .navbar {
        top: 46px;
    }
}
