/* JWallet landing. Font, palette e reset stanno in /base.css (linkato prima di
   questo file): qui solo le regole di layout della landing. */

body {
  font-size: 1.125rem;
  line-height: 1.6;
  background: var(--page-gradient) fixed;
}


/* ---------- header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 48px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}

.brand img {
  border-radius: 10px;
}

.top__link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--primary);
  border-radius: 999px;
  padding: 8px 18px;
  transition: background 0.15s, color 0.15s;
}

.top__link:hover {
  background: var(--primary);
  color: #fff;
}

/* ---------- layout ---------- */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 64px;
}

section {
  margin-top: clamp(64px, 10vw, 120px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--primary);
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
}

h1 span {
  color: var(--secondary);
  font-weight: 600;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

p {
  margin: 0 0 12px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-heading--center {
  justify-content: center;
  text-align: center;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  margin-top: clamp(24px, 5vw, 64px);
}

.lead {
  font-size: 1.25rem;
  color: var(--secondary);
  margin: 20px 0 28px;
}

.cta {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 28px;
  transition: background 0.15s;
}

.cta:hover {
  background: #352e66;
}

.note {
  margin-top: 16px;
  font-size: 1rem;
  color: var(--secondary);
}

.hero__pills {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__pills li {
  background: rgba(254, 251, 255, 0.75);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--primary);
}

.hero__visual {
  margin: 0;
}

.hero__visual .screen {
  max-width: 320px;
  margin: 0 auto;
}

/* ---------- cornice telefono ---------- */
.screen {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(27, 27, 33, 0.25);
}

.screen img {
  display: block;
  width: 100%;
  height: 100%;
  /* contain, non cover: una schermata tagliata sembra un bug */
  object-fit: contain;
}

/* aspect ratios per tipologia di schermata */
.screen--hero {
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 480 / 844;
}

.screen--hero video {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* schermate con tab bar in basso (home, spese, gruppi, notifiche) */
.screen--with-tabs {
  aspect-ratio: 1080 / 2289;
}

/* schermate senza tab bar (dettaglio, nuovo gruppo) */
.screen--no-tabs {
  aspect-ratio: 1080 / 2224;
}

/* AI screenshot (aspect ratio diverso: 392×691) */
.screen--ai {
  aspect-ratio: 392 / 691;
  max-width: 280px;
  width: 100%;
}

/* ---------- highlight (testo a fianco della screen AI) ---------- */
.highlight {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.highlight__lead {
  font-size: 1.125rem;
  color: var(--secondary);
  margin: 16px 0 20px;
  line-height: 1.7;
}

.highlight__detail {
  font-size: 1rem;
  color: var(--secondary);
}

.highlight__visual {
  margin: 0;
}

.highlight__visual .screen--ai {
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 480 / 844; /* stesse proporzioni del video sopra */
  /* bordino viola sfumato e chiaro: stacca senza pesare */
  border: 2px solid rgba(69, 62, 128, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    inset 0 0 6px rgba(69, 62, 128, 0.12),
    0 2px 12px rgba(27, 27, 33, 0.25);
  overflow: hidden;
}

.highlight__visual .screen--ai img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* taglia le bande sopra e sotto */
  /* zoom leggero: i bordi dell'immagine escono dalla cornice (pochi pixel) */
  transform: scale(1.05);
}

@media (max-width: 800px) {
  .highlight {
    grid-template-columns: 1fr;
  }

  .highlight__visual {
    order: -1;
  }
}

/* ---------- tour (carosello schermate) ---------- */
.tour__controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.tour__arrow {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.tour__arrow:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
}

.tour__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.tour__arrow:focus-visible,
.tour__dot:focus-visible,
.tour__track:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.tour__counter {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  width: 50px;
  text-align: center;
}

.tour__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 24px;
  padding-bottom: 20px;
  scrollbar-width: none;
}

.tour__track::-webkit-scrollbar {
  display: none;
}

.tour__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .tour__slide {
    flex: 0 0 calc(50% - 12px);
  }
  .tour__track {
    scroll-snap-type: none;
  }
}

@media (min-width: 1000px) {
  .tour__track {
    gap: 40px;
  }
  .tour__slide {
    flex: 0 0 calc(33.333% - 26.666px);
  }
}

.tour__slide .screen {
  flex-shrink: 0;
  width: 280px;
  aspect-ratio: 1080 / 2289;
}

.tour__caption {
  max-width: 280px;
  text-align: center;
}

.tour__caption h3 {
  margin: 0 0 4px;
}

.tour__caption p {
  font-size: 1rem;
  color: var(--secondary);
  margin: 0;
}

.tour__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.tour__dot {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.tour__dot::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.15s, transform 0.15s;
}

.tour__dot.is-active::before {
  background: var(--primary);
  transform: scale(1.2);
}

/* ---------- steps ---------- */
.steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}

.steps__list li {
  background: rgba(254, 251, 255, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.steps__list p {
  color: var(--secondary);
  margin: 0;
}

.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 16px;
}

/* ---------- features ---------- */
.feature {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.feature__copy p {
  color: var(--secondary);
  margin-top: 16px;
}

.feature__detail {
  font-size: 1rem;
}

.feature__visual {
  margin: 0;
}

.feature__visual .screen {
  max-width: 280px;
  margin: 0 auto;
  aspect-ratio: 1080 / 2289;
}

/* ---------- cards (piani) ---------- */
.cards__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: rgba(254, 251, 255, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.card p {
  color: var(--secondary);
  margin: 0;
}

/* ---------- chiusura ---------- */
.closing {
  text-align: center;
}

.closing p:not(.eyebrow) {
  color: var(--secondary);
  max-width: 480px;
  margin: 12px auto 28px;
}

.closing__stores {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- footer ---------- */
footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px 32px;
  align-items: center;
  padding: 24px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--border);
  color: var(--secondary);
  font-size: 1rem;
}

footer nav {
  display: flex;
  gap: 24px;
}

footer > :last-child {
  text-align: right;
}

@media (max-width: 800px) {
  footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  footer > :last-child {
    text-align: center;
  }
}

footer a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ---------- responsive ---------- */
@media (max-width: 800px) {
  .hero,
  .feature {
    grid-template-columns: 1fr;
  }

  .feature--reverse .feature__visual {
    order: -1;
  }

  .steps__list,
  .cards__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- demo video section ---------- */
.demo__visual {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.screen--demo {
  max-width: 100%;
  width: 380px; 
}

.demo__note {
  text-align: center;
  margin-top: 16px;
  color: var(--secondary);
  font-size: 0.9375rem;
}

/* responsive per demo */
@media (max-width: 480px) {
  .screen--demo {
    width: 100%;
    max-width: 320px;
  }
}
