/* ==========================================================================
   ORANGE SYSTEM S.R.L. - Foglio di stile principale
   Modern tech aesthetic with orange brand accents
   ========================================================================== */

/* CSS Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s ease; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }

/* Design tokens */
:root {
  --orange: #FF6A00;
  --orange-deep: #E55A00;
  --orange-glow: rgba(255, 106, 0, 0.18);
  --cyan: #00D4FF;
  --dark: #0A0A0F;
  --dark-2: #14141B;
  --dark-3: #1F1F2A;
  --bg: #FFFFFF;
  --bg-soft: #F7F7F9;
  --bg-tint: #FAFAFA;
  --text: #1A1A24;
  --text-muted: #6B6B7B;
  --border: #E5E5EA;
  --border-strong: #D1D1D6;
  --shadow-sm: 0 1px 3px rgba(10,10,15,.06), 0 1px 2px rgba(10,10,15,.04);
  --shadow-md: 0 4px 16px rgba(10,10,15,.08), 0 2px 6px rgba(10,10,15,.04);
  --shadow-lg: 0 20px 60px rgba(10,10,15,.12), 0 10px 30px rgba(10,10,15,.06);
  --shadow-orange: 0 12px 40px rgba(255,106,0,.25);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --maxw: 1240px;
  --header-h: 76px;
  --transition: cubic-bezier(.2,.8,.2,1);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
h4 { font-size: 1.15rem; }
p  { color: var(--text-muted); font-size: 1.02rem; }
.lead { font-size: 1.18rem; color: var(--text-muted); max-width: 62ch; }
strong { color: var(--text); font-weight: 600; }
a:hover { color: var(--orange); }

/* Layout */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 8vw, 120px) 0; position: relative; }
.section--dark { background: var(--dark); color: #EDEDF2; }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #FFF; }
.section--dark p { color: #B4B4C2; }
.section--soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(36px, 5vw, 64px); }
.section-head .lead { margin: 14px auto 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange);
  padding: 6px 14px; border-radius: 999px;
  background: var(--orange-glow);
  margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }

/* Header / Nav */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav-wrap {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; font-size: 1.05rem; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-family: 'Space Grotesk', sans-serif;
  box-shadow: var(--shadow-orange);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text small { font-size: .68rem; color: var(--text-muted); font-weight: 500; letter-spacing: .04em; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative; padding: 10px 14px; font-size: .94rem; font-weight: 500; color: var(--text);
  border-radius: 8px;
}
.nav a:hover { color: var(--orange); background: var(--orange-glow); }
.nav a.active { color: var(--orange); }
.nav .has-sub { position: relative; }
.nav .submenu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; min-width: 240px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .22s var(--transition);
}
.nav .has-sub:hover .submenu, .nav .has-sub:focus-within .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav .submenu a { display: block; padding: 10px 12px; font-size: .9rem; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: flex; align-items: center; gap: 4px;
  font-size: .82rem; font-weight: 600;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px;
}
.lang-switch a {
  padding: 4px 10px; border-radius: 999px; color: var(--text-muted);
}
.lang-switch a.active { background: var(--text); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: .94rem; font-weight: 600;
  transition: transform .2s var(--transition), box-shadow .2s, background .2s, color .2s;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-deep); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-orange); }
.btn--dark { background: var(--text); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn--ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn--ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn--ghost-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.06); }
.btn--lg { padding: 16px 28px; font-size: 1rem; }
.btn--sm { padding: 9px 16px; font-size: .85rem; }

/* Mobile menu button */
.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.menu-toggle svg { width: 20px; height: 20px; }

/* Hero */
.hero {
  position: relative; padding-top: calc(var(--header-h) + 48px); padding-bottom: 96px;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(255,106,0,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(0,212,255,.08), transparent 60%),
    var(--dark);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 .accent {
  background: linear-gradient(135deg, var(--orange) 0%, #FFB266 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: #B4B4C2; font-size: 1.18rem; margin-top: 24px; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-stats { display: flex; gap: 36px; margin-top: 56px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats .num { font-family: 'Space Grotesk', sans-serif; font-size: 2.2rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.hero-stats .lbl { font-size: .82rem; color: #8A8A9A; letter-spacing: .04em; text-transform: uppercase; }

.hero-visual {
  position: relative; aspect-ratio: 1/1; max-width: 520px; margin-left: auto;
}
.hero-visual .orb {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--orange), var(--orange-deep) 70%, transparent 100%);
  filter: blur(4px); opacity: .9;
  box-shadow: 0 30px 90px rgba(255,106,0,.35);
}
.hero-visual .orb-1 { width: 65%; height: 65%; top: 8%; left: 18%; animation: float 8s ease-in-out infinite; }
.hero-visual .orb-2 {
  width: 38%; height: 38%; bottom: 4%; right: 4%;
  background: radial-gradient(circle at 30% 30%, var(--cyan), #0095CC 70%, transparent 100%);
  box-shadow: 0 20px 60px rgba(0,212,255,.35);
  animation: float 10s ease-in-out infinite reverse;
}
.hero-visual .ring {
  position: absolute; inset: 6%; border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%; animation: rotate 40s linear infinite;
}
.hero-visual .ring::after {
  content: ''; position: absolute; top: -3px; left: 50%;
  width: 6px; height: 6px; border-radius: 50%; background: var(--orange); transform: translateX(-50%);
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes rotate { to { transform: rotate(360deg); } }

/* Cards & grids */
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .35s var(--transition), box-shadow .35s, border-color .35s;
}
.card:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--shadow-lg); }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
  display: grid; place-items: center; color: #fff;
  margin-bottom: 22px;
  box-shadow: var(--shadow-orange);
}
.card .icon svg { width: 24px; height: 24px; stroke: #fff; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: .96rem; }
.card .arrow {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 6px;
  color: var(--orange); font-weight: 600; font-size: .9rem;
}
.card .arrow svg { width: 16px; height: 16px; transition: transform .25s; }
.card:hover .arrow svg { transform: translateX(4px); }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Brand showcase */
.brands-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.brand-tile {
  background: #fff;
  padding: 40px 24px;
  text-align: center;
  transition: background .25s;
  position: relative;
}
.brand-tile:hover { background: var(--bg-tint); }
.brand-tile .logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.55rem; font-weight: 700; letter-spacing: .04em;
  color: var(--text);
  margin-bottom: 6px;
}
.brand-tile .country { font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-muted); }
.brand-tile .tag {
  position: absolute; top: 14px; right: 14px;
  font-size: .65rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: var(--orange-glow); color: var(--orange);
  padding: 4px 8px; border-radius: 999px;
}

/* Brand detail (long-form) */
.brand-block {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; align-items: center;
  padding: 56px 0; border-bottom: 1px solid var(--border);
}
.brand-block:last-child { border-bottom: 0; }
.brand-block.reverse { grid-template-columns: 1.5fr 1fr; }
.brand-block.reverse .brand-mockup { order: 2; }
.brand-mockup {
  aspect-ratio: 1.3/1;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--dark-2), var(--dark));
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  color: #fff;
}
.brand-mockup::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.brand-mockup .name {
  position: relative; z-index: 2;
  font-family: 'Space Grotesk', sans-serif; font-size: 2.2rem; font-weight: 700;
  letter-spacing: .04em;
}
.brand-mockup .flag {
  position: absolute; top: 20px; left: 20px;
  font-size: .72rem; letter-spacing: .15em; text-transform: uppercase;
  background: rgba(255,255,255,.1); padding: 6px 12px; border-radius: 999px;
  backdrop-filter: blur(10px);
}
.brand-meta {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 24px;
}
.chip {
  font-size: .78rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border);
}

/* Forms */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--text); }
.field input, .field select, .field textarea {
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: #fff;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-glow);
}
.field textarea { resize: vertical; min-height: 120px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: var(--text-muted); }
.checkbox-row input { width: auto; margin-top: 4px; }

/* CTA Banner */
.cta-banner {
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(255,106,0,.18), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(0,212,255,.12), transparent 60%),
    var(--dark);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 5vw, 72px);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
  position: relative; overflow: hidden;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #C4C4D2; margin-top: 14px; }
.cta-banner-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }

/* Feature list */
.feature-list { display: grid; gap: 14px; margin-top: 24px; }
.feature-list li {
  display: flex; align-items: flex-start; gap: 12px;
  list-style: none;
  font-size: .98rem;
  color: var(--text);
}
.feature-list li::before {
  content: ''; flex: 0 0 22px; width: 22px; height: 22px;
  background: var(--orange-glow);
  border-radius: 50%;
  display: grid; place-items: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF6A00' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-position: center; background-size: 12px 12px; background-repeat: no-repeat;
  margin-top: 1px;
}

/* Process / steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: stepc; }
.step {
  position: relative; padding: 28px;
  border-radius: var(--radius);
  background: #fff; border: 1px solid var(--border);
  counter-increment: stepc;
}
.step::before {
  content: counter(stepc, decimal-leading-zero);
  font-family: 'Space Grotesk', sans-serif; font-size: 2.4rem; font-weight: 700;
  color: var(--orange); opacity: .9;
  letter-spacing: -.02em;
  display: block; margin-bottom: 12px;
}
.step h4 { margin-bottom: 8px; }
.step p { font-size: .92rem; }

/* Footer */
.footer {
  background: var(--dark); color: #B4B4C2;
  padding: 80px 0 32px;
  border-top: 1px solid var(--dark-3);
}
.footer-grid {
  display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 48px;
  padding-bottom: 56px; border-bottom: 1px solid var(--dark-3);
}
.footer h5 {
  color: #fff; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  font-family: 'Inter', sans-serif; font-weight: 600;
  margin-bottom: 18px;
}
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a { color: #B4B4C2; font-size: .94rem; }
.footer a:hover { color: #fff; }
.footer .brand-text { color: #fff; }
.footer .brand-text small { color: #8A8A9A; }
.footer p { font-size: .92rem; }
.footer-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  padding-top: 32px; font-size: .82rem; color: #6B6B7B;
}
.footer-meta a { color: #6B6B7B; font-size: .82rem; }
.footer-meta a:hover { color: #fff; }

/* Page header (for sub-pages) */
.page-header {
  padding-top: calc(var(--header-h) + 80px); padding-bottom: 80px;
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(255,106,0,.10), transparent 60%),
    var(--dark);
  color: #fff;
}
.page-header .container { position: relative; z-index: 2; }
.page-header .crumbs {
  display: flex; gap: 8px; align-items: center;
  font-size: .82rem; color: #8A8A9A; margin-bottom: 18px;
}
.page-header .crumbs a:hover { color: #fff; }
.page-header h1 { color: #fff; max-width: 18ch; }
.page-header p { color: #C4C4D2; max-width: 60ch; margin-top: 18px; font-size: 1.18rem; }

/* Anchor offset */
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--transition), transform .8s var(--transition); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Mobile menu drawer */
.mobile-nav {
  position: fixed; inset: 0;
  background: rgba(10,10,15,.96);
  backdrop-filter: blur(20px);
  z-index: 99;
  display: none;
  padding: calc(var(--header-h) + 24px) 24px 32px;
  overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; display: grid; gap: 4px; }
.mobile-nav a {
  display: block; padding: 14px 16px; border-radius: 10px;
  color: #fff; font-size: 1.05rem; font-weight: 500;
}
.mobile-nav a:hover, .mobile-nav a.active { background: rgba(255,255,255,.06); color: var(--orange); }
.mobile-nav .submenu-mobile { padding-left: 16px; margin-top: 4px; }
.mobile-nav .submenu-mobile a { font-size: .94rem; color: #B4B4C2; padding: 10px 16px; }
.mobile-nav .lang-switch { margin-top: 24px; justify-content: center; }
.mobile-nav .lang-switch a { color: #B4B4C2; }
.mobile-nav .lang-switch a.active { background: var(--orange); color: #fff; }

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 380px; margin: 0 auto; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .brand-block, .brand-block.reverse { grid-template-columns: 1fr; gap: 28px; }
  .brand-block.reverse .brand-mockup { order: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cta-banner { grid-template-columns: 1fr; }
  .cta-banner-actions { justify-content: flex-start; }
  .brands-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav, .nav-actions .btn, .nav-actions .lang-switch { display: none; }
  .menu-toggle { display: inline-flex; }
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
