/* ==========================================================================
   FLESSIBILE ZIO - Modern Tech-Wool Executive Suits
   Design System & Master Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Brand Palette */
  --primary-navy: #1E3A8A;       /* Navy Flex */
  --primary-navy-dark: #0F172A;  /* Deep Executive Navy */
  --accent-cyan: #06B6D4;        /* Cyan Glow */
  --accent-cyan-light: #67E8F9;  /* Cyan Light */
  --text-slate: #94A3B8;         /* Titanium Slate */
  --text-muted: #64748B;         /* Muted Slate */
  --text-dark: #0F172A;          /* Charcoal Black */
  --text-light: #F8FAFC;         /* Snow White */
  --bg-dark: #020617;            /* Space Obsidian */
  --bg-card-dark: rgba(15, 23, 42, 0.75);
  --bg-light: #F8FAFC;           /* Off-white background */
  --bg-card-light: #FFFFFF;
  --border-glass: rgba(148, 163, 184, 0.15);
  --border-cyan-glow: rgba(6, 182, 212, 0.4);

  /* Typography */
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Roboto Mono', monospace;

  /* Elevation & Shadows */
  --shadow-subtle: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  --shadow-glass: 0 8px 32px 0 rgba(2, 6, 23, 0.37);
  --shadow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
  
  /* Radii & Transitions */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-heading);
  background-color: var(--bg-dark);
  color: var(--text-slate);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

img, svg {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

/* --------------------------------------------------------------------------
   3. Typography & Utility Classes
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-light);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.mono-text {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.text-cyan {
  color: var(--accent-cyan);
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, var(--accent-cyan-light) 50%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-pill);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.section-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

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

.section-padding {
  padding: 100px 0;
}

/* Glassmorphism Card Utility */
.glass-panel {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glass);
}

.glass-panel-hover {
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.glass-panel-hover:hover {
  transform: translateY(-6px);
  border-color: var(--border-cyan-glow);
  box-shadow: var(--shadow-cyan);
}

/* --------------------------------------------------------------------------
   4. Buttons & Interactive Controls
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #172554 100%);
  color: var(--text-light);
  border: 1px solid rgba(6, 182, 212, 0.5);
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563EB 0%, var(--primary-navy) 100%);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-cyan);
  transform: translateY(-2px);
}

.btn-cyan {
  background: var(--accent-cyan);
  color: var(--bg-dark);
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn-cyan:hover {
  background: var(--accent-cyan-light);
  box-shadow: 0 6px 25px rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border-glass);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.05);
}

/* --------------------------------------------------------------------------
   5. Header & Navigation Bar
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all var(--transition-smooth);
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.navbar.scrolled {
  padding: 14px 0;
  background: rgba(2, 6, 23, 0.92);
  border-bottom-color: var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-light);
}

.brand-logo svg {
  width: 32px;
  height: 32px;
  color: var(--accent-cyan);
}

.brand-logo span {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-slate);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-cyan);
  transition: width var(--transition-fast);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-light);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  width: 26px;
  height: 2px;
  background-color: var(--text-light);
  transition: all var(--transition-fast);
}

/* --------------------------------------------------------------------------
   6. Hero Section (index.html)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 70% 30%, rgba(30, 58, 138, 0.25) 0%, rgba(6, 182, 212, 0.08) 35%, rgba(2, 6, 23, 1) 75%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 24px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-slate);
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border-glass);
}

.spec-item .spec-val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: block;
}

.spec-item .spec-lbl {
  font-size: 0.8rem;
  color: var(--text-slate);
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.3) 0%, rgba(2, 6, 23, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.hero-img-placeholder {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 40%, rgba(6, 182, 212, 0.2) 0%, rgba(15, 23, 42, 0.9) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  position: relative;
}

.tech-badge-overlay {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-cyan-glow);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
}

.tech-badge-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(6, 182, 212, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   7. Tech Feature Presentation Section
   -------------------------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.feature-card {
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4) 0%, rgba(6, 182, 212, 0.2) 100%);
  border: 1px solid rgba(6, 182, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 24px;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-slate);
}

/* --------------------------------------------------------------------------
   8. Product Showcase & Categories (products.html & index.html)
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-slate);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  color: var(--text-light);
  background: var(--primary-navy);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

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

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-thumb {
  height: 320px;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-tag-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 12px;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-cyan-glow);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.product-details {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.product-desc {
  font-size: 0.88rem;
  color: var(--text-slate);
  margin-bottom: 20px;
  flex-grow: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
}

.product-price {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-light);
}

/* --------------------------------------------------------------------------
   9. Testimonials & Reviews
   -------------------------------------------------------------------------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.review-card {
  padding: 32px;
  display: flex;
  flex-direction: flex-direction;
  flex-direction: column;
  justify-content: space-between;
}

.stars {
  color: #F59E0B;
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.review-quote {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #CBD5E1;
  font-style: italic;
  margin-bottom: 24px;
}

.reviewer-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--accent-cyan) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #FFFFFF;
}

.reviewer-info h4 {
  font-size: 0.95rem;

}

.reviewer-info span {
  font-size: 0.8rem;
  color: var(--text-slate);
}

/* --------------------------------------------------------------------------
   10. Form & Floating Labels (contact.html)
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.form-group {
  position: relative;
  margin-bottom: 28px;
}

.form-control {
  width: 100%;
  padding: 18px 20px 8px 20px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-light);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-cyan);
  background: rgba(15, 23, 42, 0.95);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
  padding-top: 24px;
}

.form-label {
  position: absolute;
  left: 20px;
  top: 16px;
  color: var(--text-slate);
  font-size: 0.95rem;
  pointer-events: none;
  transition: all var(--transition-fast);
}

.form-control:focus ~ .form-label,
.form-control:not(:placeholder-shown) ~ .form-label {
  top: 6px;
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* Custom Select styling */
select.form-control {
  padding-top: 18px;
  appearance: none;
  cursor: pointer;
}

select.form-control option {
  background: var(--primary-navy-dark);
  color: var(--text-light);
}

/* Milan District Map Mock */
.map-container {
  height: 100%;
  min-height: 420px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-glass);
  background: #090D16;
}

.map-svg-mock {
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.map-overlay-card {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  padding: 20px;
}

/* --------------------------------------------------------------------------
   11. Legal Pages Layout (privacy, terms, cookie policy)
   -------------------------------------------------------------------------- */
.legal-header {
  padding: 140px 0 60px 0;
  background: radial-gradient(circle at 50% 0%, rgba(30, 58, 138, 0.3) 0%, rgba(2, 6, 23, 1) 70%);
  text-align: center;
  border-bottom: 1px solid var(--border-glass);
}

.legal-content {
  padding: 60px 0 100px 0;
}

.legal-box {
  padding: 48px;
  max-width: 900px;
  margin: 0 auto;
}

.legal-box h2 {
  font-size: 1.5rem;
  margin-top: 36px;
  margin-bottom: 16px;
  color: var(--accent-cyan-light);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 8px;
}

.legal-box h3 {
  font-size: 1.15rem;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-light);
}

.legal-box p, .legal-box ul {
  font-size: 0.98rem;
  color: #CBD5E1;
  margin-bottom: 18px;
  line-height: 1.8;
}

.legal-box ul {
  padding-left: 24px;
  list-style: disc;
}

.legal-box li {
  margin-bottom: 8px;
}

.consent-id-container {
  margin: 24px 0;
  padding: 20px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px dashed var(--accent-cyan);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   12. GDPR Cookie Banner Component
   -------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: -200px;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-cyan-glow);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
  padding: 24px 0;
  transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.active {
  bottom: 0;
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.cookie-text p {
  font-size: 0.88rem;
  color: var(--text-slate);
  margin-top: 4px;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   13. Footer Component
   -------------------------------------------------------------------------- */
.footer {
  background: #020617;
  border-top: 1px solid var(--border-glass);
  padding: 80px 0 30px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-slate);
  margin-top: 16px;
  max-width: 320px;
}

.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--text-light);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

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

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-slate);
}

/* --------------------------------------------------------------------------
   14. Animations & Scroll Reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --------------------------------------------------------------------------
   15. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .features-grid, .products-grid, .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .nav-links, .nav-cta {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-links.mobile-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(20px);
    padding: 30px 24px;
    border-bottom: 1px solid var(--border-glass);
    gap: 20px;
  }

  .features-grid, .products-grid, .reviews-grid {
    grid-template-columns: 1fr;
  }

  .hero-specs {
    grid-template-columns: 1fr;
  }

  .cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }

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