/* ============================================================
   WEDDING LANDING — GAIA & FILIPPO
   style.css
   ============================================================ */

/* ------------------------------------------------------------
   CUSTOM PROPERTIES
   ------------------------------------------------------------ */
:root {
  /* Colors */
  --color-bg:          #e8efe6;
  --color-primary:     #576250;
  --color-primary-10:  rgba(87, 98, 80, 0.10);
  --color-primary-20:  rgba(87, 98, 80, 0.20);
  --color-primary-40:  rgba(87, 98, 80, 0.40);
  --color-btn:         #d2d9bf;
  --color-cream:       #f3f0e7;
  --color-iban-bg:     rgba(237, 233, 222, 0.80);
  --color-iban-border: rgba(179, 191, 204, 0.30);
  --color-white:       #ffffff;

  /* Typography */
  --font-script:   'Sacramento',        cursive;
  --font-serif:    'Cormorant Garamond', serif;
  --font-body:     'Lora',              serif;

  /* Font weights */
  --fw-light:      300;
  --fw-regular:    400;
  --fw-medium:     500;
  --fw-semibold:   600;
  --fw-bold:       700;

  /* Font sizes */
  --fs-xs:   14px;
  --fs-sm:   16px;
  --fs-md:   18px;
  --fs-lg:   22px;
  --fs-xl:   24px;
  --fs-2xl:  30px;
  --fs-3xl:  48px;

  /* Line heights */
  --lh-tight:  1;
  --lh-snug:   1.2;
  --lh-normal: 1.4;
  --lh-loose:  1.5;

  /* Letter spacing */
  --ls-body: 0.4px;
  --ls-btn:  0.35px;

  /* Spacing */
  --spacing-xs:      8px;
  --spacing-sm:      16px;
  --spacing-md:      24px;
  --spacing-lg:      32px;
  --spacing-xl:      40px;
  --spacing-2xl:     64px;
  --spacing-section: 80px;

  /* Border radius */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:   10px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-card: 0px 2px 15px -3px rgba(53, 83, 117, 0.08),
                 0px 4px  6px -2px rgba(53, 83, 117, 0.04);

  /* Layout */
  --max-width:        1440px;
  --content-width:    1046px;
  --container-pad-x: 120px;   /* desktop lateral padding */
}

/* Breakpoints (reference — used in media queries below)
   --bp-mobile:  < 768px
   --bp-desktop: ≥ 768px                                      */

/* ------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  background-color: var(--color-bg);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-loose);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ------------------------------------------------------------
   UTILITY CLASSES
   ------------------------------------------------------------ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--spacing-md);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--container-pad-x);
  }
}

.hidden-desktop {
  display: block;
}

@media (min-width: 768px) {
  .hidden-desktop {
    display: none;
  }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding-block: var(--spacing-2xl);
}

/* Gradient circolare mobile — migliora leggibilità del testo
   sul botanical. Visibile solo su mobile, sparisce su desktop. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 100% at 50% 40%,
    var(--color-bg)        25%,
    rgba(232, 239, 230, 0) 75%
  );
}

@media (min-width: 768px) {
  .hero::after {
    display: none;
  }
}

/* --- Botanical decorations --- */

.hero__deco {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: darken;
  user-select: none;
}

/* Small botanical at top center — hidden on desktop */
.hero__deco--top {
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 47px;
  height: auto;
  /* display: none; */
}

/* Mobile: single full-width botanical behind content */
.hero__deco--mobile {
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 375px;
  height: auto;
  display: none;
}

/* Desktop side botanicals — hidden on mobile */
.hero__deco--left,
.hero__deco--right {
  display: block;
  top: 0;
  width: 232px;
  height: auto;
}

.hero__deco--left {
  left: calc(50% - 230px);
}

.hero__deco--right {
  right: calc(50% - 230px);
  transform: scaleX(-1);
}

/* --- Hero text content --- */

.hero__content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: var(--spacing-md);
  max-width: 560px;
}

.hero__tagline {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-xl);
  line-height: var(--lh-tight);
  margin-bottom: var(--spacing-md);
}

.hero__name {
  font-family: var(--font-script);
  font-weight: var(--fw-regular);
  font-size: clamp(64px, 18vw, 90px);
  line-height: .9;
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
  background-color: var(--color-bg);
}

.hero__name-img {
  mix-blend-mode: darken;
}

.hero__invite {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-xl);
  line-height: var(--lh-tight);
  margin-bottom: var(--spacing-md);
}

.hero__date {
  font-family: var(--font-serif);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xl);
  line-height: 1.33;
  margin-bottom: var(--spacing-lg);
}

/* --- CTA Button --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.8;
}

.btn--cta {
  width: 327px;
  max-width: 100%;
  height: 48px;
  background-color: var(--color-btn);
  border: 1px solid var(--color-primary-40);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  color: var(--color-primary);
  letter-spacing: var(--ls-btn);
}

/* --- Scroll indicator --- */

.hero__scroll {
  position: absolute;
  bottom: var(--spacing-xs);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-md);
  color: var(--color-primary);
  line-height: 1.78;
  text-decoration: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  z-index: 100;
}

.hero__scroll:hover {
  opacity: 0.65;
}

.hero__scroll img {
  display: block;
}

/* --- Desktop overrides (≥ 768px) --- */

@media (min-width: 768px) {
  .hero__deco--mobile {
    display: none;
  }

  .hero__deco--top {
    display: block;
  }

  .hero__deco--left {
    left: calc(50% - 356px);
  }

  .hero__deco--right {
    right: calc(50% - 356px);
    transform: scaleX(-1);
  }

  .hero__name {
    font-size: clamp(72px, 7vw, 90px);
  }

  .hero__content {
    max-width: 520px;
  }
}

/* ============================================================
   LOCATION
   ============================================================ */

.location {
  margin-block: var(--spacing-section);
}

.location__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  padding-inline: var(--spacing-md);
  max-width: var(--max-width);
  margin-inline: auto;
}

/* --- Header --- */

.location__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  text-align: center;
  width: 100%;
}

.location__icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary-10);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.location__text {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.location__label {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-xl);
  line-height: 1.33;
}

.location__name {
  font-family: var(--font-script);
  font-weight: var(--fw-regular);
  font-size: var(--fs-3xl);
  line-height: 1;
  margin-bottom: var(--spacing-sm);
}

.location__address {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-body);
  line-height: 1.5;
  font-style: normal;
}

/* --- Images --- */

.location__images {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  width: 100%;
}

.location__photo img {
  width: 100%;
  height: 314px;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

.location__map {
  position: relative;
}

.location__map img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

/* overlay colore scuro sulla mappa (mix-blend-mode: color) */
.location__map::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  mix-blend-mode: color;
  border-radius: var(--radius-lg);
  pointer-events: none;
}

/* --- Desktop (≥ 768px) --- */

@media (min-width: 768px) {
  .location__inner {
    gap: var(--spacing-xl);
    padding-inline: var(--container-pad-x);
  }

  .location__header {
    max-width: 607px;
  }

  .location__images {
    flex-direction: row;
    gap: 19px;
    align-items: stretch;
  }

  .location__photo,
  .location__map {
    flex: 1;
  }

  .location__photo img,
  .location__map img {
    height: 473px;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background-color: var(--color-primary);
  min-height: 280px;
  display: flex;
  align-items: center;
}

.footer__inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 41px;
  padding-inline: var(--spacing-md);
  max-width: var(--max-width);
  margin-inline: auto;
  padding-block: var(--spacing-xl);
}

/* --- Brand: logo + nome + data --- */

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
}

.footer__logo {
  display: block;
  flex-shrink: 0;
}

.footer__brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
}

.footer__name {
  font-family: var(--font-script);
  font-weight: var(--fw-regular);
  font-size: var(--fs-2xl);
  line-height: 1.25;
  color: var(--color-white);
}

.footer__date {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-sm);
  letter-spacing: 0.35px;
  line-height: 1.25;
  color: var(--color-white);
}

/* --- Tagline --- */

.footer__tagline {
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  letter-spacing: 0.3px;
  line-height: 1;
  color: var(--color-white);
  text-align: center;
}

/* --- Desktop (≥ 768px) --- */

@media (min-width: 768px) {
  .footer {
    min-height: 186px;
  }

  .footer__inner {
    gap: var(--spacing-md);
    padding-inline: var(--container-pad-x);
  }

  .footer__brand {
    flex-direction: row;
    align-items: flex-start;
    gap: 17px;
  }

  .footer__brand-text {
    align-items: flex-start;
    text-align: left;
  }
}

/* ============================================================
   DRESS CODE
   ============================================================ */

.dresscode {
  margin-block: var(--spacing-section);
}

/* Mobile: block layout — figura in absolute come sfondo decorativo */
.dresscode__inner {
  position: relative;
  max-width: 920px;
  margin-inline: auto;
  padding: var(--spacing-xl) var(--spacing-md);
  overflow: hidden;
}

/* Mobile: dress figure = sfondo assoluto a sinistra */
.dresscode__left {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 201px;
  pointer-events: none;
  z-index: 0;
}

.dresscode__figure {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top left;
}

/* Mobile: header centrato, in flow normale */
.dresscode__header {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

.dresscode__title {
  font-family: var(--font-script);
  font-weight: var(--fw-regular);
  font-size: var(--fs-3xl);
  line-height: 1;
  color: var(--color-primary);
}

.dresscode__subtitle {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-body);
  color: var(--color-primary);
}

/* Mobile: items in flow normale */
.dresscode__items {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 45px;
}

.dresscode__item {
  display: grid;
  grid-template-columns: 65px 1fr; /* colonna icona fissa = icona più larga su mobile */
  column-gap: var(--spacing-sm);
  align-items: center;
}

.dresscode__item-icon {
  display: block;
  height: auto;
  justify-self: center; /* centra l'icona nella cella fissa */
}

/* Dimensioni icone mobile (da Figma) */
.dresscode__item--formal .dresscode__item-icon { width: 31px; }
.dresscode__item--pool   .dresscode__item-icon { width: 65px; }

.dresscode__item-text {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-xs);
  line-height: 1.43;
  color: var(--color-primary);
}

.dresscode__item-text strong {
  font-weight: var(--fw-bold);
}

/* --- Desktop (≥ 768px) --- */

@media (min-width: 768px) {
  /* Grid: colonna 1 = figura + header sovrapposto | colonna 2 = items */
  .dresscode__inner {
    display: grid;
    grid-template-columns: 273px 1fr;
    column-gap: var(--spacing-2xl);
    padding: 0 var(--container-pad-x);
    overflow: visible;
  }

  /* Figura: colonna 1, torna in flow */
  .dresscode__left {
    grid-column: 1;
    grid-row: 1;
    position: static;
    width: auto;
    pointer-events: auto;
    z-index: auto;
  }

  .dresscode__figure {
    width: 100%;
    height: auto;
    object-fit: fill;
    object-position: initial;
  }

  /* Header: sovrapposto alla figura (stessa cella griglia) */
  .dresscode__header {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    z-index: 1;
    align-self: start;
    text-align: left;
    margin-bottom: 0;
    padding-top: var(--spacing-xl);
  }

  /* Items: colonna destra */
  .dresscode__items {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    padding-top: var(--spacing-2xl);
  }

  /* Colonna icona fissa = icona più larga su desktop; testo sempre allineato */
  .dresscode__item {
    grid-template-columns: 94px 1fr;
    column-gap: 21px;
  }

  /* Dimensioni icone desktop */
  .dresscode__item--formal .dresscode__item-icon { width: 55px; }
  .dresscode__item--pool   .dresscode__item-icon { width: 94px; }
}

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

.faq {
  margin-block: var(--spacing-section);
}

.faq__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  padding-inline: var(--spacing-md);
  max-width: var(--max-width);
  margin-inline: auto;
}

.faq__title {
  font-family: var(--font-script);
  font-weight: var(--fw-regular);
  font-size: var(--fs-3xl);
  line-height: 1;
  color: var(--color-primary);
  text-align: center;
}

/* --- Lista --- */

.faq__list {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- Item --- */

.faq__item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  padding-top: 33px;
}

.faq__item:first-child {
  padding-top: 0;
}

/* --- Domanda --- */

.faq__question {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-sm);
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: var(--color-primary);
}

.faq__question span {
  font-family: var(--font-serif);
  font-weight: var(--fw-bold);
  font-size: var(--fs-md);
  line-height: 1.56;
}

.faq__chevron {
  flex-shrink: 0;
  margin-top: 4px;
  transition: transform 0.3s ease;
}

.faq__item.is-open .faq__chevron {
  transform: rotate(180deg);
}

/* --- Risposta --- */

.faq__answer-wrap {
  height: 0;
  overflow: hidden;
}

.faq__answer {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-md);
  line-height: 1.56;
  color: var(--color-primary);
  padding-bottom: 33px;
}

.faq__answer strong {
  font-weight: var(--fw-bold);
}

.faq__link {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: inherit;
}

.faq__link:hover {
  opacity: 0.7;
}

/* --- Divisore --- */

.faq__divider {
  border: none;
  border-top: 1px solid var(--color-primary-40);
  margin: 0;
}

/* --- Desktop (≥ 768px) --- */

@media (min-width: 768px) {
  .faq__inner {
    padding-inline: var(--container-pad-x);
    max-width: calc(838px + var(--container-pad-x) * 2);
  }
}

/* ============================================================
   REGALO / IBAN
   ============================================================ */

.regalo {
  background-color: var(--color-primary);
  padding-block: var(--spacing-section);
}

.regalo__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  padding-inline: var(--spacing-md);
  max-width: var(--max-width);
  margin-inline: auto;
}

/* --- Icon + testo --- */

.regalo__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  width: 100%;
}

.regalo__icon {
  flex-shrink: 0;
  display: block;
}

.regalo__copy {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.regalo__title {
  font-family: var(--font-script);
  font-weight: var(--fw-regular);
  font-size: var(--fs-3xl);
  line-height: 1;
  color: var(--color-white);
}

.regalo__body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-sm);
  line-height: 1.5;
  letter-spacing: var(--ls-body);
  color: var(--color-white);
}

/* --- IBAN box --- */

.regalo__iban {
  position: relative;
  width: 100%;
}

.regalo__iban-feedback {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  line-height: 1;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.regalo__iban.is-copied .regalo__iban-feedback {
  opacity: 1;
  transform: translateY(0);
}

.regalo__iban-wrap {
  position: relative;
  width: 100%;
  height: 70px;
  background-color: var(--color-iban-bg);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid var(--color-iban-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  max-width: 500px;
  margin-inline: auto;
  margin-bottom: var(--spacing-sm);
}

.regalo__iban-number {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-xl);
  line-height: 1.17;
  color: var(--color-primary);
  padding-left: 24px;
  white-space: nowrap;
}

.regalo__iban-copy {
  position: absolute;
  right: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.regalo__iban-copy:hover {
  opacity: 0.65;
}

@media (max-width: 440px) {
  .regalo__iban-number {
    font-size: 19px;
  }
}

@media (max-width: 340px) {
  .regalo__iban-number {
    font-size: 16px;
  }
}

/* --- Desktop (≥ 768px) --- */

@media (min-width: 1200px) {
  .regalo__inner {
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-lg);
    padding-inline: var(--container-pad-x);
    max-width: calc(var(--content-width) + var(--container-pad-x) * 2);
  }

  .regalo__text {
    flex: 0 0 599px;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }

  .regalo__body {
    text-align: left;
  }

  .regalo__iban {
    flex: 1;
    min-width: 0;
  }
}

/* ============================================================
   PROGRAMMA DELLA GIORNATA
   ============================================================ */

.programma {
  margin-block: var(--spacing-section);
}

.programma__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  padding-inline: var(--spacing-md);
  max-width: var(--max-width);
  margin-inline: auto;
}

/* --- Header --- */

.programma__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  text-align: center;
}

.programma__icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary-10);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.programma__title {
  font-family: var(--font-script);
  font-weight: var(--fw-regular);
  font-size: var(--fs-3xl);
  line-height: 1;
  color: var(--color-primary);
}

/* --- Timeline --- */

.programma__timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* --- Card --- */

.programma__card {
  position: relative;
  width: 287px;
  min-height: 209px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-md) var(--spacing-sm);
  background-color: var(--color-primary-10);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid var(--color-primary-20);
  border-radius: var(--radius-lg);
}

/* Connettore: assoluto rispetto alla card padre.
   Mobile (colonna): esce dal bordo inferiore, centrato orizzontalmente.
   gap 30px → centro gap a 15px sotto la card → bottom: -(15px + 11px) = -26px */
.programma__connector {
  position: absolute;
  bottom: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 22px;
  background-color: var(--color-primary-40);
  pointer-events: none;
}

.programma__card-icon {
  display: block;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.programma__card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
}

.programma__time {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  background-color: var(--color-primary);
  color: var(--color-cream);
  font-family: var(--font-serif);
  font-weight: var(--fw-medium);
  font-size: var(--fs-xl);
  line-height: 1;
  width: 62px;
  height: 30px;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}

.programma__card-title {
  font-family: var(--font-serif);
  font-weight: var(--fw-bold);
  font-size: var(--fs-lg);
  line-height: 1.27;
  color: var(--color-primary);
}

.programma__card-sub {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-sm);
  line-height: 1.25;
  color: var(--color-primary);
}

/* --- Badge Child Free (solo mobile) --- */

.programma__childfree {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  justify-content: center;
  width: 287px;
  min-height: 81px;
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--color-primary);
  border: 1px solid var(--color-primary-20);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: var(--radius-lg);
}

.programma__childfree strong {
  font-family: var(--font-serif);
  font-weight: var(--fw-bold);
  font-size: var(--fs-lg);
  line-height: 1.27;
  color: var(--color-white);
  text-align: center;
}

/* --- ≥ 768px: regole condivise desktop --- */

@media (min-width: 768px) {
  .programma__inner {
    gap: var(--spacing-xl);
  }

  /* Card in riga orizzontale, con wrap */
  .programma__timeline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  /* Connettore: esce dal bordo destro, centrato verticalmente */
  .programma__connector {
    bottom: auto;
    left: auto;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    width: 1px;
    height: 22px;
  }

  /* Child Free visibile su tutti i desktop, riga sotto le card */
  .programma__childfree {
    display: flex;
  }
}

/* --- 768px–1415px: 2 card per riga --- */

@media (min-width: 768px) and (max-width: 1415px) {
  .programma__inner {
    padding-inline: var(--spacing-lg); /* 32px — lascia spazio a 2 × 287px + 8px = 582px */
  }

  .programma__timeline {
    max-width: 582px; /* forza esattamente 2 card per riga */
  }

  /* Nasconde il connettore delle card pari (ultima di ogni riga) */
  .programma__card:nth-child(2n) .programma__connector {
    display: none;
  }
}

/* --- ≥ 1416px: tutte e 4 le card in una riga --- */

@media (min-width: 1416px) {
  .programma__inner {
    padding-inline: var(--container-pad-x);
  }

  .programma__timeline {
    flex-wrap: nowrap;
    max-width: none;
  }
}

/* ============================================================
   STICKY BAR
   ============================================================ */

.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--color-bg);
  padding: 10px;
  /* Safe area per notch/home indicator iOS */
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  /* Nascosta di default, appare dopo la hero */
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-bar.is-visible {
  transform: translateY(0);
}

.sticky-bar__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: var(--max-width);
  margin-inline: auto;
}

/* CTA button — cresce su mobile */
.sticky-bar__cta {
  flex: 1;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-btn);
  border: 1px solid var(--color-primary-40);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.sticky-bar__cta:hover {
  opacity: 0.8;
}

/* Icon button */
.sticky-bar__icon-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.sticky-bar__icon-btn:hover {
  opacity: 0.85;
}

/* Compensa lo spazio occupato dalla barra */
body {
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
}

/* --- Desktop (≥ 768px) --- */
@media (min-width: 768px) {
  .sticky-bar {
    padding-inline: var(--container-pad-x);
  }

  /* CTA cresce per riempire lo spazio disponibile */
  .sticky-bar__cta {
    flex: 1;
    width: auto;
    max-width: 600px;
  }

  .sticky-bar__inner {
    justify-content: center;
    max-width: calc(var(--content-width) + var(--container-pad-x) * 2);
  }
}

/* ============================================================
   SCROLL REVEAL — Intersection Observer
   ============================================================ */

.js-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   SPLASH OVERLAY
   ============================================================ */

/* --- Keyframes --- */
@keyframes splash-fade-out {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* --- Layout --- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.splash__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.splash__video--desktop {
  display: none;
}

@media (min-width: 768px) {
  .splash__video--mobile {
    display: none;
  }
  .splash__video--desktop {
    display: block;
  }
}

/* --- Button --- */
.splash__btn {
  z-index: 2;
  display:        inline-flex;
  align-items:    center;
  justify-content: center;
  width:          min(327px, 80vw);
  height:         48px;
  background:     var(--color-btn);
  border:         1px solid var(--color-primary-40);
  border-radius:  6px;
  font-family:    var(--font-body);
  font-weight:    var(--fw-bold);
  font-size:      var(--fs-sm);
  color:          var(--color-primary);
  cursor:         pointer;
  transition:     background 0.2s ease, opacity 0.2s ease;
  flex-shrink:    0;
  margin-bottom: 15vh;
}

.splash__btn:hover {
  background: color-mix(in srgb, var(--color-btn) 85%, var(--color-primary));
}

.splash__btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* --- Closing animations --- */
.splash.is-closing {
  animation: splash-fade-out 1s ease forwards 2s;
  pointer-events: none;
}

/* --- Nessuna animazione per chi preferisce movimento ridotto --- */
@media (prefers-reduced-motion: reduce) {
  .splash.is-closing {
    animation-duration: 0.01ms;
  }
}

/* Nessuna animazione per chi preferisce movimento ridotto */
@media (prefers-reduced-motion: reduce) {
  .js-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
