@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- DESIGN SYSTEM & TOKENS --- */
:root {
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f4f5f7; /* Clean Silk Gray */
  --color-text-primary: #0b1325; /* Midnight Blue */
  --color-text-secondary: #6c757d;
  --color-border: #e9ecef;
  --color-accent: #0b1325;
  --color-accent-hover: #1c2638;
  --color-gold: #c5a880; /* Champagne Gold */
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  
  --shadow-light: 0 30px 60px rgba(11, 19, 37, 0.04);
  --shadow-hover: 0 45px 90px rgba(11, 19, 37, 0.08);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--color-gold); /* Champagne Gold Scrollbar */
}
::-webkit-scrollbar-thumb:hover {
  background: #b0936d;
}

/* Custom Selection styling */
::selection {
  background-color: var(--color-text-primary);
  color: var(--color-bg-primary);
}

/* Background blueprint grid pattern restored for development theme */
.blueprint-grid {
  background-image: 
    linear-gradient(rgba(11, 19, 37, 0.020) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 19, 37, 0.020) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center top;
  background-color: var(--color-bg-primary);
}

/* --- RESET & BASE STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 strong, h2 strong, h3 strong {
  font-weight: 800;
}

p {
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* --- UTILITIES & LAYOUT --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-margin {
  padding: 10rem 0;
}

@media (max-width: 768px) {
  .section-margin {
    padding: 6rem 0;
  }
}

.text-center {
  text-align: center;
}

/* --- HEADER & NAVIGATION --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-fast);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

header.scrolled {
  height: 70px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

header.scrolled .header-container {
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--color-text-primary);
}

.logo-icon {
  color: var(--color-text-primary);
  transition: var(--transition-smooth);
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  font-family: var(--font-family);
}

.logo-link:hover .logo-icon {
  transform: rotate(45deg);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

nav a {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: var(--transition-fast);
  position: relative;
  padding: 0.5rem 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-text-primary);
  transition: var(--transition-smooth);
}

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

nav a:hover::after {
  width: 100%;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background-color: var(--color-text-primary);
  margin: 6px 0;
  transition: var(--transition-fast);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  
  nav {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--color-bg-primary);
    border-bottom: 1px solid var(--color-border);
    padding: 2rem;
    display: none;
    box-shadow: var(--shadow-hover);
  }
  
  nav.active {
    display: block;
  }
  
  nav ul {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  
  header.scrolled nav {
    top: 70px;
  }
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 1rem 2.2rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: 0;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-bg-primary);
  border: 1px solid var(--color-accent);
}

.btn-primary:hover {
  background-color: var(--color-bg-primary);
  color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-text-primary);
  background-color: var(--color-text-primary);
  color: var(--color-bg-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* --- SECTION GENERAL --- */
.section-title-wrap {
  margin-bottom: 5rem;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  color: var(--color-text-primary);
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 120px 0;
  background-color: var(--color-bg-primary);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  max-width: 700px;
}

.hero-tagline {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  display: block;
}

.hero h1 {
  font-size: 3.8rem;
  line-height: 1.15;
  margin-bottom: 2.5rem;
}

.hero h1 span {
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.hero-desc {
  font-size: 1.15rem;
  margin-bottom: 3.5rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
}

/* Floating wireframe background graphic representing territorial planning */
.hero-graphic {
  position: relative;
  height: 400px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Hero Graphic Brand Logo Hover Micro-interactions */
.hero-geometry {
  cursor: pointer;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-geometry:hover {
  transform: scale(1.03);
}

.hero-geo-circle, 
.hero-geo-star, 
.hero-geo-ring-left, 
.hero-geo-ring-right, 
.hero-geo-line {
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: 50px 50px;
}

.hero-geo-ring-left {
  transform-origin: 44px 50px;
}

.hero-geo-ring-right {
  transform-origin: 56px 50px;
}

/* Concentric outer layout circle spins slowly on hover */
.hero-geometry:hover .hero-geo-circle {
  transform: rotate(180deg);
  opacity: 0.65;
}

/* Centered champagne gold compass star spins 90 degrees and expands slightly */
.hero-geometry:hover .hero-geo-star {
  transform: rotate(90deg) scale(1.18);
  filter: drop-shadow(0 0 5px rgba(197, 168, 128, 0.35));
}

/* Intersecting rings slide apart slightly on hover, returning smoothly on mouseleave */
.hero-geometry:hover .hero-geo-ring-left {
  transform: translateX(-3.5px);
}

.hero-geometry:hover .hero-geo-ring-right {
  transform: translateX(3.5px);
}

/* Background coordinate lines expand slightly */
.hero-geometry:hover .hero-geo-line {
  transform: scale(1.15);
  opacity: 0.35;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-graphic {
    display: none;
  }
  .hero h1 {
    font-size: 2.8rem;
  }
}

/* --- IL POSIZIONAMENTO --- */
.posizionamento {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.posizionamento-content {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 5rem;
  align-items: start;
}

.posizionamento-legacy {
  border-left: 2px solid var(--color-text-primary);
  padding-left: 2rem;
}

.posizionamento-legacy h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.posizionamento-text {
  font-size: 1.1rem;
  font-weight: 300;
}

.posizionamento-text p {
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .posizionamento-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* --- I PILASTRI (CARDS) --- */
.pilastri-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.pilastro-card {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  padding: 3.5rem 2.5rem;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-light);
  display: flex;
  flex-direction: column;
}

.pilastro-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(33, 37, 41, 0.15);
}

.pilastro-num {
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--color-text-primary);
  margin-bottom: 2rem;
  display: block;
}

.pilastro-card h3 {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: var(--color-text-primary);
}

.pilastro-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 992px) {
  .pilastri-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- OPPORTUNITA DI INVESTIMENTO --- */
/* --- OPPORTUNITA DI INVESTIMENTO --- */
.operazioni {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.operazioni-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

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

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

.operazione-card {
  background-color: var(--color-bg-primary);
  border: none !important;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.operazione-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: var(--shadow-hover) !important;
}

.operazione-visual {
  background-color: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  height: 180px;
  border-bottom: 1px solid var(--color-border);
}

.blueprint-sketch {
  width: 80%;
  height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
  transition: var(--transition-smooth);
}

.operazione-card:hover .blueprint-sketch {
  transform: scale(1.05);
  opacity: 0.65;
}

.blueprint-sketch svg {
  width: 100%;
  height: 100%;
  color: var(--color-text-primary);
}

.operazione-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background-color: var(--color-gold);
  color: var(--color-text-primary);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
  padding: 0.4rem 0.8rem;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(11, 19, 37, 0.05);
}

.operazione-badge.sviluppato {
  background-color: var(--color-text-primary);
  color: var(--color-gold);
  border: none !important;
}

.operazione-content {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.operazione-content h3 {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
  color: var(--color-text-primary);
}

.operazione-desc {
  font-size: 0.9rem;
  margin-bottom: 2rem;
  flex-grow: 1;
  line-height: 1.6;
}

.operazione-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 1.2rem 0;
}

.metric-item span {
  display: block;
}

.metric-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 0.3rem;
}

.metric-val {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

.progress-bar-wrap {
  margin-bottom: 2rem;
}

.progress-label-wrap {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.progress-label {
  color: var(--color-text-secondary);
}

.progress-pct {
  font-weight: 600;
  color: var(--color-text-primary);
}

.progress-bar-track {
  height: 2px;
  background-color: var(--color-border);
  width: 100%;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--color-text-primary);
  width: 0; /* Animated dynamically with JS */
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}


/* --- CONTACT FORM --- */
.contatto-content {
  max-width: 650px;
  margin: 0 auto;
}

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

@media (max-width: 600px) {
  .form-group-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.form-group {
  margin-bottom: 2.5rem;
  position: relative;
}

.form-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--color-border);
  background-color: transparent;
  padding: 0.8rem 0;
  font-family: var(--font-family);
  font-size: 1rem;
  color: var(--color-text-primary);
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-bottom-color: var(--color-text-primary);
}

.form-label {
  position: absolute;
  top: 0.8rem;
  left: 0;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  pointer-events: none;
  transition: var(--transition-fast);
}

/* Float label animation rules */
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
  top: -1.2rem;
  font-size: 0.75rem;
  color: var(--color-text-primary);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* Textarea customization */
textarea.form-input {
  min-height: 100px;
  resize: vertical;
}

/* Select element styling */
select.form-input {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: '↓';
  position: absolute;
  right: 0;
  top: 0.8rem;
  color: var(--color-text-secondary);
  pointer-events: none;
}

/* --- FOOTER --- */
footer {
  border-top: 1px solid var(--color-border);
  padding: 4rem 0;
  background-color: var(--color-bg-primary);
}

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

.footer-logo img {
  height: 30px;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
}

/* --- SCROLL REVEAL / SCROLL ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- INTERACTIVE CUSTOM CURSOR & GLASSMORPHISM UPGRADE --- */

/* Disattivazione del cursore nativo su desktop per far spazio a quello personalizzato */
@media (min-width: 993px) {
    body, a, button, select, input, textarea, .antigravity-card {
        cursor: none !important;
    }
    
    .custom-cursor {
        width: 8px;
        height: 8px;
        background-color: #000000;
        border-radius: 50%;
        position: fixed;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 9999;
        transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                    height 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                    background-color 0.25s ease, 
                    border 0.25s ease;
    }

    /* Stato espanso del cursore quando transita su elementi interattivi */
    .custom-cursor.hovered {
        width: 44px;
        height: 44px;
        background-color: rgba(0, 0, 0, 0.03);
        border: 1px solid #000000;
    }
}

/* Upgrade delle Card con effetto Vetro Fluttuante (Glassmorphism) */
.antigravity-card {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none !important;
    box-shadow: var(--shadow-light) !important;
}

.antigravity-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--shadow-hover) !important;
}

/* Dettaglio Numerico ad Alto Contrasto */
.card-num {
    color: var(--color-text-primary) !important;
    font-weight: 600;
    font-size: 15px;
}

/* Floating background vector shapes */
.section-margin {
  position: relative;
  overflow: hidden;
}

.floating-bg-geometry {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.geo-shape {
  position: absolute;
  stroke: var(--color-text-primary);
  stroke-width: 0.5;
  fill: none;
  opacity: 0.035; /* Faint blueprint outlines */
}

.geo-shape.gold {
  stroke: var(--color-gold);
  opacity: 0.12; /* Golden highlights */
}

/* --- RESPONSIVE OPTIMIZATIONS (MOBILE) --- */

/* Hide hero graphic / star on mobile */
@media (max-width: 992px) {
  .hero-graphic {
    display: none !important;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
}

/* Expandable operations list styling for mobile scroll flow */
@media (max-width: 768px) {
  .operazione-card.mobile-hidden {
    display: none !important;
  }
  .operazione-card.mobile-hidden.expanded {
    display: flex !important;
    animation: reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .expand-trigger-wrap {
    display: block;
    margin-top: 3.5rem;
  }
}

@media (min-width: 769px) {
  .expand-trigger-wrap {
    display: none !important;
  }
}

/* Mobile adjustments for small screens (<576px) */
@media (max-width: 576px) {
  .hero h1 {
    font-size: 2.1rem !important;
    line-height: 1.25 !important;
  }
  .hero h1 span {
    font-size: 1.3rem !important;
  }
  .hero-desc {
    font-size: 0.95rem !important;
    margin-bottom: 2.5rem !important;
    padding: 0 0.5rem;
  }
  .container {
    padding: 0 1.25rem !important;
  }
}

