/* Page-specific overrides */

.feature-detail__media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-detail__media .app-screenshot {
  max-width: 340px;
}

.page-funzionalita .feature-detail {
  display: grid;
  gap: var(--space-7);
}

@media (min-width: 900px) {
  .page-funzionalita .feature-detail {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .page-funzionalita .feature-detail--reverse {
    direction: rtl;
  }

  .page-funzionalita .feature-detail--reverse > * {
    direction: ltr;
  }
}

.page-prezzi .pricing-compare-wrapper,
.page-piani .pricing-compare-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-6);
}

.page-faq .faq-list {
  max-width: 800px;
  margin-inline: auto;
}

.download-section {
  scroll-margin-top: calc(var(--nav-height) + var(--space-4));
}

.feature-scrollspy {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

.feature-scrollspy__media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.feature-scrollspy__image {
  width: min(100%, 440px);
  max-height: min(86svh, 860px);
  height: auto;
  object-fit: contain;
  margin-inline: auto;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  transition:
    opacity 360ms ease,
    transform 500ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.feature-scrollspy__image.is-switching {
  opacity: 0.14;
  transform: translateY(16px) scale(0.985);
}

.feature-scrollspy__steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 0;
}

.feature-step {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: var(--space-5) 0;
}

.feature-step__content {
  width: min(100%, 44rem);
  opacity: 0.3;
  transform: translateY(48px);
  transition:
    opacity 420ms ease,
    transform 560ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.feature-step.is-active .feature-step__content {
  opacity: 1;
  transform: translateY(0);
}

.feature-step__content ul {
  margin: 0;
  padding-left: 1.25rem;
}

@media (max-width: 899px) {
  html:has(body.page-funzionalita) {
    scroll-snap-type: y proximity;
    scroll-behavior: auto;
  }

  .feature-scrollspy-section {
    --scrollspy-sticky-top: calc(var(--nav-height) + var(--space-2));
    --scrollspy-media-height: min(54svh, 480px);
    --scrollspy-stage-height: calc(var(--scrollspy-sticky-top) + var(--scrollspy-media-height) + var(--space-3));
  }

  .feature-scrollspy__media {
    position: sticky;
    top: var(--scrollspy-sticky-top);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(var(--scrollspy-media-height) + var(--space-3));
    padding-block: var(--space-1);
    margin-bottom: 0;
    background: var(--ice);
    box-shadow: 0 28px 0 0 var(--ice);
    isolation: isolate;
  }

  .feature-scrollspy__steps {
    position: relative;
    z-index: 1;
  }

  .feature-scrollspy__image {
    width: min(92%, 420px);
    max-height: var(--scrollspy-media-height);
  }

  .feature-step {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin-top: var(--scrollspy-stage-height);
    height: calc(100svh - var(--scrollspy-stage-height));
    min-height: calc(100svh - var(--scrollspy-stage-height));
    align-items: flex-end;
    padding-block: var(--space-2) var(--space-4);
    box-sizing: border-box;
  }

  .feature-step__content {
    width: 100%;
    transform: translateY(20px);
    transition:
      opacity 280ms ease,
      transform 320ms ease,
      filter 280ms ease;
  }

  .feature-step:not(.is-active) .feature-step__content {
    opacity: 0.14;
    filter: blur(1px);
  }

  .feature-step.is-active .feature-step__content {
    opacity: 1;
    transform: translateY(0);
    filter: none;
  }

  .feature-step.is-past .feature-step__content {
    opacity: 0;
    transform: translateY(-20px);
    filter: blur(3px);
    pointer-events: none;
  }
}

@media (min-width: 900px) {
  .feature-scrollspy {
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.1fr);
    gap: var(--space-7);
  }

  .feature-scrollspy__media {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-4));
    min-height: calc(100svh - var(--nav-height) - var(--space-4));
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.page-funzionalita) {
    scroll-snap-type: none;
  }

  .feature-scrollspy__image,
  .feature-step,
  .feature-step__content {
    transition: none;
  }

  .feature-step__content,
  .feature-step:not(.is-active) .feature-step__content,
  .feature-step.is-past .feature-step__content {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  align-items: stretch;
  width: 100%;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 14px 8px 12px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
  flex: 1 1 10rem;
  min-width: 0;
  max-width: 100%;
}

.store-badge:hover {
  color: #fff;
  background: #1a1a1a;
}

.store-badge:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 2px;
}

.store-badge__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: block;
}

.store-badge__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}

.store-badge__eyebrow {
  display: block;
  font-size: 10px;
  font-weight: var(--font-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  opacity: 0.92;
}

.store-badge__name {
  display: block;
  font-size: 1.125rem;
  font-weight: var(--font-bold);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.store-badges__compat {
  flex: 1 1 100%;
  margin: var(--space-2) 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--slate);
  line-height: 1.5;
}

@media (max-width: 380px) {
  .store-badge {
    gap: 8px;
    padding: 8px 10px;
  }

  .store-badge__icon {
    width: 24px;
    height: 24px;
  }

  .store-badge__eyebrow {
    font-size: 9px;
  }

  .store-badge__name {
    font-size: 1rem;
  }
}

/* Plus landing & account area */

.page-plus .plus-landing-hero,
.page-piani .plus-landing-hero {
  padding: calc(var(--nav-height) + var(--space-7)) 0 var(--space-7);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(37, 99, 235, 0.12), transparent),
    var(--mist);
}

.plus-landing-hero__inner {
  max-width: 720px;
  text-align: center;
}

.plus-landing-hero__lead {
  max-width: 560px;
  margin-inline: auto;
}

.plus-landing-hero__price {
  margin: var(--space-6) 0 var(--space-5);
}

.plus-landing-hero__amount {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: var(--font-black);
  color: var(--ink);
}

.plus-landing-hero__period {
  font-size: 1.25rem;
  color: var(--slate);
}

.plus-landing-hero__actions {
  justify-content: center;
  margin-bottom: var(--space-4);
}

.plus-landing-hero__note {
  font-size: 14px;
  color: var(--slate);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-7);
}

.plus-benefits-grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .plus-benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plus-benefit-card {
  text-align: center;
  padding: var(--space-6);
}

.plus-benefit-card__icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--electric);
  font-weight: var(--font-black);
  font-size: 1.125rem;
}

.plus-benefit-card h3 {
  font-size: 1.0625rem;
  margin-bottom: var(--space-2);
}

.plus-benefit-card p {
  font-size: 14px;
  color: var(--slate);
  margin: 0;
}

.plus-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-4);
  max-width: 720px;
  margin-inline: auto;
}

.plus-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-5);
}

.plus-step__num {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--electric);
  color: var(--white);
  font-weight: var(--font-black);
  font-size: 14px;
}

.plus-step h3 {
  margin: 0 0 var(--space-1);
  font-size: 1.0625rem;
}

.plus-step p {
  margin: 0;
  font-size: 14px;
  color: var(--slate);
}

/* Account area */
.page-plus-account {
  background: var(--mist);
  min-height: 100vh;
}

.account-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(239, 243, 246, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.account-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--nav-height);
}

.account-header__meta {
  flex: 1;
  text-align: center;
}

.account-header__back {
  font-size: 14px;
  font-weight: var(--font-medium);
  color: var(--slate);
  text-decoration: none;
  white-space: nowrap;
}

.account-header__back:hover {
  color: var(--electric);
}

.account-main {
  padding: var(--space-6) 0 var(--space-8);
}

.account-shell {
  display: grid;
  gap: var(--space-5);
  align-items: start;
}

@media (min-width: 960px) {
  .account-shell {
    grid-template-columns: 280px 1fr;
  }
}

.account-sidebar {
  padding: var(--space-5);
}

.account-sidebar__user {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--electric);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-black);
  flex-shrink: 0;
}

.account-sidebar__label {
  font-size: 12px;
  color: var(--slate);
  margin: 0 0 2px;
}

.account-sidebar__email {
  font-size: 14px;
  font-weight: var(--font-bold);
  margin: 0;
  word-break: break-all;
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.account-nav__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: var(--radius-input);
  background: transparent;
  font: inherit;
  font-weight: var(--font-medium);
  color: var(--slate);
  cursor: pointer;
}

.account-nav__item:hover,
.account-nav__item.is-active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--electric);
}

.account-sidebar__status {
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-input);
  font-size: 13px;
  font-weight: var(--font-bold);
}

.account-sidebar__status--plus {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.account-sidebar__status--free {
  background: rgba(0, 0, 0, 0.04);
  color: var(--slate);
}

.account-content {
  min-width: 0;
}

.account-panel {
  padding: var(--space-6);
}

.account-panel__head {
  margin-bottom: var(--space-6);
}

.account-panel__head h1 {
  margin-bottom: var(--space-2);
}

.account-panel__head .lead {
  margin: 0;
}

.account-loading {
  text-align: center;
  padding: var(--space-8);
  color: var(--slate);
}

.account-is-loading .account-panel {
  opacity: 0.65;
  pointer-events: none;
}

.account-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-5) 0;
  color: var(--slate);
  font-size: 13px;
}

.account-divider::before,
.account-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.account-app-hint--inset {
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.5);
}

.account-app-hint h2 {
  font-size: 1rem;
  margin-bottom: var(--space-2);
}

.account-app-hint p {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: var(--space-4);
}

.account-status-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-input);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: var(--space-5);
}

.account-status-card__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: 14px;
}

.account-status-card__label {
  color: var(--slate);
}

.account-status-card__value {
  font-weight: var(--font-bold);
  text-align: right;
}

.account-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: var(--font-bold);
}

.account-status-badge.is-active {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.account-status-badge.is-warning {
  background: rgba(217, 119, 6, 0.12);
  color: var(--warning);
}

.account-status-badge.is-muted {
  background: rgba(0, 0, 0, 0.06);
  color: var(--slate);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.account-actions .btn-lg {
  flex: 1 1 100%;
}

.account-support-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
}

.account-support-list li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.account-support-list a {
  display: block;
  padding: var(--space-4) 0;
  font-weight: var(--font-medium);
  color: var(--electric);
  text-decoration: none;
}

.site-footer--minimal {
  margin-top: auto;
}

.btn-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-btn);
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--white);
  color: var(--ink);
  font-weight: var(--font-bold);
  cursor: pointer;
}

.btn-auth:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(37, 99, 235, 0.25);
}

.btn-auth__icon {
  width: 1.25rem;
  text-align: center;
  font-weight: var(--font-black);
}

.btn-auth--google .btn-auth__icon {
  color: #4285f4;
}

.btn-auth--apple .btn-auth__icon::before {
  content: "";
}

.btn-auth--email .btn-auth__icon {
  color: var(--electric);
}

@media (max-width: 959px) {
  .account-header__meta {
    display: none;
  }
}
