/* =========================================================
   NeroStay – Landing custom styles
   Design language: editorial, warm, hospitality
   ========================================================= */

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { letter-spacing: -0.015em; }
.font-serif { letter-spacing: -0.02em; font-feature-settings: 'kern' 1, 'liga' 1, 'dlig' 1; }
.font-serif em, .font-serif .italic, em.italic { font-feature-settings: 'kern' 1, 'liga' 1, 'dlig' 1, 'swsh' 1; }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1)  { transition-delay: 0.00s; }
.reveal-stagger.is-visible > *:nth-child(2)  { transition-delay: 0.06s; }
.reveal-stagger.is-visible > *:nth-child(3)  { transition-delay: 0.12s; }
.reveal-stagger.is-visible > *:nth-child(4)  { transition-delay: 0.18s; }
.reveal-stagger.is-visible > *:nth-child(5)  { transition-delay: 0.24s; }
.reveal-stagger.is-visible > *:nth-child(6)  { transition-delay: 0.30s; }
.reveal-stagger.is-visible > *:nth-child(7)  { transition-delay: 0.36s; }
.reveal-stagger.is-visible > *:nth-child(8)  { transition-delay: 0.42s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Navbar ---------- */
.nav-scrolled { box-shadow: 0 1px 0 rgba(26,26,26,0.04), 0 8px 24px -16px rgba(26,26,26,0.12); }

/* ---------- Hero patterns ---------- */
.hero-pattern {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(201, 169, 110, 0.10), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(201, 169, 110, 0.08), transparent 40%);
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.ornament { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin: 0 auto; }
.ornament::before, .ornament::after {
  content: ""; height: 1px; width: 48px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 110, 0.6), transparent);
}
.ornament svg { flex: none; }

/* ---------- Buttons ---------- */
.btn-arrow { position: relative; overflow: hidden; }
.btn-arrow svg { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.btn-arrow:hover svg { transform: translateX(4px); }

.btn-shine { position: relative; isolation: isolate; }
.btn-shine::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-shine:hover::before { transform: translateX(100%); }

/* ---------- Nav link underline ---------- */
.nav-link { position: relative; padding: 0.25rem 0; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: #c9a96e; transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left center; }

/* ---------- Card hover ---------- */
.card-lift {
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px -28px rgba(26,26,26,0.18);
  border-color: rgba(201, 169, 110, 0.4);
}

.card-flow { transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.card-flow:hover { transform: translateY(-4px); }
.card-flow:hover .card-flow-img {
  box-shadow: 0 30px 60px -28px rgba(201, 169, 110, 0.35);
  border-color: rgba(201, 169, 110, 0.4);
}
.card-flow-img {
  transition: box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Step number con linea ---------- */
.step-number { position: relative; display: inline-flex; align-items: center; gap: 0.6rem; }
.step-number::before { content: ""; width: 18px; height: 1px; background: #c9a96e; }

/* ---------- Feature icon ---------- */
.feature-card .feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f3ecdd, #e8ddc4);
  margin-bottom: 14px; color: #b08a4e;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-card .feature-icon svg { width: 22px; height: 22px; stroke: currentColor; }
.feature-card:hover .feature-icon { transform: scale(1.06) rotate(-3deg); }

.icon-illust {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #faf6ee, #f3ecdd);
  margin-bottom: 18px; color: #b08a4e;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.icon-illust svg { width: 32px; height: 32px; stroke: currentColor; }
.card-lift:hover .icon-illust { transform: scale(1.04) rotate(-2deg); }

/* =========================================================
   Pricing toggle (Mensile / Annuale) - revisione
   ========================================================= */

.billing-switch {
  display: inline-flex !important;
  align-items: center;
  background: #faf6ee;
  border: 1px solid #d9c8a3;
  border-radius: 999px;
  padding: 5px;
  gap: 4px;
  user-select: none;
  box-shadow: 0 1px 3px rgba(26,26,26,0.04);
}

.billing-toggle {
  appearance: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #4a4a4a;
  padding: 10px 22px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.3s ease,
              box-shadow 0.3s ease,
              transform 0.15s ease;
  white-space: nowrap;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.billing-toggle:hover {
  color: #1a1a1a;
}
.billing-toggle:active {
  transform: scale(0.97);
}
.billing-toggle:focus-visible {
  outline: 2px solid #c9a96e;
  outline-offset: 3px;
}

.billing-toggle--active {
  background: #1a1a1a !important;
  color: #faf6ee !important;
  box-shadow: 0 4px 14px -6px rgba(26, 26, 26, 0.4);
}

.billing-toggle--active:hover {
  color: #faf6ee !important;
}

/* =========================================================
   Pricing card (.pricing-card per la landing)
   ========================================================= */

.pricing-card { position: relative; }
.pricing-card--pre {
  background-image: radial-gradient(ellipse 360px 320px at calc(100% + 40px) -40px, rgba(201, 169, 110, 0.28), transparent 65%);
}

/* Sold-out: card pre-lancio disabilitata */
.pricing-card--soldout {
  opacity: 0.55;
  filter: grayscale(0.6);
  pointer-events: none;
}
.pricing-card--soldout [data-cta-pre] {
  background: #2c2c2c !important;
  color: #888 !important;
  cursor: not-allowed;
}

/* =========================================================
   Plan radio cards (per /iscriviti)
   ========================================================= */

.plan-radio {
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Hover: lift + ombra dorata sottile */
.plan-radio:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -20px rgba(26, 26, 26, 0.25),
              0 4px 12px -6px rgba(201, 169, 110, 0.3);
}

/* Selected: bordo dorato spesso + halo + lift mantenuto */
.plan-radio[data-selected="true"] {
  border-color: #c9a96e;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 4px rgba(201, 169, 110, 0.18),
    0 18px 40px -20px rgba(26, 26, 26, 0.3);
}

/* Indicatore radio in alto a destra */
.plan-radio-indicator {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.35;
  background: transparent;
  transition: opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  pointer-events: none;
}

.plan-radio:hover .plan-radio-indicator { opacity: 0.7; }

.plan-radio[data-selected="true"] .plan-radio-indicator {
  opacity: 1;
  background: #c9a96e;
  border-color: #c9a96e;
  transform: scale(1.05);
}

/* Tick interno quando selezionato */
.plan-radio[data-selected="true"] .plan-radio-indicator::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 11px; height: 6px;
  border: 2px solid #1a1a1a;
  border-top: 0;
  border-right: 0;
  transform: translate(-50%, -65%) rotate(-45deg);
}

/* Per la card scura (pre-lancio) il check va comunque ben leggibile */
.plan-radio[data-plan="pre_launch"] .plan-radio-indicator {
  border-color: rgba(255,255,255,0.5);
}
.plan-radio[data-plan="pre_launch"]:hover .plan-radio-indicator {
  border-color: rgba(201, 169, 110, 0.8);
}

/* Sold-out su /iscriviti: rendi non cliccabile con stile "soft disabled" */
.plan-radio[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- FAQ details ---------- */
details summary::-webkit-details-marker { display: none; }
details summary { outline: none; }
details[open] summary { color: #1a1a1a; }
details { transition: background-color 0.3s ease; }
details:hover { background-color: #ede4d3; }
details .faq-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(201, 169, 110, 0.12);
  color: #b08a4e;
  font-size: 18px; line-height: 1;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}
details[open] .faq-icon { transform: rotate(45deg); background: rgba(201, 169, 110, 0.25); }

/* ---------- Form input ---------- */
.form-input {
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.form-input:focus {
  background-color: #fff;
  border-color: #c9a96e;
  box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.12);
}
.form-input::placeholder { color: rgba(44, 44, 44, 0.35); }

/* ---------- Selezione e scrollbar ---------- */
::selection { background: #c9a96e; color: #1a1a1a; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #faf6ee; }
::-webkit-scrollbar-thumb { background: #d9c8a3; border-radius: 999px; border: 2px solid #faf6ee; }
::-webkit-scrollbar-thumb:hover { background: #c9a96e; }

/* ---------- Form contact status ---------- */
#form-status { transition: opacity 0.3s ease; }
#form-status.success { color: #2c7a4f; display: block; }
#form-status.error { color: #b13434; display: block; }

/* ---------- Scroll cue ---------- */
.scroll-cue {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(26, 26, 26, 0.4);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 36px;
  background: linear-gradient(to bottom, rgba(176, 138, 78, 0.6), transparent);
  animation: scrollCue 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  transform-origin: top center;
}
@keyframes scrollCue {
  0%   { transform: scaleY(0); opacity: 0; }
  30%