
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Montserrat:wght@600;700&family=Roboto:wght@300;400;500&display=swap');

:root {
    --bg-start: #f4f7f5;
    --bg-end: #eef6f2;
    --brand-1: #07332f; /* deep green */
    --brand-2: #2fa473; /* emerald accent */
    --accent-gold: #bfa46a; /* luxury gold */
    --muted: #6b7280;
    --paper: #ffffff;
    --glass: rgba(255,255,255,0.6);
    --border-radius: 18px;
    --card-radius: 14px;
    --shadow-sm: 0 8px 26px rgba(7,51,47,0.06);
    --shadow-md: 0 26px 60px rgba(7,51,47,0.10);
    --transition: 0.45s cubic-bezier(.2,.9,.2,1);
    --ease: cubic-bezier(.2,.9,.2,1);
    --max-width: 1200px;
    --dark-color: #06302b;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
    color: #062826;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Elegant serif for headings */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    padding: 4rem 6%;
    max-width: var(--max-width);
    margin: 0 auto;
    align-items: flex-start;
}

header {
    position: sticky;
    top: 14px;
    z-index: 1200;
    padding: 1rem 6%;
}

header nav {
    background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.54));
    backdrop-filter: blur(6px);
    padding: 0.7rem 1rem;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--accent-gold);
    font-weight: 700;
    letter-spacing: 0.6px;
}

.cta-button-nav {
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
    color: white;
    padding: 0.5rem 1.05rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 8px 26px rgba(47,164,115,0.08);
    transition: transform var(--transition), box-shadow var(--transition);
}

.cta-button-nav:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.hero {
    background: linear-gradient(180deg, rgba(6,40,34,0.02), rgba(8,44,38,0.01));
    padding: 6.5rem 1rem 5.5rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1501004318641-b39e6451bec6?auto=format&fit=crop&w=1350&q=60');
    background-size: cover;
    background-position: center;
    opacity: 0.10;
    filter: saturate(0.7) contrast(0.9) blur(2px);
    pointer-events: none;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 4.6vw, 3.8rem);
    margin: 0 0 0.6rem 0;
    color: var(--brand-1);
    font-weight: 700;
    letter-spacing: 0.2px;
}

.hero-content p {
    font-size: 1.05rem;
    max-width: 760px;
    margin: 0 auto 1.75rem auto;
    color: var(--muted);
    opacity: 0.95;
}

.cta-button {
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
    color: white;
    padding: 0.9rem 1.6rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.02rem;
    display: inline-block;
    box-shadow: 0 12px 36px rgba(7,51,47,0.10);
    border: 1px solid rgba(191,164,106,0.06);
    transition: transform var(--transition), box-shadow var(--transition), background 0.3s ease;
}
.cta-button:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.cta-button::before{ content: ''; position: absolute; inset: 0; left: -30%; width: 30%; background: linear-gradient(120deg, rgba(255,255,255,0.25), rgba(255,255,255,0.02)); transform: skewX(-20deg) translateX(0); transition: transform 0.9s var(--ease); pointer-events: none }
.cta-button:hover::before{ transform: translateX(220%); }

.steps { flex: 1.8; }

.steps-header { text-align: left; margin-bottom: 2rem; }
.steps-header h2 { font-family: 'Montserrat', sans-serif; font-size: 1.6rem; color: #08303b; margin:0 0 0.5rem 0 }
.steps-header p { color: var(--muted); margin-top: 0.25rem }

.step-card{
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,252,250,0.98));
    padding: 1.35rem 1.6rem;
    border-radius: calc(var(--card-radius) - 2px);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    border-left: 6px solid rgba(191,164,106,0.04);
    margin-bottom: 1rem;
}
.step-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-md); border-left-color: var(--brand-2); }
.step-card.active{ border-left-color: var(--accent-gold); box-shadow: 0 22px 46px rgba(7,51,47,0.08); transform: translateY(-6px) scale(1.01); }

.step-card h2{ margin-top:0; color: var(--brand-1); font-family: 'Montserrat', sans-serif }
.step-card i{ margin-right:0.75rem; color: var(--brand-1) }

.visual-demo{
    flex: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(245,250,247,0.95));
    padding: 2.25rem;
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 80px;
    max-height: 680px;
    border: 1px solid rgba(191,164,106,0.06);
}
.visual-demo h3{ margin: 0 0 1rem 0; color:var(--brand-1); font-family: 'Montserrat', sans-serif; font-weight:600 }


.animation-stage {
    position: relative;
    width: 100%;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#hydroponic-tower{
    width: 240px;
    height: 420px;
    background: linear-gradient(180deg,#fcfffd, #f7fffc);
    border-radius: 18px;
    display:flex; flex-direction:column; justify-content:flex-end;
    position: relative; padding:18px; box-sizing:border-box;
    box-shadow: 0 22px 48px rgba(8,48,44,0.06), inset 0 2px 10px rgba(0,0,0,0.04);
    z-index: 10; overflow: hidden; border: 1px solid rgba(16,118,110,0.06);
}

#hydroponic-tower::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30%;
    width: 40%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.6), rgba(255,255,255,0));
    transform: skewX(-15deg);
    pointer-events: none;
}

.tower-details {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 50px;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}

.tower-level {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.slot{
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #dfeff6;
    box-shadow: inset 0 6px 10px rgba(0,0,0,0.04);
    transition: transform 0.55s var(--ease), background 0.45s var(--ease);
}

.slot.pod-inserted{
    background: linear-gradient(180deg,#8d6e63,#795548);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16,118,110,0.06);
}

.slot.plant-growing{
    background-image: url('https://api.iconify.design/twemoji/seedling.svg');
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
    animation: growPlant 700ms var(--ease);
    transform: scale(1.03);
}

@keyframes growPlant{ from{ transform: scale(0.2) rotate(-20deg); opacity:0 } to{ transform: scale(1) rotate(0); opacity:1 } }

.tower-base{ height:72px; background: linear-gradient(180deg,#36494b,#4f6b6a); border-radius:0 0 14px 14px; position:relative; overflow:hidden; border-top:1px solid rgba(255,255,255,0.06); }

.led-light-container{ position:absolute; bottom:14px; left:50%; transform:translateX(-50%); width:54px; height:22px; background: rgba(255,255,255,0.06); border-radius:10px; display:flex; justify-content:center; align-items:center; z-index:15 }
.led-light{ width:12px; height:12px; border-radius:50%; background:#d1eaea; transition: all 0.4s; }
.led-light.on{ background:var(--brand-2); box-shadow: 0 0 18px 6px rgba(22,160,134,0.15); animation: pulseLight 1.8s infinite ease-in-out }

@keyframes pulseLight{ 0%,100%{ opacity:0.8 } 50%{ opacity:1 } }

.water-level{ position:absolute; bottom:0; left:0; width:100%; background: linear-gradient(180deg,#4fc3f7,#81d4fa); border-radius:0 0 16px 16px; transition: height 1.2s var(--ease) }

#notification{ position:absolute; bottom:22px; left:50%; transform:translateX(-50%); width:86%; padding:10px 12px; background: linear-gradient(90deg, rgba(1,27,25,0.9), rgba(16,118,110,0.95)); color:white; border-radius:12px; font-size:0.9rem; text-align:center; z-index:50; opacity:0; transform: translate(-50%, 20px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease) }
#notification.visible{ opacity:1; transform: translate(-50%, 0) }

#qr-code-container{ width:100px; height:100px; background: linear-gradient(180deg,#fff,#f6fffb); border-radius:14px; box-shadow: 0 10px 26px rgba(8,48,44,0.06); position:absolute; top:230px; left:66%; z-index:20; display:flex; justify-content:center; align-items:center; transition: transform 0.45s var(--ease), opacity 0.45s var(--ease); transform: translate(-50%,-50%) scale(0.92); opacity:0 }
#qr-code-container.visible{ transform: translate(-50%,-50%) scale(1); opacity:1 }

.qr-code-inner{ width:80%; height:80%; background-image: url('https://api.iconify.design/mdi/qrcode-scan.svg'); background-size:100% }

#phone-container {
    width:130px;
    height:240px;
    background:linear-gradient(180deg,#0b1414,#0f1a1a);
    border-radius:26px;
    position:absolute;
    left:64%;
    top:140px;
    transform: translate(-50%,0) scale(0.78);
    z-index:30;
    transition: transform 0.55s var(--ease), opacity 0.55s var(--ease);
    box-shadow: 0 18px 40px rgba(8,48,44,0.12);
    opacity:0;
    pointer-events:none;
    border: 8px solid #222; /* bordo scuro per simulare la cornice del telefono */
}
#phone-container.scanning{ top:185px; transform: translate(-50%,0) scale(1); opacity:1; pointer-events:auto }
#phone-container.visible{ opacity:1 }

.phone-camera{ position:absolute; top:15px; left:50%; transform:translateX(-50%); width:15px; height:15px; background:#000; border-radius:50%; border:2px solid #444 }

.phone-screen{ width:100%; height:100%; background: linear-gradient(180deg,#e6f7f5,#f7fffc); border-radius:20px; overflow:hidden; position:relative }

.scan-line{ width:100%; height:5px; background:linear-gradient(90deg,var(--brand-2),var(--brand-1)); box-shadow:0 0 18px rgba(22,160,134,0.12); position:absolute; top:-10px; opacity:0 }
.scan-line.active{ opacity:1; animation: scan 1.8s cubic-bezier(.65,.05,.36,1) 0.25s }

@keyframes scan{ from{ top:0 } to{ top:100% } }

.final-cta{ text-align:center; background: linear-gradient(90deg, var(--brand-1), rgba(11,46,42,0.92)); color:white; padding:4.25rem 1rem 3.25rem; border-radius: 0 0 18px 18px; box-shadow: 0 -18px 48px rgba(7,51,47,0.10) }
.final-cta h2{ font-family:'Playfair Display',serif; font-size:clamp(1.6rem,3.6vw,2.4rem); margin:0 0 0.8rem; color: var(--accent-gold) }
.final-cta p{ margin:0 0 1.2rem; opacity:0.92 }
.final-cta .cta-button{ font-size:1.05rem; padding:0.9rem 1.8rem; border-radius:10px; background:var(--accent-gold); color:var(--brand-1); font-weight:800; box-shadow: 0 12px 36px rgba(11,46,42,0.12); border: 1px solid rgba(11,46,42,0.06) }
.final-cta .cta-button:hover{ transform: translateY(-6px); filter:brightness(0.98) }

footer{ text-align:center; padding:2rem 0; background:transparent; color:var(--muted) }

/* Reveal on scroll animations and micro-interactions */
.reveal,
[data-animate] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s cubic-bezier(.2,.9,.2,1), transform 0.7s cubic-bezier(.2,.9,.2,1);
    will-change: opacity, transform;
}
.reveal.visible,
[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-button {
    position: relative;
    overflow: hidden;
}
.cta-button::after {
    content: '';
    position: absolute;
    left: -40%;
    top: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.18), rgba(255,255,255,0.02));
    transform: skewX(-20deg) translateX(0);
    transition: transform 0.6s ease;
}
.cta-button:hover::after {
    transform: translateX(250%);
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.nav-link {
    color: var(--dark-color);
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    transition: background 0.25s, color 0.25s, transform 0.25s;
}
.nav-link:hover {
    background: rgba(78, 205, 196, 0.12);
    color: var(--brand-1);
    transform: translateY(-2px);
}

/* subtle floating for the tower to make visual more lively */
#hydroponic-tower {
    animation: floatTower 6s ease-in-out infinite;
}
@keyframes floatTower {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

/* Luce rossa per la torre */
.led-light.red {
    background: #ff3b3b !important;
    box-shadow: 0 0 18px 6px #ff3b3b99 !important;
    animation: pulseRed 1.2s infinite alternate;
}
@keyframes pulseRed {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .container {
        flex-direction: column;
    }
    .visual-demo {
        position: relative;
        top: 0;
        height: auto;
    }
    .nav-links { gap: 0.5rem; }
    .nav-link { font-size: 0.95rem; }
}
