/* ========================================
   itcwise sagl - Modern Website Styles
   Design: Glassmorphism + Gradient Modern
   ======================================== */

/* Self-hosted Inter font (privacy: nessun dato inviato a Google) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* CSS Variables */
:root {
  /* Primary Colors - Purple to Cyan */
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-primary-light: #818cf8;
  --color-secondary: #06b6d4;
  --color-accent: #8b5cf6;
  
  /* Extended Palette */
  --color-purple-400: #a78bfa;
  --color-cyan-400: #22d3ee;
  --color-indigo-300: #a5b4fc;
  
  /* Backgrounds */
  --color-bg: #0a0f1a;
  --color-bg-dark: #070a12;
  --color-bg-light: #111827;
  --color-bg-lighter: #1f2937;
  --color-glass: rgba(17, 24, 39, 0.7);
  --color-glass-border: rgba(255, 255, 255, 0.08);
  
  /* Text */
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;
  
  /* Status */
  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.5);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
  --shadow-glow-cyan: 0 0 40px rgba(6, 182, 212, 0.3);
  
  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
  scroll-behavior: smooth;
}

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

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

input, button, textarea, select {
  font: inherit;
}

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

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 2rem;
  }
}

/* ========================================
   Header - Glassmorphism
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.75rem 0;
  background: rgba(10, 15, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-glass-border);
  transition: all var(--transition-normal);
}

.header.scrolled {
  padding: 0.5rem 0;
  background: rgba(10, 15, 26, 0.95);
}

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

.logo img {
  height: 55px;
  width: auto;
  transition: transform var(--transition-bounce);
}

.logo:hover img {
  transform: scale(1.05);
}

/* ========================================
   Hero Section - Modern Gradient
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 4rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary-light);
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--color-success), #4ade80);
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { 
    opacity: 1;
    box-shadow: 0 0 10px var(--color-success);
  }
  50% { 
    opacity: 0.6;
    box-shadow: 0 0 20px var(--color-success);
  }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

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

.hero-description {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--color-text-muted);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Hero visual element */
.hero-visual {
  position: absolute;
  right: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  pointer-events: none;
  opacity: 0.6;
}

@media (max-width: 1200px) {
  .hero-visual {
    display: none;
  }
}

/* Nascondi card fluttuanti su schermi ultra-wide (30"+) */
@media (min-width: 1920px) {
  .hero-visual {
    display: none;
  }
}

.floating-card {
  position: absolute;
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  animation: float 6s ease-in-out infinite;
}

.card-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.card-2 {
  bottom: 20%;
  right: 20%;
  animation-delay: -2s;
}

.card-3 {
  top: 50%;
  right: 5%;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

/* ========================================
   Buttons - Modern Style
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

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

.btn-secondary:hover {
  background: var(--color-bg-light);
  border-color: var(--color-primary-light);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loader {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   About Section - Bento Grid
   ======================================== */
.about {
  padding: 6rem 0;
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.section-label {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

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

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

.bento-card {
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.bento-card.large {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 640px) {
  .bento-card.large {
    grid-column: span 1;
    grid-row: span 1;
  }
}

.card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.1));
  border-radius: var(--radius-lg);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.card-icon.glow {
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.card-description {
  color: var(--color-text-muted);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.bento-card.large .card-title {
  font-size: 1.5rem;
}

.bento-card.large .card-description {
  font-size: 1.1rem;
}

/* Stats in bento */
.stat-value {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
  padding: 6rem 0;
  position: relative;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .contact-wrapper {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.contact-info .section-title {
  text-align: left;
  margin-bottom: 1rem;
}

.contact-description {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.contact-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(4px);
}

.contact-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.1));
  border-radius: var(--radius-md);
  font-size: 1.5rem;
}

.contact-label {
  font-size: 0.875rem;
  color: var(--color-text-dim);
  margin-bottom: 0.25rem;
}

.contact-value {
  font-weight: 600;
  color: var(--color-text);
}

.contact-link {
  color: var(--color-primary-light);
  transition: color var(--transition-fast);
}

.contact-link:hover {
  color: var(--color-secondary);
}

/* Certifications */
.certifications {
  padding: 1.5rem;
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-xl);
}

.certifications h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.cert-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cert-list li {
  position: relative;
  padding-left: 1.5rem;
}

.cert-list li::before {
  content: '🎓';
  position: absolute;
  left: 0;
}

.cert-list a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.cert-list a:hover {
  color: var(--color-primary-light);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--color-glass);
  padding: 2.5rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-glass-border);
  backdrop-filter: blur(10px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.form-field input,
.form-field textarea {
  padding: 0.875rem 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--color-bg-lighter);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--color-text-dim);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.char-count {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  text-align: right;
}

.error-message {
  font-size: 0.875rem;
  color: var(--color-error);
  min-height: 1.25rem;
}

.form-field input.error,
.form-field textarea.error {
  border-color: var(--color-error);
}

.form-field input.success,
.form-field textarea.success {
  border-color: var(--color-success);
}

/* Honeypot - hidden from humans */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.form-message {
  padding: 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
}

.form-message.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--color-success);
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--color-error);
}

.form-privacy-notice {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  text-align: center;
  line-height: 1.5;
}

.form-privacy-notice a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-privacy-notice a:hover {
  color: var(--color-secondary);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 4rem 0 2rem;
  background: var(--color-bg-dark);
  border-top: 1px solid var(--color-glass-border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.footer-brand img {
  height: 32px;
  width: auto;
}

.footer-tagline {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

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

.footer-copyright {
  color: var(--color-text-dim);
  font-size: 0.875rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-glass-border);
  width: 100%;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
  .hero {
    padding: 6rem 0 3rem;
  }
  
  .about,
  .contact {
    padding: 4rem 0;
  }
  
  .contact-form-wrapper {
    padding: 1.5rem;
  }
  
  .bento-grid {
    gap: 1rem;
  }
  
  .bento-card {
    padding: 1.5rem;
  }
}

/* ========================================
   Utility Classes
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

[hidden] {
  display: none !important;
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
