/* ==================== LANDING PAGE 2 - WARM PALETTE STYLES ==================== */

/* Base */
body {
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
  /* La regola ::-webkit-scrollbar qui sotto forza una scrollbar classica, che
     occupa 8px: su una pagina corta (es. /manager/list) sparisce e il contenuto
     centrato salta di 4px rispetto alla pagina da cui si arriva. Riservando
     sempre la colonna il salto non c'e'. */
  scrollbar-gutter: stable;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

::-webkit-scrollbar-thumb {
  background: #f97316;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ea580c;
}

/* ==================== ANIMATIONS ==================== */

/* Fade in up animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Staggered animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* Pulse animation for live indicator */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==================== FAQ ACCORDION ==================== */

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

/* Specificita' doppia: le utility Tailwind (pb-5, py-*) sono iniettate dal CDN
   dopo home.css, quindi un padding residuo lascerebbe intravedere la risposta
   chiusa attraverso il box padding. */
.faq-item .faq-content {
  padding-top: 0;
  padding-bottom: 0;
}

.faq-item.active .faq-content {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

.faq-item.active .faq-toggle i {
  transform: rotate(180deg);
}

.faq-toggle {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.faq-toggle:hover {
  background-color: rgba(249, 115, 22, 0.05);
}

.faq-toggle:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #f97316;
}

.faq-toggle i {
  transition: transform 0.3s ease;
}

/* ==================== BUTTONS ==================== */

/* Primary CTA button glow effect */
.shadow-orange-500\/30 {
  box-shadow: 0 10px 40px -10px rgba(249, 115, 22, 0.3);
}

.hover\:shadow-orange-500\/40:hover {
  box-shadow: 0 20px 50px -10px rgba(249, 115, 22, 0.4);
}

/* Button hover lift */
button, a {
  transition: all 0.2s ease;
}

/* ==================== CARDS ==================== */

/* Card hover effects */
.group:hover .group-hover\:bg-orange-200 {
  background-color: rgb(254 215 170);
}

/* Pricing card popular scale */
@media (min-width: 768px) {
  .scale-105 {
    transform: scale(1.05);
    z-index: 10;
  }
}

/* ==================== NAVIGATION ==================== */

/* Nav backdrop blur support */
@supports (backdrop-filter: blur(12px)) {
  nav > div {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
  }
}

/* Active nav link */
.nav-link.active {
  color: #0f172a;
  font-weight: 600;
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */

/* Mobile typography */
@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.75rem;
  }

  .text-5xl {
    font-size: 2.5rem;
  }
}

/* Pricing cards stack on mobile */
@media (max-width: 768px) {
  .scale-105 {
    transform: none;
  }
}

/* ==================== SCROLL ANIMATIONS ==================== */

/* Elements that animate on scroll */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ==================== WIZARD STYLES ==================== */

/* QR type button active state */
.qr-type-select.active {
  border-color: #f97316;
  background-color: rgb(255 237 213);
}

/* QR color button active state */
.qr-color-btn.active {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 2px #f97316, 0 0 0 4px white;
}

/* QR background color button active state */
.qr-bg-btn.active {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 2px #f97316, 0 0 0 4px white;
}

/* QR shape button active state */
.qr-shape-btn.active {
  border-color: #f97316;
  background-color: rgb(255 237 213);
}

/* QR eye button active state */
.qr-eye-btn.active {
  border-color: #f97316;
  background-color: rgb(255 237 213);
}

/* QR frame button active state */
.qr-frame-btn.active {
  border-color: #f97316;
  background-color: rgb(255 237 213);
}

.qr-frame-btn.locked {
  cursor: not-allowed;
}

/* Color tab active state */
.color-tab.active {
  background-color: rgb(255 237 213);
  color: #c2410c;
}

/* Step indicators */
.wizard-step-indicator div.bg-orange-500 {
  background-color: #f97316;
}

/* QR Preview container transition */
#qr-style-preview {
  transition: background-color 0.2s ease, background-image 0.2s ease;
}

/* QR Preview SVG color transition */
#qr-preview-svg {
  color: #0f172a;
  transition: color 0.2s ease;
}

/* QR module transition for shape changes */
.qr-module {
  transition: rx 0.2s ease, transform 0.2s ease;
}

/* QR eye transition for style changes */
.qr-eye-outer,
.qr-eye-inner {
  transition: rx 0.2s ease;
}

/* Eye inner background */
.qr-eye-inner-bg {
  fill: white;
  transition: fill 0.2s ease;
}

/* ==================== ACCESSIBILITY ==================== */

/* Focus states */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ==================== UTILITY CLASSES ==================== */

/* Scroll margin for anchor links */
.scroll-mt-32 {
  scroll-margin-top: 8rem;
}

/* Truncate text */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== PRINT STYLES ==================== */

@media print {
  nav,
  footer,
  .faq-toggle i,
  button,
  a[href="/signup"] {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

/* ==================== /qrcode/request — configuratore ==================== */

/* Nota sulla specificita': le utility Tailwind sono iniettate dal CDN DOPO
   questo foglio, quindi a parita' di specificita' vincono loro. Ogni regola qui
   sotto che compete con una utility usa due classi, come il fix dell'accordion
   FAQ piu' in alto. */

/* Scacchiera dietro l'anteprima: senza, un QR con sfondo bianco o chiaro
   sparisce dentro la card. */
.qr-preview-stage {
  background-color: #f8fafc;
  background-image:
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

/* Sezioni avanzate: <details> nativo, senza il triangolino di default. */
.qr-advanced > summary::-webkit-details-marker {
  display: none;
}

.qr-advanced > summary {
  list-style: none;
}

.qr-advanced .qr-chev {
  transition: transform 0.2s ease;
}

.qr-advanced[open] .qr-chev {
  transform: rotate(180deg);
}

/* Tipo non ancora generabile dal motore: resta in vetrina ma non e' scegliibile.
   Serve battere le utility hover:* del bottone, da cui !important. */
.qr-type-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: #e5e7eb !important;
  background-color: #f9fafb !important;
}

/* --- Aspetto: swatch di colore e tile della forma moduli ---
   Specificita' doppia (.qr-appearance .x) perche' le utility Tailwind sono
   iniettate dopo questo file: a parita' di peso vincerebbero loro. */
.qr-appearance .qr-swatch {
  position: relative;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.qr-appearance .qr-swatch:hover {
  transform: translateY(-1px);
}

.qr-appearance .qr-swatch.is-active {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #f97316;
}

/* Scacchiera per lo sfondo trasparente: stesso motivo di .qr-preview-stage. */
.qr-appearance .qr-swatch-alpha {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #d4d4d8 25%, transparent 25%, transparent 75%, #d4d4d8 75%, #d4d4d8),
    linear-gradient(45deg, #d4d4d8 25%, transparent 25%, transparent 75%, #d4d4d8 75%, #d4d4d8);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
}

/* L'input color nativo ha padding e bordo propri del browser: azzerati, resta
   un quadrato del colore corrente della stessa taglia degli altri swatch. */
.qr-appearance .qr-color-custom {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0.75rem;
}

.qr-appearance .qr-color-custom::-webkit-color-swatch-wrapper {
  padding: 0;
}

.qr-appearance .qr-color-custom::-webkit-color-swatch {
  border: 1px dashed #94a3b8;
  border-radius: 0.75rem;
}

.qr-appearance .qr-color-custom::-moz-color-swatch {
  border: 1px dashed #94a3b8;
  border-radius: 0.75rem;
}

.qr-appearance .qr-color-tab {
  color: #475569;
}

.qr-appearance .qr-color-tab.is-active {
  background-color: #ffffff;
  color: #ea580c;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.qr-appearance .qr-shape-tile.is-active {
  border-color: #f97316;
  background-color: #fff7ed;
}
