/* Homepage landing v2 — Sweeve-inspired tokens, scoped under .hl-v2 */

.hl-v2 {
  --hl-coral: #ef7a5a;
  --hl-coral-soft: hsl(14 85% 96%);
  --hl-bg: hsl(40 45% 98%);
  --hl-surface: #fff;
  --hl-text: hsl(20 25% 12%);
  --hl-muted: hsl(20 10% 46%);
  --hl-border: hsl(30 18% 90%);
  --hl-muted-bg: hsl(30 18% 95%);
  --hl-radius: 12px;
  --hl-radius-lg: 1.5rem;
  --hl-shadow: 0 1px 3px hsl(20 25% 12% / 0.06);
  --hl-shadow-hover: 0 8px 25px -5px hsl(12 80% 55% / 0.12), 0 4px 10px -3px hsl(20 25% 12% / 0.06);
  font-family: var(--font-body, system-ui), sans-serif;
  background: var(--hl-bg);
  color: var(--hl-text);
}

html[data-theme='dark'] .hl-v2 {
  --hl-coral: hsl(12 78% 62%);
  --hl-coral-soft: hsl(12 40% 18% / 0.5);
  --hl-bg: hsl(20 15% 8%);
  --hl-surface: hsl(20 12% 12%);
  --hl-text: hsl(30 15% 92%);
  --hl-muted: hsl(20 10% 62%);
  --hl-border: hsl(20 10% 20%);
  --hl-muted-bg: hsl(20 10% 16%);
  --hl-shadow: 0 1px 3px hsl(0 0% 0% / 0.25);
  --hl-shadow-hover: 0 8px 25px -5px hsl(12 75% 58% / 0.12), 0 4px 10px -3px hsl(0 0% 0% / 0.3);
}

.hl-v2 h1,
.hl-v2 h2,
.hl-v2 h3,
.hl-v2 .hl-v2-heading {
  font-family: var(--font-display, system-ui), sans-serif;
}

.hl-v2-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .hl-v2-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Hero — due colonne (testo | blob), come mockup */
.hl-v2-hero {
  position: relative;
  overflow: clip;
  padding-top: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  background: var(--hl-bg);
}

.hl-v2-hero-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: stretch;
  min-height: 0;
}

.hl-v2-hero-main {
  position: relative;
  z-index: 2;
  max-width: 36rem;
}

.hl-v2-hero-visual {
  position: relative;
  z-index: 1;
  min-height: clamp(200px, 42vw, 380px);
  margin-inline: auto;
  width: 100%;
  max-width: 28rem;
}

@media (min-width: 900px) {
  .hl-v2-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.85fr);
    align-items: center;
    column-gap: clamp(1.5rem, 4vw, 3.5rem);
    min-height: min(78vh, 44rem);
  }

  .hl-v2-hero-main {
    max-width: 38rem;
    padding-right: 0.5rem;
  }

  .hl-v2-hero-visual {
    max-width: none;
    min-height: min(52vh, 28rem);
    height: 100%;
    margin-inline: 0;
    margin-right: calc(-1 * max(0px, (100vw - 80rem) / 2 + 1.5rem));
    width: auto;
  }
}

.hl-v2-hero-blobs {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: visible;
}

.hl-v2-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.88;
}

html[data-theme='dark'] .hl-v2-blob {
  opacity: 0.5;
}

/* Pastello: pesca, corallo, teal — si sovrappongono verso destra */
.hl-v2-blob--1 {
  top: 6%;
  right: 18%;
  width: min(72%, 280px);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at 40% 40%,
    hsl(15 70% 88% / 0.95) 0%,
    hsl(20 55% 86% / 0.85) 100%
  );
}

.hl-v2-blob--2 {
  top: 22%;
  right: -8%;
  width: min(88%, 340px);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at 35% 45%,
    hsl(12 85% 82% / 0.75) 0%,
    hsl(18 70% 78% / 0.65) 100%
  );
}

.hl-v2-blob--3 {
  bottom: 4%;
  right: 8%;
  width: min(62%, 240px);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at 50% 50%,
    hsl(175 38% 82% / 0.8) 0%,
    hsl(185 35% 78% / 0.65) 100%
  );
}

html[data-theme='dark'] .hl-v2-blob--1 {
  background: radial-gradient(circle at 40% 40%, hsl(20 25% 22% / 0.9) 0%, hsl(20 20% 14% / 0.7) 100%);
}
html[data-theme='dark'] .hl-v2-blob--2 {
  background: radial-gradient(circle at 35% 45%, hsl(12 35% 24% / 0.85) 0%, hsl(18 28% 16% / 0.7) 100%);
}
html[data-theme='dark'] .hl-v2-blob--3 {
  background: radial-gradient(circle at 50% 50%, hsl(175 22% 20% / 0.8) 0%, hsl(185 18% 14% / 0.65) 100%);
}

.hl-v2-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--hl-coral-soft);
  color: var(--hl-coral);
  border: 1px solid color-mix(in srgb, var(--hl-coral) 28%, transparent);
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.hl-v2-badge__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--hl-coral);
  stroke-width: 2.25px;
}

.hl-v2-hero-title {
  font-size: clamp(2.5rem, 4.2vw + 1.2rem, 4rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0 0 clamp(1.25rem, 3vw, 1.65rem);
  color: var(--hl-text);
}

.hl-v2-hero-title__line {
  display: block;
}

.hl-v2-hero-brand {
  color: var(--hl-coral);
  font-weight: 800;
}

.hl-v2-hero-sub {
  font-size: clamp(1.0625rem, 1.2vw + 0.9rem, 1.1875rem);
  line-height: 1.65;
  color: var(--hl-muted);
  margin: 0 0 clamp(1.75rem, 4vw, 2.35rem);
  max-width: 34rem;
}

.hl-v2-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

@media (min-width: 480px) {
  .hl-v2-cta-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

.hl-v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s,
    transform 0.15s,
    border-color 0.2s;
}

.hl-v2-btn--primary {
  background: var(--hl-coral);
  color: #fff;
  box-shadow:
    0 4px 16px -4px color-mix(in srgb, var(--hl-coral) 55%, transparent),
    0 2px 6px -2px hsl(20 25% 12% / 0.08);
}

.hl-v2-btn--primary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.hl-v2-btn--outline {
  background: var(--hl-surface);
  color: var(--hl-text);
  border: 1px solid var(--hl-border);
  box-shadow: none;
}

.hl-v2-btn--outline:hover {
  border-color: color-mix(in srgb, var(--hl-text) 22%, var(--hl-border));
  color: var(--hl-text);
  text-decoration: none;
}

/* Secondario hero — come screenshot: pill bianca, bordo grigio chiarissimo, testo/icona charcoal */
.hl-v2-btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.hl-v2-btn--outline-photo {
  gap: 0.5rem;
  background: #fff;
  color: hsl(26 14% 20%);
  border: 1px solid hsl(32 14% 88%);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.hl-v2-btn--outline-photo:hover {
  background: #fff;
  border-color: hsl(32 12% 80%);
  color: hsl(26 16% 16%);
  transform: none;
  filter: none;
  text-decoration: none;
}

html[data-theme='dark'] .hl-v2-btn--outline-photo {
  background: var(--hl-surface);
  color: var(--hl-text);
  border-color: var(--hl-border);
}

html[data-theme='dark'] .hl-v2-btn--outline-photo:hover {
  background: var(--hl-muted-bg);
  border-color: var(--hl-border);
  color: var(--hl-text);
}

/* Sections */
.hl-v2-section {
  padding: 4rem 0;
  content-visibility: auto;
  contain-intrinsic-size: 1px 820px;
}

.hl-v2-section--muted {
  background: var(--hl-muted-bg);
}

.hl-v2-section-head {
  margin-bottom: 2.75rem;
}

.hl-v2-section-head--center {
  text-align: center;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.75rem;
}

.hl-v2-section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--hl-text);
}

.hl-v2-section-head p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--hl-muted);
}

@media (min-width: 768px) {
  .hl-v2-section-head p {
    font-size: 1.0625rem;
  }
}

/* Destination cards */
.hl-v2-dest-hub {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  display: flex;
  justify-content: center;
}

.hl-v2-dest-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hl-v2-dest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hl-v2-dest-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hl-v2-dest-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--hl-surface);
  border: 1px solid var(--hl-border);
  border-radius: var(--hl-radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--hl-shadow);
  transition:
    box-shadow 0.25s,
    border-color 0.2s;
}

.hl-v2-dest-card:hover {
  box-shadow: var(--hl-shadow-hover);
  border-color: hsl(12 80% 55% / 0.22);
  text-decoration: none;
  color: inherit;
}

.hl-v2-dest-card__flag {
  font-size: 1.5rem;
  line-height: 1;
}

.hl-v2-dest-card__title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--hl-text);
}

.hl-v2-dest-card__meta {
  font-size: 0.75rem;
  color: var(--hl-muted);
  margin-top: 0.15rem;
}

/* How it works */
.hl-v2-steps {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .hl-v2-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.hl-v2-step-num {
  font-size: 3rem;
  font-weight: 800;
  color: hsl(12 80% 55% / 0.22);
  line-height: 1;
}

.hl-v2-step-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--hl-coral-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hl-coral);
  flex-shrink: 0;
}

.hl-v2-step-icon i {
  width: 1.25rem;
  height: 1.25rem;
}

.hl-v2-step h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--hl-text);
}

.hl-v2-step p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--hl-muted);
}

.hl-v2-step-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

/* Feature grid */
.hl-v2-features-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .hl-v2-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hl-v2-features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hl-v2-feature-card {
  height: 100%;
  padding: 1.5rem;
  background: var(--hl-surface);
  border: 1px solid var(--hl-border);
  border-radius: var(--hl-radius);
  box-shadow: var(--hl-shadow);
  transition: box-shadow 0.25s;
}

.hl-v2-feature-card:hover {
  box-shadow: var(--hl-shadow-hover);
}

.hl-v2-feature-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--hl-text);
}

.hl-v2-feature-card p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--hl-muted);
}

/* Stats */
.hl-v2-stats-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 1024px) {
  .hl-v2-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hl-v2-stat {
  text-align: center;
  padding: 1.5rem;
  background: var(--hl-surface);
  border: 1px solid var(--hl-border);
  border-radius: var(--hl-radius-lg);
  box-shadow: var(--hl-shadow);
}

.hl-v2-stat__value {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--hl-text);
  font-family: 'Manrope', var(--font-display, system-ui), sans-serif;
}

.hl-v2-stat__label {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--hl-muted);
}

/* Tools: wrap existing Astro widgets */
.hl-v2-tools-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
  .hl-v2-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hl-v2-tools-stack {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 0.25rem;
}

/* Testimonials */
.hl-v2-testimonial-grid {
  display: none;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .hl-v2-testimonial-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

.hl-v2-testimonial-card {
  padding: 1.5rem;
  background: var(--hl-surface);
  border: 1px solid var(--hl-border);
  border-radius: var(--hl-radius);
  box-shadow: var(--hl-shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hl-v2-testimonial-card p {
  flex: 1;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--hl-text);
}

.hl-v2-quote {
  width: 2rem;
  height: 2rem;
  color: hsl(12 80% 55% / 0.28);
  margin-bottom: 0.75rem;
}

.hl-v2-testimonial-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hl-v2-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--hl-coral-soft);
  color: var(--hl-coral);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--hl-border);
}

.hl-v2-testimonial-carousel {
  display: block;
}

@media (min-width: 768px) {
  .hl-v2-testimonial-carousel {
    display: none;
  }
}

.hl-v2-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.hl-v2-carousel-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--hl-border);
  cursor: pointer;
}

.hl-v2-carousel-dot[aria-selected='true'] {
  background: var(--hl-coral);
}

/* FAQ */
.hl-v2-faq {
  max-width: 48rem;
  margin: 0 auto;
}

.hl-v2-faq details {
  border: 1px solid var(--hl-border);
  border-radius: var(--hl-radius);
  background: var(--hl-surface);
  margin-bottom: 0.65rem;
  box-shadow: var(--hl-shadow);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.hl-v2-faq details:hover {
  border-color: color-mix(in srgb, var(--hl-accent, #f97316) 45%, var(--hl-border));
  box-shadow: 0 6px 18px -8px rgba(15, 23, 42, 0.18);
}

.hl-v2-faq details[open] {
  border-color: color-mix(in srgb, var(--hl-accent, #f97316) 55%, var(--hl-border));
  box-shadow: 0 10px 28px -14px rgba(249, 115, 22, 0.35);
}

.hl-v2-faq summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hl-text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.hl-v2-faq summary:hover {
  background: color-mix(in srgb, var(--hl-accent, #f97316) 6%, transparent);
}

.hl-v2-faq summary::-webkit-details-marker {
  display: none;
}

.hl-v2-faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.25s ease;
  opacity: 0.65;
}

.hl-v2-faq details[open] summary {
  color: var(--hl-accent, #f97316);
  border-bottom: 1px solid var(--hl-border);
}

.hl-v2-faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
  opacity: 1;
}

.hl-v2-faq .hl-v2-faq-a {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--hl-muted);
  overflow: hidden;
  height: 0;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hl-v2-faq .hl-v2-faq-a > * {
  padding: 1rem 1.15rem;
  margin: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}

.hl-v2-faq details[open] .hl-v2-faq-a > * {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hl-v2-faq details,
  .hl-v2-faq summary,
  .hl-v2-faq summary::after,
  .hl-v2-faq .hl-v2-faq-a,
  .hl-v2-faq .hl-v2-faq-a > * {
    transition: none !important;
  }
}

/* CTA band */
.hl-v2-cta-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--hl-radius-lg);
  background: var(--hl-surface);
  border: 1px solid var(--hl-border);
  box-shadow: var(--hl-shadow);
  padding: 2.5rem 1.75rem;
  text-align: center;
}

@media (min-width: 640px) {
  .hl-v2-cta-box {
    padding: 3rem 2.5rem;
  }
}

.hl-v2-cta-box h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.75rem;
}

.hl-v2-cta-box > .hl-v2-inner-rel {
  position: relative;
  z-index: 2;
}

.hl-v2-cta-deco1 {
  position: absolute;
  top: 0;
  right: 0;
  width: 10rem;
  height: 10rem;
  background: hsl(12 80% 55% / 0.06);
  border-radius: 50%;
  transform: translate(40%, -40%);
}

.hl-v2-cta-deco2 {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 8rem;
  height: 8rem;
  background: hsl(20 55% 93% / 0.5);
  border-radius: 50%;
  transform: translate(-40%, 40%);
}

html[data-theme='dark'] .hl-v2-cta-deco2 {
  background: hsl(20 20% 20% / 0.4);
}

.hl-v2-cta-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: var(--hl-coral-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--hl-coral);
}

/* Community section alignment */
.hl-v2 .community-section {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Scroll reveal (IntersectionObserver) + supporto prefers-reduced-motion
   -------------------------------------------------------------------------- */
.hl-v2-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.hl-v2-reveal.hl-v2-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hl-v2-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (scripting: none) {
  .hl-v2-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
