/* Cattura site — custom styles on top of Tailwind CDN */

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}

/* keyframe used by the hero scan-line (defined here because Tailwind arbitrary keyframe animations
   via the CDN runtime need the keyframes to exist in CSS). */
@keyframes scanline {
  0%   { transform: translateY(0);    opacity: 0; }
  10%  { opacity: 1; }
  50%  { transform: translateY(calc(100% - 2px)); opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(0);    opacity: 0; }
}

/* subtle shine animation reused for the gradient CTA */
.gradient-shine {
  background-size: 200% 100%;
  background-image: linear-gradient(
    90deg,
    #F5A623 0%,
    #FFCB47 25%,
    #FFDD85 50%,
    #FFCB47 75%,
    #F5A623 100%
  );
}

/* Details/summary polish — remove native marker on Webkit/Firefox */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { display: none; }

/* Scrollbar (desktop) — blend with dark theme */
@media (hover: hover) and (pointer: fine) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: #0B1220; }
  ::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    border: 2px solid #0B1220;
  }
  ::-webkit-scrollbar-thumb:hover { background: rgba(245,166,35,0.4); }
}

/* Prevent scroll chaining inside the feature cards grid on touch */
section { scroll-margin-top: 5rem; }

/* Focus states for a11y */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #FFCB47;
  outline-offset: 2px;
  border-radius: 8px;
}

/* Reveal on scroll — targets .reveal, activated by IntersectionObserver in app.js */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Make the phone mockup play nicely on small screens */
@media (max-width: 640px) {
  .shadow-glow-lg { box-shadow: 0 0 80px -20px rgba(245, 166, 35, 0.5); }
}

/* Reduce motion preference — disable heavy animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print — sober layout if someone prints the page */
@media print {
  body { background: #fff; color: #000; }
  header, footer, #contact form, .animate-pulse-ring, .animate-float-slow { display: none !important; }
}

/* ============================================================
   Demo light — modal (hero CTA "Prova gratis 7 giorni")
   Classi dedicate perché il bundle Tailwind pre-compilato non
   include opacity arbitraria (bg-ink-950/80) né z-[100].
   Mantengono stile coerente col dark theme del sito. */
.demo-light-modal {
  z-index: 100;
}
.demo-light-backdrop {
  background-color: rgba(11, 18, 32, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ============================================================
   Hero primary CTA — "Prova gratis 7 giorni"
   Bottone primario rifinito: gradient con shine animato in loop,
   glow ring esterno, subtle inner highlight per dare profondità,
   micro-lift al hover. Non usa le classi Tailwind bg-gradient/
   shadow-glow perché il bundle compiled non include shadow
   arbitrary, e il @keyframes shine-slide è riusabile qui. */
.hero-primary-cta {
  background-image: linear-gradient(
    120deg,
    #F5A623 0%,
    #FFCB47 35%,
    #FFDD85 50%,
    #FFCB47 65%,
    #F5A623 100%
  );
  background-size: 220% 100%;
  background-position: 0% 50%;
  border: 0;
  cursor: pointer;
  position: relative;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding-left: 2rem;
  padding-right: 2rem;
  box-shadow:
    0 14px 32px -8px rgba(245, 166, 35, 0.55),
    0 0 0 1px rgba(255, 221, 133, 0.35) inset,
    0 1px 0 rgba(255, 255, 255, 0.35) inset;
  transition: transform 0.18s cubic-bezier(.2,.7,.2,1),
              box-shadow 0.18s cubic-bezier(.2,.7,.2,1),
              background-position 0.6s ease;
  animation: hero-cta-shine 4.5s linear infinite;
}
.hero-primary-cta:hover {
  background-position: 100% 50%;
  transform: translateY(-1px);
  box-shadow:
    0 22px 44px -10px rgba(245, 166, 35, 0.75),
    0 0 0 1px rgba(255, 221, 133, 0.55) inset,
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
}
.hero-primary-cta:active {
  transform: translateY(0);
  box-shadow:
    0 8px 18px -6px rgba(245, 166, 35, 0.55),
    0 0 0 1px rgba(255, 221, 133, 0.45) inset;
}
.hero-primary-cta:focus-visible {
  outline: 3px solid #FFDD85;
  outline-offset: 3px;
}
@keyframes hero-cta-shine {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-primary-cta { animation: none; }
}

/* ============================================================
   Mobile-only sticky CTA (bottom bar)
   Visibile solo < 768px. Show/hide gestito da classe .is-visible
   applicata via app.js dopo scroll ≥200 px e fino all'intersezione
   con #contact. Su tablet/desktop nascosto. */
.mobile-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(11, 18, 32, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(120%);
  transition: transform 0.28s cubic-bezier(.2,.7,.2,1);
  display: none;
}
.mobile-sticky-cta.is-visible {
  transform: translateY(0);
}
.mobile-sticky-cta > button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #0B1220;
  background: linear-gradient(90deg, #F5A623 0%, #FFCB47 100%);
  box-shadow: 0 10px 30px -10px rgba(245, 166, 35, 0.55);
  cursor: pointer;
}
.mobile-sticky-cta > button:active {
  transform: translateY(1px);
}
@media (max-width: 767.98px) {
  .mobile-sticky-cta { display: block; }
}

/* ===== Press citation block (stacco chiaro tra hero scuro e social proof scuro) ===== */
.press-citation {
  padding: 64px 24px;
  background: #F5F7FA;
  border-top: 1px solid #E5E9EF;
  border-bottom: 1px solid #E5E9EF;
}
.press-citation-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.press-citation-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #687087;
  margin-bottom: 24px;
}
.press-citation-quote {
  font-size: 1.375rem;
  line-height: 1.55;
  font-style: italic;
  color: #0B1220;
  margin: 0 0 32px 0;
  padding: 0;
  border: none;
  font-weight: 400;
}
.press-citation-source {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}
.press-citation-logo {
  height: 36px;
  width: auto;
  display: block;
}
.press-citation-meta {
  font-size: 0.875rem;
  color: #687087;
  font-weight: 500;
}
.press-citation-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: #0B1220;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}
.press-citation-link:hover {
  opacity: 0.7;
}
@media (max-width: 640px) {
  .press-citation { padding: 48px 20px; }
  .press-citation-quote { font-size: 1.125rem; }
  .press-citation-source { flex-direction: column; gap: 8px; }
  .press-citation-logo { height: 28px; }
}

/* Zebra Validated badge — official logo on dark hero, no frame.
   The PNG has its own internal whitespace; the dark site reads the hexagon outline
   and the blue VALIDATED ribbon clearly. Wrapper exists only to scope hover-scale to
   the image without affecting the adjacent claim text. Sizes are forced here because
   the precompiled Tailwind in this project lacks the relevant w-/h- utilities. */
.cattura-zv-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease;
}
.cattura-zv-frame > img {
  width: 96px;
  height: 96px;
}
.cattura-zv-frame--sm > img {
  width: 72px;
  height: 72px;
}
a:hover > .cattura-zv-frame,
.group:hover > .cattura-zv-frame {
  transform: scale(1.05);
}
