/* ═══════════════════════════════════════════
   OpsPilot — Landing Page Styles
   Specifico per index.html (homepage)
   ═══════════════════════════════════════════ */

/* ─── Page Variables Override ─── */
:root {
  --bg: #ffffff;
  --text: #35393c;
  --line: rgba(0, 0, 0, .08);
  --shadow: 0 18px 60px rgba(0, 0, 0, .45);
  --radius: 18px;
  --radius2: 14px;
  --max: 1100px;
  --pad: 20px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* ─── Body ─── */
html, body { height: 100%; }

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(var(--accent-rgb), .10), transparent 60%),
    radial-gradient(1200px 600px at 90% 0%, rgba(var(--accent2-rgb), .08), transparent 55%),
    radial-gradient(900px 500px at 60% 90%, rgba(var(--good-rgb), .06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.55;
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-top: 48px;
}

a { color: inherit; }

/* ─── Navigation ─── */
#site-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
}

.nav {
  position: relative;
  background: linear-gradient(135deg, #1a3a54, #28587b);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: .2px;
}

.logo {
  width: 228px;
  height: 78px;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

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

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

.nav-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, .80);
  font-weight: 650;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 999px;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

/* ─── Nav Dropdown ─── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown > a::after {
  content: '▾';
  font-size: 10px;
  opacity: .6;
  transition: transform .2s;
}

.nav-dropdown:hover > a::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  background: #1a3a54;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  z-index: 100;
  animation: dropdownFadeIn .2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .75) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, .10) !important;
  color: #fff !important;
}

.nav-dropdown-menu .dd-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-dropdown-menu .dd-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-dropdown-menu .dd-label small {
  font-size: 11px;
  color: rgba(255, 255, 255, .45);
  font-weight: 500;
}

.nav-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, .08);
  margin: 4px 0;
}

/* Mobile dropdown */
.mobile-nav .mobile-dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.mobile-nav .mobile-dropdown-toggle::after {
  content: '▾';
  font-size: 11px;
  opacity: .5;
  transition: transform .2s;
}

.mobile-nav .mobile-dropdown-toggle.open::after {
  transform: rotate(180deg);
}

.mobile-dropdown-items {
  display: none;
  background: rgba(0, 0, 0, .15);
}

.mobile-dropdown-items.open {
  display: block !important;
}

.mobile-dropdown-items a {
  padding-left: 36px !important;
  font-size: 14px !important;
}

/* ─── Hamburger & Mobile Nav ─── */
.hamburger-btn {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  cursor: pointer;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 20px;
  line-height: 1;
  transition: background .2s;
}

.hamburger-btn:hover { background: rgba(255, 255, 255, .12); }

.mobile-nav {
  display: none;
  background: #1e3d57;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  padding: 8px 0;
}

.mobile-nav.open { display: block; }

.mobile-nav a {
  display: block;
  padding: 12px 20px;
  color: rgba(255, 255, 255, .80);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: background .15s, color .15s;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.mobile-nav a:last-child { border-bottom: none; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .06);
  text-decoration: none;
  font-weight: 750;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}

.btn:hover {
  background: rgba(0, 0, 0, .08);
  border-color: rgba(255, 255, 255, .18);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  border: 0;
  background: linear-gradient(135deg, #2563EB, #1d4ed8);
  color: #fff;
  box-shadow: 0 18px 45px rgba(37, 99, 235, .25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 20px 50px rgba(37, 99, 235, .30);
}

/* ─── Hero ─── */
.hero { padding: 64px 0 24px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 22px;
  align-items: start;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.06;
  letter-spacing: -.8px;
  font-weight: 800;
  color: var(--text);
}

.sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 18px);
  max-width: 62ch;
}

/* ─── Badges & Dots ─── */
.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .04);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
}

.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.good { background: var(--good); }
.dot.accent { background: var(--accent); }
.dot.warn { background: var(--warn); }

/* ─── Cards & Panels ─── */
.card {
  background: #ffffff;
  border: 1px solid rgba(var(--accent-rgb), .15);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(var(--accent-rgb), .10), 0 1px 4px rgba(0, 0, 0, .06);
}

.card, .panel, .step {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
  overflow: hidden;
}

.card:hover, .panel:hover, .step:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
  border-color: rgba(var(--accent-rgb), 0.2);
}

.hero-card { padding: 18px; }

.panel {
  padding: 18px;
  border-radius: var(--radius2);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.panel h3 { margin: 2px 0 6px; font-size: 16px; }
.panel p { margin: 0; color: var(--muted); font-size: 14px; }

.kpi { display: flex; align-items: flex-start; gap: 12px; }

.icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(var(--accent-rgb), .12);
  border: 1px solid rgba(var(--accent-rgb), .22);
  color: var(--accent);
  flex: 0 0 auto;
}

/* ─── Steps ─── */
.steps { counter-reset: step; }
.step { display: flex; gap: 12px; }

.num {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(var(--accent2-rgb), .12);
  border: 1px solid rgba(var(--accent2-rgb), .22);
  color: rgba(var(--accent2-rgb), .95);
  display: grid;
  place-items: center;
  font-weight: 850;
  flex: 0 0 auto;
}

/* ─── Forms ─── */
.mini-title { font-weight: 800; margin: 0 0 10px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}

label { font-size: 13px; color: var(--muted); font-weight: 700; }

input, textarea, select {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(var(--accent-rgb), .03);
  color: var(--text);
  outline: none;
  font-family: var(--font);
}

select option { background: var(--bg); color: var(--text); }
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: rgba(var(--text-rgb), .45); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* ─── Pricing ─── */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.price-card { padding: 18px; position: relative; }
.price-card h3 { margin: 0 0 4px; }

.tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 12px;
  font-weight: 850;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(var(--good-rgb), .12);
  border: 1px solid rgba(var(--good-rgb), .22);
  color: rgba(var(--good-rgb), .98);
}

.price { font-size: 26px; font-weight: 900; margin: 10px 0 6px; }
.price small { font-size: 13px; color: var(--muted); font-weight: 700; }

ul { margin: 10px 0 0; padding: 0 0 0 18px; color: var(--muted); }
li { margin: 6px 0; font-size: 14px; }

/* ─── FAQ ─── */
details {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .03);
  border-radius: 14px;
  padding: 12px 14px;
}

details + details { margin-top: 10px; }

summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
  list-style: none;
}

summary::-webkit-details-marker { display: none; }
details p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* ─── Footer ─── */
.footer {
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 13px;
}

.note { font-size: 12px; color: rgba(var(--text-rgb), .55); margin-top: 10px; }
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

.pill {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .03);
  font-weight: 700;
  color: rgba(var(--text-rgb), .75);
  font-size: 13px;
}

/* ─── Cookie Consent ─── */
#cookie-consent {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  z-index: 2000;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: slide-up .4s ease;
}

#cookie-consent p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.cookie-btns { display: flex; gap: 10px; }
.cookie-btns .btn { flex: 1; font-size: 13px; padding: 10px; }

/* ─── Widget Chat (commentato nell'HTML) ─── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}

.ops-msg, .demo-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.ops-msg-bot, .demo-msg-bot {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(0, 0, 0, .08);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  color: #e8eefc;
}

.ops-msg-user, .demo-msg-user {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .15), rgba(var(--accent2-rgb), .15));
  border: 1px solid rgba(var(--accent-rgb), .2);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  color: #e8eefc;
}

.ops-msg-typing, .demo-msg-typing {
  background: rgba(0, 0, 0, .04);
  border: 1px solid rgba(0, 0, 0, .06);
  align-self: flex-start;
  color: #b7c3df;
  font-style: italic;
  font-size: 12px;
}

#ops-chat { display: none; }
#ops-chat.open { display: flex !important; }
#ops-toggle:hover { transform: scale(1.08); }

/* ─── Animations ─── */
@keyframes floating {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.floating-ui { animation: floating 4s ease-in-out infinite; }

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes gradient-move {
  0% { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}

.gradient-text {
  background: linear-gradient(90deg, #1a6fba, #7c3aed, #0ea890, #5b7fd4, #7c3aed, #1a6fba);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-move 6s linear infinite;
  filter: drop-shadow(0 2px 14px rgba(40, 88, 123, .25));
  display: inline-block;
}

/* ─── Responsive: Tablet ─── */
@media (max-width: 900px) {
  .hero-grid,
  .pricing,
  .grid-3,
  .grid-2,
  .form-row,
  .demo-grid { grid-template-columns: 1fr; gap: 28px; }

  .nav-links,
  .demo-info-col,
  .nav .btn-primary { display: none; }

  .hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    margin-right: 8px;
  }

  .hero { padding-top: 42px; }
}

/* ─── Responsive: Mobile ─── */
@media (max-width: 480px) {
  h1 { font-size: clamp(26px, 7vw, 34px); }
  .btn { padding: 11px 14px; font-size: 14px; }
  .nav-inner { padding: 10px 0; }

  #site-top-bar { position: static; }
  body { padding-top: 0 !important; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 32px; }

  .pill-row { gap: 6px; }
  .pill { font-size: 12px; padding: 6px 10px; }

  .social-badges {
    margin-left: 0 !important;
    margin-top: 10px;
    padding-left: 0 !important;
    border-left: none !important;
    width: 100%;
    justify-content: center;
  }
}
