/* ================================================
   TWOW Strategic Scan — Prototype Stylesheet
   UI/UX Refactor — Stunning Glassmorphic Dark Mode
   ================================================ */

html {
  scrollbar-gutter: stable;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* TWOW Official Palette from Scan */
  --twow-black: #000000;
  --twow-coral: #FF5553;
  --twow-blue: #3A95AA;
  --twow-green: #54896A;
  --twow-wine: #A45560;
  --twow-pink: #FF95A4;
  --twow-yellow: #FFEA8D;

  /* Semantic tokens */
  --font-text: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: 'Bebas Neue', 'Inter', sans-serif;
  /* fallback for Druk Web */
  --font: var(--font-text);

  --color-bg: #030303;
  --color-surface: rgba(20, 20, 22, 0.75);
  --color-surface-hover: rgba(35, 35, 38, 0.85);

  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-hover: rgba(255, 255, 255, 0.18);
  --color-border-mid: rgba(255, 255, 255, 0.25);

  --color-text: #f8f6f0;
  --color-muted: #9e9e9a;
  --color-muted-light: #b5b5b0;

  --color-accent: var(--twow-coral);
  --color-brand-mat: var(--twow-blue);
  /* Blue for Brand Maturity */
  --color-mkt-pot: var(--twow-yellow);
  /* Yellow for Market Potential */

  --color-branding: var(--twow-blue);
  --color-performance: var(--twow-coral);

  --color-internal-bg: rgba(10, 10, 10, 0.85);
  --color-internal-text: #f0ebe3;
  --color-internal-muted: #7a7a76;
  --color-error: var(--twow-coral);

  --radius: 20px;
  --radius-sm: 12px;
  --max-width: 800px;
  /* Slightly wider for better scan readability */

  /* Responsive Spacing System */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-xxl: 64px;

  /* Animation system */
  --anim-fast: 0.2s;
  --anim-standard: 0.4s;
  --anim-reveal: 0.6s;
  --anim-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --anim-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (max-width: 480px) {
  :root {
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 24px;
    --space-xl: 32px;
    --radius: 16px;
  }
}

/* Background color cycle — 8s hold + 1s transition per color (45s total) */
@keyframes brand-bg-cycle {

  0%,
  17.778% {
    background-color: #3A95AA;
  }

  /* blue   — hold 8s */
  20%,
  37.778% {
    background-color: #54896A;
  }

  /* green  — hold 8s */
  40%,
  57.778% {
    background-color: #A45560;
  }

  /* wine   — hold 8s */
  60%,
  77.778% {
    background-color: #FF95A4;
  }

  /* pink   — hold 8s */
  80%,
  97.778% {
    background-color: #FFEA8D;
  }

  /* yellow — hold 8s */
  100% {
    background-color: #3A95AA;
  }

  /* torna a blue     */
}

body {
  font-family: var(--font);
  animation: brand-bg-cycle 45s linear infinite;
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 16px 12px calc(100px + env(safe-area-inset-bottom, 0px));
  /* BUG 5: safe-area-inset-bottom per iPhone X+ home indicator */
  position: relative;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  body {
    padding: 32px 16px 120px;
  }
}


/* ── Container ─────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto !important;
  margin-right: auto !important;
  position: relative;
  z-index: 1;
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
  box-sizing: border-box;
  /* Explicitly ensure border-box */
}

/* ── Header ────────────────────────────────────── */
header {
  margin-bottom: 36px;
  text-align: center;
  width: 100%;
  max-width: 100%;
}

main {
  width: 100%;
  max-width: 100%;
}

.logo-link {
  display: inline-block;
  text-decoration: none;
  border: none;
  outline: none;
}

.logo {
  height: 60px;
  width: auto;
  display: block;
  transition: transform var(--anim-standard) var(--anim-spring);
}

@media (max-width: 480px) {
  .logo {
    height: 42px;
  }
}


.logo:hover {
  transform: scale(1.05);
}

.header-animated-logo {
  display: block;
  max-width: 560px;
  width: 90%;
  margin: -40px auto -52px;
  height: auto;
}

@media (max-width: 480px) {
  .header-animated-logo {
    max-width: 80%;
    margin-top: -12px;
    margin-bottom: -20px;
    /* Further reduced from -4px */
  }
}

header h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 10vw, 84px);
  /* Further reduced scaling for mobile */
  font-weight: 700;
  letter-spacing: 0.01em;
  /* Minimal spacing for mobile fit */
  text-transform: uppercase;
  line-height: 1.1;
  /* Improved for wrapping */
  margin: 32px auto 6px;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: #000000;
  -webkit-text-fill-color: #000000;
  filter: none;
}

@media (max-width: 480px) {
  header h1 {
    font-size: clamp(42px, 13vw, 60px);
    margin-top: 16px;
  }
}

.subtitle {
  font-size: clamp(13px, 3vw, 18px);
  color: #000000;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0px;
}


.hero-description {
  font-size: clamp(16px, 1.7vw, 17px);
  color: #000000;
  font-weight: 400;
  line-height: 1.6;
  max-width: 780px;
  margin: 16px auto 0;
  text-align: center;
}

@media (max-width: 480px) {
  .hero-description {
    font-size: 16px;
    line-height: 1.5;
    margin-top: 12px;
  }
}

/* ── Form Section Headers & Dividers ───────────── */
.form-section-header {
  margin-bottom: 20px;
}

@media (max-width: 767px) {

  *,
  *::before,
  *::after {
    max-width: 100vw;
    overflow-wrap: break-word;
  }
}

.form-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  /* Reduced for mobile */
  margin: 32px 0 20px;
  /* Reduced for mobile */
  opacity: 0;
  animation: fadeInUp var(--anim-reveal) var(--anim-ease-out) forwards;
}

@media (min-width: 768px) {
  .form-section-divider {
    gap: 16px;
    margin: 48px 0 28px;
  }
}

.form-section-divider::before,
.form-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.4), transparent);
}

.section-label {
  font-family: var(--font-display);
  font-size: 15px;
  /* Slightly smaller for mobile */
  font-weight: 700;
  letter-spacing: 0.1em;
  /* Reduced for mobile */
  text-transform: uppercase;
  color: #000;
  white-space: normal;
  text-align: center;
  transition: color var(--anim-standard);
}

@media (min-width: 768px) {
  .section-label {
    font-size: 16px;
    letter-spacing: 0.15em;
  }
}

/* Axis-specific labels (applied in app.js or manual classes) */
.label-brand-mat {
  color: var(--color-brand-mat) !important;
}

.label-mkt-pot {
  color: var(--color-mkt-pot) !important;
}

/* ── Field Row (two columns) ───────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field-row .field-group {
  margin-bottom: 0;
}

/* ── Required star ─────────────────────────────── */
.required-star {
  color: #FF5553 !important;
  margin-left: -8px;
}

/* ── Field Group ───────────────────────────────── */
.field-group {
  margin-bottom: 16px;
  background: var(--color-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .field-group {
    padding: 24px;
    border-radius: var(--radius);
  }
}

.field-group label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.9);
}

input[type="url"],
input[type="text"],
input[type="email"] {
  width: 100%;
  height: 56px;
  padding: 0 20px;
  font-size: 16px;
  font-family: var(--font);
  font-weight: 400;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--color-border-mid);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  outline: none;
  transition: all var(--anim-fast) var(--anim-ease-out);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

input[type="url"]::placeholder,
input[type="text"]::placeholder,
input[type="email"]::placeholder {
  color: var(--color-muted);
}

input[type="url"]:focus,
input[type="text"]:focus,
input[type="email"]:focus {
  border-color: var(--twow-coral);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 85, 83, 0.22);
  outline: none;
}

/* ── Questions Slider Logic ───────────────────── */
.slider-viewport {
  width: 100%;
  overflow: visible;
  /* Safe now that slides are stacked and hidden when inactive */
  position: relative;
  margin-top: 20px;
  transition: height 0.4s ease;
  /* Prepare for dynamic height adjustment */
}

.questions-slider {
  display: grid !important;
  grid-template-columns: 100%;
  align-items: start;
  width: 100% !important;
  position: relative;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.question-block {
  grid-area: 1 / 1;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  background: var(--color-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  opacity: 0;
  transform: translateY(10px);
  /* Changed from translateX to avoid width issues */
  transition: opacity 0.4s ease, transform 0.6s var(--anim-ease-out);
  pointer-events: none;
  visibility: hidden;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .question-block {
    padding: var(--space-md) var(--space-sm);
    border-radius: var(--radius-sm);
  }
}

/* Question active/visible state */
.question-block.active-slide {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  z-index: 2;
  position: relative;
}

/* Direction-aware slide animation TWOW */
.questions-slider[data-dir="fwd"] .question-block.active-slide {
  animation: twowSlideInRight 0.38s var(--anim-ease-out) both;
}

.questions-slider[data-dir="bck"] .question-block.active-slide {
  animation: twowSlideInLeft 0.38s var(--anim-ease-out) both;
}

@keyframes twowSlideInRight {
  from {
    opacity: 0;
    transform: translateX(32px) translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

@keyframes twowSlideInLeft {
  from {
    opacity: 0;
    transform: translateX(-32px) translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

/* ── Roadmap Progress ──────────────────────────── */
.roadmap-wrapper {
  margin: 32px 0 40px;
  position: relative;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.roadmap-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
  padding: 0 10px;
}

/* Connecting line background */
.roadmap-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;

  left: 20px;
  right: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-50%);
  z-index: 1;
}

/* Roadmap fill line — progresso animato (JS imposta width) */
.roadmap-fill {
  position: absolute;
  top: 50%;
  left: 20px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--twow-coral) 0%, rgba(255, 85, 83, 0.55) 100%);
  transform: translateY(-50%);
  z-index: 1;
  transition: width 0.4s var(--anim-ease-out);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(255, 85, 83, 0.5), 0 0 2px var(--twow-coral);
  pointer-events: none;
}

.roadmap-step {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  outline: none;
}

/* Espansione hit area per touch (44×44pt WCAG 2.5.5) */
.roadmap-step::after {
  content: '';
  position: absolute;
  inset: -15px;
  border-radius: 50%;
}

/* Focus ring tastiera sui dot */
.roadmap-step:focus-visible {
  outline: 2px solid var(--twow-coral);
  outline-offset: 4px;
}

.roadmap-step:hover {
  border-color: #fff;
  transform: scale(1.4);
  background: #333;
}

.roadmap-step.active {
  background: var(--twow-coral);
  border-color: #fff;
  box-shadow:
    0 0 0 4px rgba(255, 85, 83, 0.2),
    0 0 15px var(--twow-coral);
  transform: scale(1.6);
}

.roadmap-step.completed {
  background: var(--twow-blue);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 10px rgba(58, 149, 170, 0.5);
}

.roadmap-step.completed::before {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #fff;
  font-weight: 800;
  z-index: 1;
}

/* Tooltip for roadmap */
.roadmap-step .step-label {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
}

.roadmap-step.active .step-label,
.roadmap-step:hover .step-label {
  opacity: 1;
  color: #fff;
  transform: translateX(-50%) translateY(4px);
}

/* ── Quiz Navigation ───────────────────────────── */
.quiz-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding: 15px 0;
  /* Extra space to prevent hover scale clipping */
  gap: var(--space-sm);
}

.btn-nav {
  flex: 1;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--color-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s var(--anim-ease-out);
}

.btn-nav svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.btn-nav:hover:not(:disabled) {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}

.btn-nav--next:hover:not(:disabled) svg {
  transform: translateX(4px);
}

.btn-nav--prev:hover:not(:disabled) svg {
  transform: translateX(-4px);
}

.btn-nav:disabled {
  opacity: 0.15;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.btn-nav--next {
  border: 1px solid var(--color-border-mid);
}

.btn-nav--next:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.5);
}

/* Special styling for the GENERATE action (CTA Finale) */
.btn-nav--generate {
  background: linear-gradient(135deg, var(--twow-coral) 0%, #E63946 100%) !important;
  color: #fff !important;
  border: none !important;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.05em;
  padding: 0 30px;
  backdrop-filter: none !important;
  white-space: nowrap;
}

.btn-nav--generate:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff6b69 0%, #f04a57 100%) !important;
  transform: scale(1.05) translateY(-3px) !important;
  /* Removed box-shadow as per user request */
}

@media (max-width: 480px) {
  .btn-nav--generate {
    font-size: 16px;
    padding: 0 16px;
    letter-spacing: 0.03em;
    flex: 1;
    min-width: 0;
  }

  .btn-nav--prev {
    flex: 0 0 auto;
    padding: 0 18px;
    min-width: 90px;
  }
}

/* Bug #3 fix: nav sempre visibile su mobile (sticky) */
@media (max-width: 768px) {
  .quiz-nav-row {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-top: 0;
    padding: 12px 0 calc(16px + env(safe-area-inset-bottom, 0px));
    background: none;
  }

  /* Spazio sotto il box domande per non finire mai sotto la nav bar */
  .slider-viewport {
    padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  }
}

.question-number {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--twow-coral);
  margin-bottom: 12px;
}

.question-label {
  font-size: clamp(15px, 2.5vw, 22px);
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 24px;
  color: #fff;
  letter-spacing: -0.01em;
}

.options-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  /* Base for glider */
}

/* ── Animation 1: Glider (Side Bar) ──────────────── */
.radio-container {
  --main-color: var(--twow-coral);
  --main-color-opacity: rgba(255, 85, 83, 0.15);
  padding-left: 0;
  /* Align highlighted box with the glider track */
}

.glider-container {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

/* Glider disabled — bar is now handled via ::before on each option-item */
.glider-container .glider {
  display: none;
}

/* ── Option Items ──────────────────────────────── */
.option-item {
  position: relative;
  transition: transform var(--anim-standard) var(--anim-spring);
  display: flex !important;
  /* Overriding previous label styles */
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 28px;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  background: transparent;
  transition: all var(--anim-fast) var(--anim-ease-out);
  user-select: none;
  overflow: visible;
  /* Changed from hidden to fix tooltip clipping */
}

.radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.option-item:hover {
  border-color: transparent;
  background: transparent;
}

/* ── Animation 2: Dynamic Point (Orbit) ──────────── */
.radio-custom {
  width: 22px;
  height: 22px;
  background-color: transparent;
  border: 2px solid var(--color-border-mid);
  border-radius: 50%;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0;
  /* centered via flex align-items */
}

.radio-custom::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.radio-custom::after {
  content: "";
  position: absolute;
  width: 32px;
  height: 32px;
  border: 2px solid transparent;
  border-radius: 50%;
  border-top-color: var(--twow-coral);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s ease;
}

@keyframes orbit {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Hover effects for the point */
.option-item:hover .radio-custom {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.radio-text {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.3s ease;
}

@media (min-width: 768px) {
  .option-item {
    padding: 20px 24px 20px 28px;
    min-height: 64px;
  }
}

/* Left bar indicator — always bounded to the item's own height */
.option-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  border-radius: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
}

.radio-input:checked+.option-item::before {
  background: var(--twow-coral);
  box-shadow:
    0 0 12px var(--twow-coral),
    0 0 4px var(--twow-coral);
}

/* Selected state for the whole item */
.radio-input:checked+.option-item {
  z-index: 5;
  border-color: transparent;
  background: linear-gradient(90deg, rgba(255, 85, 83, 0.25) 0%, rgba(255, 85, 83, 0.1) 20%, transparent 80%);
}

.radio-input:checked+.option-item .radio-text {
  color: #fff;
  font-weight: 600;
}

/* Selected state for the point */
.radio-input:checked+.option-item .radio-custom {
  border-color: var(--twow-coral);
  transform: scale(0.95);
}

.radio-input:checked+.option-item .radio-custom::before {
  transform: scale(1);
  background-color: var(--twow-coral);
}

.radio-input:checked+.option-item .radio-custom::after {
  opacity: 1;
  transform: scale(1.2);
  animation: orbit 2.5s infinite linear;
  box-shadow:
    0 0 15px var(--twow-coral),
    0 0 30px rgba(255, 85, 83, 0.2);
}

.chrome-border-dynamic {
  position: relative;
  background:
    linear-gradient(rgba(5, 5, 8, 0.95), rgba(5, 5, 8, 0.95)) padding-box,
    linear-gradient(115deg, var(--twow-coral), var(--twow-blue), var(--twow-yellow), var(--twow-pink), var(--twow-coral)) border-box !important;
  border: 1.5px solid transparent !important;
  border-radius: 0;
  overflow: visible;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 85, 83, 0.15);
  background-size: 300% 300% !important;
  animation: chromeRotate 4s linear infinite;
  transition: transform 0.4s var(--anim-spring), box-shadow 0.4s ease;
}

.chrome-border-dynamic:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(255, 85, 83, 0.25);
}

@keyframes chromeRotate {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

/* Ensure selected state doesn't break the chrome border */
.radio-input:checked+.option-item.chrome-border-dynamic {
  background:
    linear-gradient(#050505, #050505) padding-box,
    linear-gradient(115deg, var(--twow-coral), var(--twow-blue), var(--twow-yellow), var(--twow-pink), var(--twow-coral)) border-box !important;
}

/* ── Buttons ───────────────────────────────────── */
.btn-primary {
  display: block;
  width: 100%;
  margin-top: 40px;
  padding: 0 32px;
  height: 64px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-family: var(--font);
  background: linear-gradient(135deg, #FF5553 0%, #E63946 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--anim-standard) var(--anim-spring), background var(--anim-standard);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.btn-primary:not(:disabled):hover::after {
  left: 100%;
}

.btn-primary:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-primary:not(:disabled):hover {
  transform: translateY(-4px);
}

/* ── Submit button — Bebas Neue override ── */
#submit-btn {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.btn-primary:not(:disabled):active {
  transform: scale(0.97);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--anim-fast);
  backdrop-filter: blur(10px);
}

@media (max-width: 480px) {
  .btn-primary {
    height: 56px;
    font-size: 16px;
  }

  .btn-secondary {
    width: 100%;
  }
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: translateY(-2px);
}

/* ── Input Invalid ──────────────────────────────── */
.input-invalid {
  border-color: var(--color-error) !important;
}

/* ── Validation Error ──────────────────────────── */
.validation-error {
  color: var(--color-error);
  font-size: 14px;
  font-weight: 500;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255, 85, 83, 0.1);
  border-left: 3px solid var(--color-error);
  border-radius: 4px;
  animation: fadeInUp var(--anim-fast) forwards;
}

/* ---- Consent block (privacy + newsletter) ---- */
.consent-block {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .checkbox-row {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

.consent-intro {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: 2px;
}

/* New custom checkbox style from Uiverse.io - Adapted for TWOW */
.checkbox-wrapper-46 {
  display: inline-block;
}

.checkbox-wrapper-46 .inp-cbx {
  /* Visually hidden but keyboard-accessible (WCAG 2.4.3) */
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.checkbox-wrapper-46 .cbx {
  margin: auto;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.checkbox-wrapper-46 .cbx span {
  display: inline-block;
  vertical-align: middle;
  transform: translate3d(0, 0, 0);
}

.checkbox-wrapper-46 .cbx span:first-child {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  transform: scale(1);
  vertical-align: middle;
  border: 1.5px solid var(--color-border-mid);
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.checkbox-wrapper-46 .cbx span:first-child svg {
  position: absolute;
  top: 4px;
  left: 3px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 16px;
  stroke-dashoffset: 16px;
  transition: all 0.3s ease;
  transition-delay: 0.1s;
  transform: translate3d(0, 0, 0);
}

.checkbox-wrapper-46 .cbx span:first-child:before {
  content: "";
  width: 100%;
  height: 100%;
  background: var(--twow-coral);
  display: block;
  transform: scale(0);
  opacity: 1;
  border-radius: 50%;
}

.checkbox-wrapper-46 .cbx span:last-child {
  padding-left: 10px;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.4;
}

.checkbox-wrapper-46 .cbx span:last-child a {
  color: var(--twow-coral);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checkbox-wrapper-46 .cbx:hover span:first-child {
  border-color: var(--twow-coral);
  box-shadow: 0 0 10px rgba(255, 85, 83, 0.2);
}

/* Focus ring for keyboard users on hidden checkbox */
.checkbox-wrapper-46 .inp-cbx:focus-visible+.cbx span:first-child {
  outline: 2px solid var(--twow-coral);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(255, 85, 83, 0.2);
}

.checkbox-wrapper-46 .inp-cbx:checked+.cbx span:first-child {
  background: var(--twow-coral);
  border-color: var(--twow-coral);
  animation: wave-46 0.4s ease;
  box-shadow: 0 0 15px rgba(255, 85, 83, 0.4);
}

.checkbox-wrapper-46 .inp-cbx:checked+.cbx span:first-child svg {
  stroke-dashoffset: 0;
}

.checkbox-wrapper-46 .inp-cbx:checked+.cbx span:first-child:before {
  transform: scale(3.5);
  opacity: 0;
  transition: all 0.6s ease;
}

@keyframes wave-46 {
  50% {
    transform: scale(0.9);
  }
}

/* ---- End consent block ---- */

.loading-msg {
  color: var(--color-muted);
  font-size: 15px;
  text-align: center;
  padding: 40px 0;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* ── Animation Keyframes ───────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dotPulse {

  0%,
  70%,
  100% {
    box-shadow: none;
  }
}

@keyframes scaleInSpring {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }

  60% {
    opacity: 1;
    transform: scale(1.1);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Result section reveal */
.results-reveal {
  animation: fadeInUp var(--anim-reveal) var(--anim-spring) both;
}

/* ── Result Cards ──────────────────────────────── */
.result-card,
.compass-card,
.cta-section {
  background: rgba(10, 10, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 24px;
  transition: all var(--anim-standard) var(--anim-ease-out);
  position: relative;
}

/* Stunning Card Hover State */
.result-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.3);
}

.compass-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.result-card::before,
.compass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius);
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%, rgba(255, 85, 83, 0.3) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0.15;
  /* Base level of shimmer */
  transition: opacity var(--anim-standard);
  pointer-events: none;
}

.result-card:hover::before,
.compass-card:hover::before {
  opacity: 1;
}

.card-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted-light);
  margin-bottom: 24px;
  opacity: 0.8;
}

.sfida-ampio {
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-muted-light);
  opacity: 0.85;
  margin-top: -8px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.client-card h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 64px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #ddddd9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.client-card p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 36px;
  line-height: 1.6;
  font-weight: 400;
}

/* ── Split Bar ─────────────────────────────────── */
.split-bar-wrapper {
  margin-bottom: 40px;
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  /* Reduced on mobile */
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
  .split-bar-wrapper {
    padding: 24px;
  }
}

.split-bar {
  display: flex;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #000;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s ease, filter 0.3s ease;
  letter-spacing: 0.02em;
  cursor: pointer;
  transform-origin: center;
  white-space: nowrap;
  overflow: hidden;
}

.bar-segment span {
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

.bar-segment:hover {
  transform: scaleY(1.3);
  filter: brightness(1.2);
  z-index: 10;
}

.split-bar:hover .bar-segment:not(:hover) {
  filter: brightness(0.6) grayscale(0.5);
}

.branding-bar {
  background: linear-gradient(135deg, var(--twow-blue) 0%, #2a6f7f 100%);
}

.performance-bar {
  background: linear-gradient(135deg, var(--twow-coral) 0%, #E63946 100%);
}

.split-legend {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.branding-dot {
  background: var(--color-branding);
  color: var(--color-branding);
}

.hybrid-dot {
  background: var(--twow-green);
  color: var(--twow-green);
}

.performance-dot {
  background: var(--color-performance);
  color: var(--color-performance);
}

/* ── Pie Chart ────────────────────────────────── */
.pie-chart-wrapper {
  margin: 16px auto 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.pie-chart-svg {
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.5));
  overflow: visible;
  transition: transform 0.6s var(--anim-spring);
}

.pie-chart-svg:hover {
  transform: scale(1.02);
}

.pie-segment {
  cursor: pointer;
  transition: all 0.4s var(--anim-spring);
  stroke: rgba(0, 0, 0, 0.15);
  stroke-width: 1;
  transform-origin: center;
}

.pie-segment:hover {
  filter: brightness(1.2) saturate(1.2);
  transform: scale(1.05);
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 2;
  z-index: 10;
}

.pie-chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.pie-chart-legend .legend-item {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: all 0.3s ease;
  padding: 4px 8px;
  border-radius: 4px;
}

.pie-chart-legend .legend-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.pie-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.08em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s var(--anim-spring);
  z-index: 9999;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.pie-tooltip.is-visible {
  opacity: 1;
}

.pie-center-text {
  pointer-events: none;
  font-family: var(--font-display);
  font-size: 11px;
  fill: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  user-select: none;
}

/* ── Objectives ────────────────────────────────── */
.objectives-block h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--twow-blue);
  margin-bottom: 16px;
}

.objectives-block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.objectives-block li {
  font-size: 16px;
  line-height: 1.6;
  padding: 16px 20px 16px 44px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  color: rgba(255, 255, 255, 0.9);
  transition: all var(--anim-fast) var(--anim-spring);
  cursor: default;
}

.objectives-block li:hover {
  transform: translateX(8px);
  background: rgba(255, 85, 83, 0.05);
  /* Soft coral bg */
  border-color: rgba(255, 85, 83, 0.3);
  color: #fff;
}

.objectives-block li::before {
  content: "→";
  position: absolute;
  left: 16px;
  top: 16px;
  color: var(--twow-coral);
  font-weight: 700;
  font-size: 18px;
  transition: all var(--anim-fast);
}

.objectives-block li:hover::before {
  transform: translateX(4px);
}

/* ── Insights Block ────────────────────────────── */
.insight-block {
  margin-bottom: 32px;
}

.insight-block:last-child {
  margin-bottom: 0;
}

.insight-block h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted-light);
  margin-bottom: 24px;
}

.channel-group {
  margin-bottom: 16px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  transition: all var(--anim-standard);
  position: relative;
}

.channel-group:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.channel-category-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  opacity: 0.9;
}

.hybrid-dot {
  background: #22C55E;
  color: #22C55E;
}

.channel-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel-content li {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  padding-left: 20px;
  position: relative;
}

.channel-content li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--twow-coral);
  font-weight: 700;
  font-size: 16px;
}

.channel-content p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
  margin: 0;
}

.budget-rationale {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  border-left: 4px solid var(--twow-blue);
  padding: 12px 16px;
  background: rgba(58, 149, 170, 0.1);
  border-radius: 0 8px 8px 0;
}

/* ── Budget Assessment ────────────────────────── */
.budget-assessment {
  padding: 16px;
  /* Reduced on mobile */
  border-radius: var(--radius-sm);
  margin-bottom: 32px;
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.3);
  transition: all var(--anim-standard);
  cursor: default;
}

@media (min-width: 768px) {
  .budget-assessment {
    padding: 24px;
  }
}

.budget-assessment:hover {
  transform: translateY(-2px);
}

.budget-status-text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}

.budget-status-positive {
  background: rgba(84, 137, 106, 0.1);
  border-color: rgba(84, 137, 106, 0.3);
}

.budget-status-positive .budget-status-text {
  color: #8fcca5;
}

.budget-status-negative {
  background: rgba(255, 85, 83, 0.1);
  border-color: rgba(255, 85, 83, 0.3);
}

.budget-status-negative .budget-status-text {
  color: #ffa1a0;
}

/* ── Compass Matrix ────────────────────────────── */
.compass-card {
  text-align: center;
  overflow: hidden;
  /* Ensure glow stays within bounds if needed */
}

.compass-svg {
  width: min(540px, 100%);
  aspect-ratio: 1;
  height: auto;
  display: block;
  margin: 0 auto;
  transition: none;
  shape-rendering: geometricPrecision;
}

/* Removed hover glow to keep matrix static */

.compass-svg .compass-border {
  fill: none !important;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.5;
}

.compass-svg .compass-divider {
  stroke: rgba(255, 255, 255, 0.15) !important;
}

.compass-svg .axis-x {
  fill: var(--color-mkt-pot);
  font-family: var(--font);
}

.compass-svg .axis-y {
  fill: var(--color-brand-mat);
  font-family: var(--font);
}

/* SVG Text rendering fixes */
.compass-svg text {
  font-family: var(--font-display) !important;
  pointer-events: none;
  user-select: none;
}

.axis-label-premium {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
}

.compass-svg .brand-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: scaleInSpring 0.8s var(--anim-spring) both, dotPulse 2.5s infinite 1s;
  animation-delay: 0.65s, 0s;
}

/* ── Email teaser block ─────────────────────────── */
.email-teaser-block {
  background: rgba(10, 10, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 24px;
  text-align: center;
}

.email-teaser-text {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.4;
}

.email-teaser-subtext {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.6;
}

/* ── CTA Row (two boxes side by side) ──────────── */
.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 767px) {
  .cta-row {
    grid-template-columns: 1fr;
  }
}

/* ── CTA Section ─────────────────────────────── */
.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: radial-gradient(circle at center, rgba(255, 85, 83, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.cta-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: #fff;
  position: relative;
}

.cta-copy {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* ── CTA box inside the two-column row: smaller, compact ── */
.cta-row .cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 32px;
}

.cta-row .cta-headline {
  font-size: clamp(20px, 2.4vw, 28px);
  margin-bottom: 12px;
  line-height: 1.15;
}

.cta-row .cta-copy {
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.cta-row .btn-cta {
  height: 52px;
  padding: 0 32px;
  font-size: 15px;
  width: 100%;
}

.cta-email {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.06em;
  color: #fff;
  margin: 0;
  position: relative;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  height: 60px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  background: linear-gradient(135deg, #FF5553 0%, #E63946 100%);
  color: #fff;
  border: none;
  outline: none;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform var(--anim-standard) var(--anim-spring), background var(--anim-standard);
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.btn-cta:hover {
  transform: translateY(-4px);
}

.btn-cta:active {
  transform: translateY(0) scale(0.97);
}

.btn-cta--secondary {
  background: rgba(10, 10, 12, 0.9);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cta--secondary:hover {
  background: rgba(25, 25, 28, 0.92);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-cta--secondary:active {
  box-shadow: none;
}

/* ── Email Picker Modal ─────────────────────────── */
#email-picker-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.email-picker {
  position: relative;
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 36px 32px 28px;
  width: min(380px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.email-picker__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.email-picker__close:hover {
  color: #fff;
}

.email-picker__title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.05em;
  color: #fff;
  margin: 0;
  text-align: center;
}

.email-picker__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.email-picker__option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s;
}

.email-picker__option:hover {
  background: rgba(255, 85, 83, 0.15);
  border-color: rgba(255, 85, 83, 0.5);
}

/* ── Responsive ────────────────────────────────── */
@media (min-width: 768px) {

  .result-card,
  .compass-card,
  .cta-section {
    padding: 48px;
  }
}

@media (max-width: 767px) {

  .result-card,
  .compass-card,
  .cta-section {
    padding: 24px;
    /* Reduced for mobile */
  }

  .card-label {
    font-size: 13px;
    letter-spacing: 0.1em;
  }

  .compass-card .card-label {
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 0.15em;
  }

  .bar-segment {
    font-size: 10.5px;
    white-space: normal;
    line-height: 1.1;
    text-align: center;
  }

  .bar-segment span {
    white-space: normal;
    overflow: visible;
  }

  .client-card p {
    font-size: 16px;
  }

  .objectives-block li {
    font-size: 14px;
    padding: 12px 16px 12px 36px;
  }

  .objectives-block li::before {
    left: 12px;
    top: 12px;
    font-size: 16px;
  }

  .channel-group p {
    font-size: 14px;
  }

  .budget-status-text {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .glow {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════
   GLOW-UP UI — Aggiunte accessibilità e stile TWOW
   ═══════════════════════════════════════════════════ */

/* ── Focus-visible per tutti i bottoni (WCAG 2.4.11) ── */
.btn-primary:focus-visible,
.btn-cta:focus-visible,
.btn-nav:focus-visible,
.btn-secondary:focus-visible,
.btn-scan-cta:focus-visible {
  outline: 2px solid var(--twow-coral);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(255, 85, 83, 0.18);
}

/* ── Compact input focus ring ── */
.compact-input:focus {
  box-shadow: 0 0 0 3px rgba(255, 85, 83, 0.2);
  outline: none;
}

/* ── Quiz progress bar (totale, sopra roadmap) ── */
.quiz-progress-header {
  display: none;
}

.quiz-progress-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.quiz-progress-bar-wrap {
  display: none;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--twow-coral) 0%, var(--twow-blue) 100%);
  border-radius: 99px;
  transition: width 0.4s var(--anim-ease-out);
  width: 0%;
}

/* ── Staggered entrance per le result card ── */
#results-section.results-reveal>* {
  opacity: 0;
  animation: fadeInUp 0.55s var(--anim-ease-out) forwards;
}

#results-section.results-reveal>*:nth-child(1) {
  animation-delay: 0.08s;
}

#results-section.results-reveal>*:nth-child(2) {
  animation-delay: 0.22s;
}

#results-section.results-reveal>*:nth-child(3) {
  animation-delay: 0.38s;
}

#results-section.results-reveal>*:nth-child(4) {
  animation-delay: 0.52s;
}

#results-section.results-reveal>*:nth-child(5) {
  animation-delay: 0.66s;
}

/* ── CTA card glow ambient differenziato ── */
.cta-row .cta-section:first-child {
  box-shadow: inset 0 0 48px rgba(255, 85, 83, 0.06);
}

.cta-row .cta-section:last-child {
  box-shadow: inset 0 0 48px rgba(58, 149, 170, 0.06);
}

/* ── Option item hover enhancement ── */
.option-item:hover {
  background: linear-gradient(90deg, rgba(255, 85, 83, 0.06) 0%, transparent 60%) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.option-item:hover .radio-text {
  color: rgba(255, 255, 255, 0.95);
}

/* ── Roadmap step numero (label interna) ── */
.roadmap-step-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0);
  pointer-events: none;
  transition: color 0.3s;
  line-height: 1;
  user-select: none;
}

.roadmap-step.completed .roadmap-step-num {
  color: rgba(255, 255, 255, 0);
  /* hidden — mostra solo ✓ via ::after */
}

/* ── Keyboard shortcut hint nel quiz ── */
.quiz-kbd-hint {
  display: none;
}

.quiz-kbd-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font);
}

@media (hover: none) {
  .quiz-kbd-hint {
    display: none;
  }

  /* Nascondi su touch device */
}

/* ─────────────────────────────────────────────────
   URL-FIRST SCAN FEATURE
   ───────────────────────────────────────────────── */

/* URL row: input + scan button side by side */
.url-scan-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.url-scan-row input {
  flex: 1;
  min-width: 0;
}

/* Scan button */
.btn-scan {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  background: var(--twow-blue, #3A95AA);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm, 8px);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.1s ease, opacity 0.25s ease;
  flex-shrink: 0;
}

.btn-scan:hover {
  background: #2f7d93;
  transform: translateY(-1px);
}

.btn-scan:active {
  transform: translateY(0);
}

.scan-btn-icon {
  font-size: 15px;
  opacity: 0.9;
  animation: spin-hex 3s linear infinite;
}

@keyframes spin-hex {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ── Scan overlay ─────────────────────────────── */

.scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  /*background: rgba(10, 10, 20, 0.72); */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.scan-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: rgba(14, 14, 18, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 40px 32px;
  max-width: 540px;
  width: 90%;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  margin: 0 20px;
}

/* Branded Scan Animation — TWOW adaptation */
.twow-loader-container {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.twow-loader {
  max-width: 100%;
  color: #fff;
  font-size: clamp(32px, 8vw, 58px);
  /* Reduced size to better fit long names */
  font-family: var(--font-display);
  position: relative;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.1;
  user-select: none;
  text-align: center;
  white-space: nowrap;
  /* Force single line */
  overflow: visible;
}

.twow-loader span {
  display: block;
  animation: twow-cut 3s infinite ease-in-out;
}

.twow-loader::after {
  position: absolute;
  content: "";
  width: 110%;
  height: 12px;
  border-radius: 6px;
  background-color: var(--twow-coral);
  top: 0px;
  filter: blur(15px);
  animation: twow-scan 3s infinite ease-in-out;
  left: -5%;
  z-index: 0;
  opacity: 0.7;
}

.twow-loader::before {
  position: absolute;
  content: "";
  width: 110%;
  height: 4px;
  border-radius: 2px;
  background-color: var(--twow-coral);
  top: 0px;
  animation: twow-scan 3s infinite ease-in-out;
  left: -5%;
  z-index: 1;
  box-shadow: 0 0 25px var(--twow-coral), 0 0 10px #fff;
}

@keyframes twow-scan {

  0%,
  100% {
    top: -2%;
  }

  50% {
    top: 102%;
  }
}

@keyframes twow-cut {

  0%,
  100% {
    clip-path: inset(0 0 0 0);
  }

  20% {
    clip-path: inset(100% 0 0 0);
  }

  50% {
    clip-path: inset(0 0 0 0);
  }

  70% {
    clip-path: inset(0 0 100% 0);
  }
}

/* Status texts */
.scan-status-text {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  text-align: center;
  letter-spacing: 0.01em;
}

.scan-phase {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  text-align: center;
  transition: opacity 0.3s ease;
  min-height: 18px;
}

/* Progress bar */
.scan-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}

.scan-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--twow-blue, #3A95AA), #6ecfe3);
  border-radius: 99px;
  transition: width 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Pre-filled question styling ─────────────────── */

.question-prefilled {
  border-left: 3px solid var(--twow-blue, #3A95AA) !important;
}

/* Risposta auto-rilevata selezionata: bordino blue invece del coral standard */
.option-item.prefilled-option:has(input[type="radio"]:checked) label {
  border-color: var(--twow-blue, #3A95AA);
  background: rgba(58, 149, 170, 0.10);
}

.option-item.prefilled-option:has(input[type="radio"]:checked) label::before {
  border-color: var(--twow-blue, #3A95AA);
  background: var(--twow-blue, #3A95AA);
}

.prefill-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--twow-blue, #3A95AA);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 99px;
  vertical-align: middle;
  line-height: 1.5;
  white-space: nowrap;
}

/* ── Mobile adjustments ──────────────────────────── */

@media (max-width: 480px) {
  .scan-modal {
    padding: 36px 28px 32px;
  }

  /* Bug #1 fix: nome cliente più grande e wrappabile su mobile */
  .twow-loader {
    font-size: clamp(40px, 12vw, 58px);
    white-space: normal;
    line-height: 1.15;
    word-break: break-word;
  }

  .btn-scan .scan-btn-text {
    display: none;
  }

  .btn-scan {
    padding: 0 14px;
  }
}

/* Branded Loader Pulsing */
.twow-loader-container {
  animation: loaderContainerPulse 3s infinite ease-in-out;
}

@keyframes loaderContainerPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

.twow-scan-modal .scan-progress-fill {
  background: linear-gradient(90deg, var(--twow-blue), var(--twow-coral));
}

/* Register color vars as typed so keyframe interpolation works (smooth fade) */
@property --color-one {
  syntax: '<color>';
  inherits: true;
  initial-value: #3A95AA;
}
@property --color-two {
  syntax: '<color>';
  inherits: true;
  initial-value: #2d7a8c;
}
@property --color-three {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(58, 149, 170, 0.5);
}
@property --color-four {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(45, 122, 140, 0.5);
}
@property --color-five {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(58, 149, 170, 0.25);
}

/* ── Final Result Loader (Uiverse Adaptation) ── */
.twow-final-loader {
  /* Colors are synced with the body background cycle */
  --color-one: #ffbf48;
  --color-two: #be4a1d;
  --color-three: rgba(255, 191, 72, 0.5);
  --color-four: rgba(190, 74, 29, 0.5);
  --color-five: rgba(255, 191, 72, 0.25);

  --time-animation: 2s;
  --size: 1.1;
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  transform: scale(var(--size));
  box-shadow:
    0 0 25px 0 var(--color-three),
    0 20px 50px 0 var(--color-four);

  /* Smooth fade cycle through colors */
  animation: final-loader-theme-cycle 4s ease-in-out infinite;
}

.twow-final-loader::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border-top: solid 1px var(--color-one);
  border-bottom: solid 1px var(--color-two);
  background: linear-gradient(180deg, var(--color-five), var(--color-four));
  box-shadow:
    inset 0 10px 10px 0 var(--color-three),
    inset 0 -10px 10px 0 var(--color-four);
}

.twow-final-loader .box {
  width: 100px;
  height: 100px;
  background: linear-gradient(180deg,
      var(--color-one) 30%,
      var(--color-two) 70%);
  mask: url(#clipping);
  -webkit-mask: url(#clipping);
}

.twow-final-loader svg {
  position: absolute;
}

.twow-final-loader svg #clipping {
  filter: contrast(15);
  animation: roundness calc(var(--time-animation) / 2) linear infinite;
}

.twow-final-loader svg #clipping polygon {
  filter: blur(7px);
}

.twow-final-loader svg #clipping polygon:nth-child(1) {
  transform-origin: 75% 25%;
  transform: rotate(90deg);
}

.twow-final-loader svg #clipping polygon:nth-child(2) {
  transform-origin: 50% 50%;
  animation: rotation var(--time-animation) linear infinite reverse;
}

.twow-final-loader svg #clipping polygon:nth-child(3) {
  transform-origin: 50% 60%;
  animation: rotation var(--time-animation) linear infinite;
  animation-delay: calc(var(--time-animation) / -3);
}

.twow-final-loader svg #clipping polygon:nth-child(4) {
  transform-origin: 40% 40%;
  animation: rotation var(--time-animation) linear infinite reverse;
}

.twow-final-loader svg #clipping polygon:nth-child(5) {
  transform-origin: 40% 40%;
  animation: rotation var(--time-animation) linear infinite reverse;
  animation-delay: calc(var(--time-animation) / -2);
}

.twow-final-loader svg #clipping polygon:nth-child(6) {
  transform-origin: 60% 40%;
  animation: rotation var(--time-animation) linear infinite;
}

.twow-final-loader svg #clipping polygon:nth-child(7) {
  transform-origin: 60% 40%;
  animation: rotation var(--time-animation) linear infinite;
  animation-delay: calc(var(--time-animation) / -1.5);
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes roundness {

  0%,
  60%,
  100% {
    filter: contrast(15);
  }

  20%,
  40% {
    filter: contrast(3);
  }
}

@keyframes final-loader-theme-cycle {

  /* Smooth fade between 5 colors */
  0%,
  100% {
    --color-one: #3A95AA;
    --color-two: #2d7a8c;
    --color-three: rgba(58, 149, 170, 0.5);
    --color-four: rgba(45, 122, 140, 0.5);
    --color-five: rgba(58, 149, 170, 0.25);
  }

  20% {
    --color-one: #54896A;
    --color-two: #426e54;
    --color-three: rgba(84, 137, 106, 0.5);
    --color-four: rgba(66, 110, 84, 0.5);
    --color-five: rgba(84, 137, 106, 0.25);
  }

  40% {
    --color-one: #A45560;
    --color-two: #83444d;
    --color-three: rgba(164, 85, 96, 0.5);
    --color-four: rgba(131, 68, 77, 0.5);
    --color-five: rgba(164, 85, 96, 0.25);
  }

  60% {
    --color-one: #FF95A4;
    --color-two: #e07f8d;
    --color-three: rgba(255, 149, 164, 0.5);
    --color-four: rgba(224, 127, 141, 0.5);
    --color-five: rgba(255, 149, 164, 0.25);
  }

  80% {
    --color-one: #FFEA8D;
    --color-two: #e2cf7d;
    --color-three: rgba(255, 234, 141, 0.5);
    --color-four: rgba(226, 207, 125, 0.5);
    --color-five: rgba(255, 234, 141, 0.25);
  }
}

/* ── URL First Hero ── */
.hero-url-container {
  margin: 20px 0 32px;
  text-align: center;
}

.hero-url-label {
  display: block;
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 24px;
}

.hero-url-wrapper {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  z-index: 2;
}

.hero-url-input {
  width: 100%;
  height: 80px;
  background: rgba(20, 20, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 40px;
  font-size: 24px;
  color: #fff;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  font-family: var(--font);
}

@media (max-width: 480px) {
  .hero-url-input {
    height: 52px !important;
    /* Reduced from 64px */
    font-size: 16px !important;
    /* Reduced from 18px */
    border-radius: 26px !important;
  }

  .hero-url-label {
    font-size: 16px !important;
    /* Added smaller font for mobile */
    margin-bottom: 12px !important;
  }
}

.hero-url-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.hero-url-input:focus {
  border-color: var(--twow-coral);
  box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 85, 83, 0.3);
}

/* Subtle glow behind the input */
.hero-url-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(58, 149, 170, 0.4) 0%, rgba(255, 85, 83, 0.2) 50%, transparent 80%);
  filter: blur(40px);
  z-index: -1;
  opacity: 0.5;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.hero-url-input:focus~.hero-url-glow {
  opacity: 1;
}

/* ── Compact User Details ── */
.compact-fields-container {
  margin-bottom: 24px;
  background: rgba(10, 10, 15, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.compact-fields-row {
  display: flex;
  gap: 12px;
  flex-direction: column;
}

@media (min-width: 768px) {
  .compact-fields-row {
    flex-direction: row;
  }
}

.compact-input {
  flex: 1;
  height: 48px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-text);
  font-size: 15px;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.3s;
}

/* BUG 1: prevent iOS Safari auto-zoom on focus (requires font-size >= 16px) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {

  .compact-input,
  #step-start .compact-input {
    font-size: 16px;
  }
}

.compact-input:focus {
  border-bottom-color: var(--twow-coral);
}

.compact-input.input-invalid {
  border-bottom-color: var(--color-error) !important;
}

/* ── Field wrapper con label-placeholder e asterisco corallo ── */
.compact-field-wrap {
  position: relative;
  flex: 1;
}

.compact-field-wrap .compact-input {
  width: 100%;
}

.field-float-label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(255, 255, 255, 0.38);
  font-size: 15px;
  transition: opacity 0.15s;
}

.compact-input:focus~.field-float-label,
.compact-input:not(:placeholder-shown)~.field-float-label {
  opacity: 0;
}

.field-star {
  color: #FF5553;
}

/* ── CTA Scanglow ── */
.btn-scanglow {
  height: 72px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.05em;
  border-radius: 36px;
  background: linear-gradient(135deg, var(--twow-coral) 0%, var(--twow-pink) 100%);
  color: #000;
  box-shadow: 0 8px 30px rgba(255, 85, 83, 0.3);
  position: relative;
  overflow: visible;
  margin-top: 32px;
}

.btn-scanglow::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 40px;
  background: linear-gradient(90deg, var(--twow-coral), var(--twow-blue), var(--twow-yellow), var(--twow-coral));
  background-size: 300% 100%;
  z-index: -1;
  filter: blur(15px);
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: bgPan 4s linear infinite;
}

.btn-scanglow:not(:disabled):hover::before {
  opacity: 0.8;
}

@keyframes bgPan {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

/* ── CTA Scan — Giallo TWOW pill button ── */
.btn-scan-cta {
  display: flex;
  width: auto;
  height: 64px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--twow-yellow);
  border-radius: 30px;
  color: #131313;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  box-shadow: 5px 5px 20px rgba(255, 234, 141, 0.25);
  padding: 0 40px 0 32px;
  margin: 36px auto 0;
  overflow: visible;
  transition: background-color 0.5s, box-shadow 0.5s;
}

/* Disabilita shimmer ereditato da .btn-primary */
.btn-scan-cta::after {
  display: none;
}

.btn-scan-icon {
  height: 28px;
  width: 28px;
  flex-shrink: 0;
  transition: transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-scan-cta:not(:disabled):hover {
  background: #ffe56a;
  box-shadow: 5px 5px 28px rgba(255, 234, 141, 0.5);
  transform: none;
}

.btn-scan-cta:not(:disabled):hover .btn-scan-icon {
  transform: rotate(250deg);
}

.btn-scan-cta:not(:disabled):active {
  transform: scale(0.97);
}

#step-start .btn-scan-cta:not(:disabled) {
  box-shadow: 5px 5px 28px rgba(255, 234, 141, 0.4);
}

/* BUG 4: full-width CTA on narrow mobile screens */
@media only screen and (max-width: 480px) {
  .btn-scan-cta {
    width: 100%;
  }
}

/* ══════════════════════════════════════════════════
   START STEP — LIQUID GLASS REDESIGN
   Card traslucida che lascia trasparire lo sfondo
   animato. Niente bianco. Tutto viene dal colore.
   ══════════════════════════════════════════════════ */

#step-start {
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 40px 40px 36px;
  position: relative;
}

@media (max-width: 767px) {
  #step-start {
    padding: 28px 20px 28px;
    border-radius: 20px;
  }
}

/* ── Hero URL label ── */
#step-start .hero-url-label {
  color: rgba(255, 255, 255, 0.95);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

/* ── Hero URL container ── */
#step-start .hero-url-container {
  margin: 0 0 32px;
}

@keyframes urlBorderScan {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 300% 50%;
  }
}

#step-start .hero-url-wrapper {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#step-start .hero-url-wrapper:focus-within {
  transform: scale(1.025);
}

/* ── Border Magic: Animated only on the border path ── */
#step-start .hero-url-wrapper::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 44px;
  background: linear-gradient(90deg, var(--twow-coral), var(--twow-blue), var(--twow-yellow), var(--twow-pink), var(--twow-coral));
  background-size: 300% 100%;
  animation: urlBorderScan 3.5s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 2px;
  pointer-events: none;
  z-index: 1;
}

#step-start .hero-url-input {
  height: 84px;
  font-size: 22px;
  color: #fff;
  text-align: center;
  font-family: var(--font);
  border-radius: 42px;
  border: none;
  background: rgba(10, 10, 15, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 40px rgba(255, 85, 83, 0.12), inset 0 2px 20px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.4s;
  outline: none;
  width: 100%;
  padding: 0 24px;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  z-index: 2;
}

#step-start .hero-url-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

#step-start .hero-url-input:focus {
  box-shadow: 0 0 60px rgba(255, 85, 83, 0.28), inset 0 2px 20px rgba(0, 0, 0, 0.45);
}

/* Glow attivo sul vetro */
#step-start .hero-url-glow {
  display: block;
  background: radial-gradient(circle, rgba(58, 149, 170, 0.5) 0%, rgba(255, 85, 83, 0.25) 50%, transparent 80%);
  opacity: 0.45;
  transition: opacity 0.5s ease;
  z-index: 0;
}

#step-start .hero-url-input:focus~.hero-url-glow {
  opacity: 0.85;
}

/* ── Compact fields: etichetta campi obbligatori ── */
#step-start .compact-fields-container {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 16px 16px 20px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  margin-bottom: 16px;
}

/* Badge "* Campi obbligatori" sopra le righe */
#step-start .compact-fields-container::before {
  content: '* Campi obbligatori';
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--twow-coral);
  margin-bottom: 14px;
  opacity: 0.9;
}

/* ── Compact inputs: full border, evidenziati ── */
#step-start .compact-input {
  height: 50px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

#step-start .compact-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

#step-start .compact-input:focus {
  border-color: var(--twow-coral);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 0 0 3px rgba(255, 85, 83, 0.2);
}

#step-start .compact-input.input-invalid {
  border-color: var(--color-error) !important;
  box-shadow: 0 0 0 3px rgba(255, 85, 83, 0.25) !important;
}

/* ── Consent block: privacy row evidenziata ── */
#step-start .consent-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  margin-top: 14px;
  padding: 16px 20px;
  gap: 10px;
}

/* Privacy Policy row: nessun bordo evidenziato */
#step-start .consent-block .checkbox-row {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

#step-start .consent-intro {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 2px;
}

#step-start .checkbox-label {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13.5px;
}

#step-start .checkbox-label input[type="checkbox"] {
  border-color: rgba(255, 255, 255, 0.3);
}

#step-start .checkbox-label a {
  color: var(--twow-coral);
}

/* ── Validation error ── */
#step-start .validation-error {
  background: rgba(255, 85, 83, 0.1);
  border-left-color: var(--color-error);
  color: #ff8583;
}

/* ── Button disabled su vetro ── */
#step-start .btn-primary:disabled {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: not-allowed;
}

/* ── CTA glow su vetro ── */
#step-start .btn-scanglow:not(:disabled) {
  box-shadow: 0 8px 32px rgba(255, 85, 83, 0.45);
}

/* ── Prefill Badge & Tooltip ── */
/* ── Prefill Badge & 3D Glassmorphic Tooltip ── */

.prefill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
  padding: 6px 10px 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  animation: badgeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  z-index: 10;
  user-select: none;
}

.badge-info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
}

/* Expanded tap target for mobile without affecting visual size */
@media (max-width: 900px) {
  .badge-info-icon::after {
    content: '';
    position: absolute;
    inset: -14px;
  }
}

.prefill-badge:hover .badge-info-icon,
.prefill-badge:focus-within .badge-info-icon {
  background: #fff;
  color: var(--twow-coral);
  transform: rotate(360deg);
}

@keyframes badgeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.prefill-badge:hover,
.prefill-badge:focus-within {
  background: linear-gradient(135deg, var(--twow-coral), var(--twow-pink));
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 85, 83, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Tooltip — 3D Glassmorphic Style by Kelvin (Adapted for TWOW) */
.prefill-tooltip {
  position: absolute;
  bottom: 140%;
  right: -20px;
  width: 320px;
  /* Slightly wider */
  background: rgba(18, 18, 22, 0.94);
  /* Increased opacity and darker for better legibility */
  color: #fff;
  padding: 20px 24px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.7),
    inset 0 0 15px rgba(255, 255, 255, 0.05);
  white-space: normal;
  word-wrap: break-word;
  visibility: hidden;
  opacity: 0;
  transform: translateY(15px) scale(0.95);
  transition: opacity 0.4s var(--anim-ease-out), transform 0.4s var(--anim-spring), visibility 0.4s;
  z-index: 100;
  pointer-events: none;
}

/* Tooltip Arrow */
.prefill-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 40px;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #121216;
  /* Solid color to prevent blending issues */
  filter: drop-shadow(0px 4px 6px rgba(0, 0, 0, 0.5));
  z-index: 101;
}

.prefill-badge:hover .prefill-tooltip,
.prefill-badge:focus-within .prefill-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(-5px) scale(1);
  pointer-events: auto;
}

/* 3D Reflection Effect on Tooltip */
.prefill-tooltip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

/* Mobile: tooltip embedded nascosto — gestito dal portal JS */
@media (max-width: 900px) {

  .prefill-badge:hover .prefill-tooltip,
  .prefill-badge:focus-within .prefill-tooltip {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
}

/* Portal tooltip — appeso al body, bypassa backdrop-filter stacking context */
#insight-tooltip-portal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -45%) scale(0.95);
  width: calc(100vw - 48px);
  max-width: 360px;
  background: rgba(14, 14, 18, 0.95);
  color: #fff;
  padding: 20px 24px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), inset 0 0 15px rgba(255, 255, 255, 0.05);
  word-wrap: break-word;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  z-index: 99999;
  pointer-events: none;
}

#insight-tooltip-portal.is-active {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

/* Portal solo mobile — su desktop il tooltip CSS gestisce il hover */
@media (min-width: 901px) {
  #insight-tooltip-portal {
    display: none !important;
  }
}

/* Badge mobile: riduce dimensioni e wrappa sotto il testo risposta */
@media (max-width: 600px) {
  .option-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .option-item .radio-custom {
    flex-shrink: 0;
  }

  .option-item .radio-text {
    flex: 1;
    min-width: 0;
  }

  .prefill-badge {
    margin-left: auto;
    flex-basis: auto;
    justify-content: center;
    padding: 6px 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
    white-space: nowrap;
    width: fit-content;
  }

  .badge-label {
    display: none;
  }
}

/* ── Slider Styles (3D Coverflow) ───────────────── */
.results-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
  padding: 40px 0 20px;
  margin-bottom: 24px;
}

.results-slider-track {
  display: grid;
  grid-template-areas: "slide";
  perspective: 1800px;
  width: 100%;
  align-items: center;
}

.result-slide {
  grid-area: slide;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  box-sizing: border-box;
  background: transparent;
  display: flex;
  flex-direction: column;
  /* Coverflow default (hidden) */
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease, filter 0.6s ease;
  transform-origin: center center;
  pointer-events: none;
  opacity: 0;
  transform: translateX(0) scale(0.85) translateZ(-100px);
}

/* Active state (Front) */
.result-slide.active-slide {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1) translateZ(0);
  filter: blur(0);
  z-index: 5;
}

/* Previous state (Left blurred) */
.result-slide.prev-slide {
  opacity: 0.6;
  transform: translateX(-40%) scale(0.85) translateZ(-100px);
  filter: blur(6px);
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
}

/* Next state (Right blurred) */
.result-slide.next-slide {
  opacity: 0.6;
  transform: translateX(40%) scale(0.85) translateZ(-100px);
  filter: blur(6px);
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .result-slide.prev-slide {
    transform: translateX(-45%) scale(0.8) translateZ(-80px);
  }

  .result-slide.next-slide {
    transform: translateX(45%) scale(0.8) translateZ(-80px);
  }
}

/* BUG 3: clip slide overflow on narrow phones + reduce translate to keep slides in viewport */
@media only screen and (max-width: 480px) {
  .results-slider-wrapper {
    overflow-x: hidden;
  }

  .result-slide.prev-slide {
    transform: translateX(-25%) scale(0.8) translateZ(-80px);
  }

  .result-slide.next-slide {
    transform: translateX(25%) scale(0.8) translateZ(-80px);
  }
}

/* Ensure inner cards stretch naturally */
.result-slide>div {
  width: 100%;
  height: 100%;
  margin-bottom: 0;
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 0 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.slider-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--anim-fast) var(--anim-ease-out);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.slider-btn:hover:not(:disabled) {
  background: var(--twow-coral);
  border-color: var(--twow-coral);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 85, 83, 0.35);
}

.slider-btn:disabled {
  opacity: 0.15;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.slider-dots {
  display: flex;
  gap: 12px;
  z-index: 10;
}

.slider-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all var(--anim-standard) var(--anim-spring);
}

.slider-dots .dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

.slider-dots .dot.active {
  background: var(--twow-coral);
  transform: scale(1.4);
  box-shadow: 0 0 12px rgba(255, 85, 83, 0.4);
}

/* ═══════════════════════════════════════════════
   SHARE CARD — LinkedIn
   ═══════════════════════════════════════════════ */

.share-section {
  background: rgba(14, 14, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  overflow: hidden;
  margin-bottom: 60px;
}

.share-section::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(10, 102, 194, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.share-section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

.share-section-copy {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin: 8px 0 0;
  line-height: 1.6;
}

/* ── Card preview area ─────────────────────────── */
.share-card-preview {
  width: min(100%, 480px);
  aspect-ratio: 1080 / 1350;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
  margin: 0 auto;
}

.share-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 14px;
}

/* Spinner */
.share-card-loader {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(255, 255, 255, 0.1);
  border-top-color: #FF5553;
  border-radius: 50%;
  animation: spin-loader 0.8s linear infinite;
}

@keyframes spin-loader {
  to {
    transform: rotate(360deg);
  }
}

.share-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

/* ── Action buttons ────────────────────────────── */
.share-card-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-share-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 28px;
  height: 52px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-text);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s var(--anim-spring), opacity 0.2s;
  text-decoration: none;
  white-space: nowrap;
  flex: 1;
  min-width: 180px;
}

.btn-share-action:hover {
  transform: translateY(-3px);
}

.btn-share-action:active {
  transform: translateY(0) scale(0.97);
}

.btn-share-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-share-download {
  background: linear-gradient(135deg, #FF5553 0%, #E63946 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 85, 83, 0.3);
}

.btn-share-linkedin {
  background: #0A66C2;
  color: #fff;
  box-shadow: 0 4px 20px rgba(10, 102, 194, 0.3);
}

.btn-share-linkedin:hover {
  background: #0958a8;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 767px) {
  .share-section {
    padding: 24px;
    gap: 20px;
  }

  .share-card-actions {
    flex-direction: column;
  }

  .btn-share-action {
    flex: unset;
    width: 100%;
  }
}