/* Mobile & tablet — iOS / Android */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* —— Nav: menu + compact header —— */
.nav-pill__menu {
  display: none;
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--black);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

.nav-pill__menu[aria-expanded="true"] {
  background: #f3f4f6;
}

@media (max-width: 899px) {
  .nav-pill__menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-pill {
    width: calc(100% - var(--page-pad) * 2 - env(safe-area-inset-left) - env(safe-area-inset-right));
    padding: 0.8rem 0.8rem 0.8rem 1.2rem;
    gap: 6px;
  }

  .nav-pill.is-scrolled {
    left: calc(var(--page-pad) + env(safe-area-inset-left));
    right: calc(var(--page-pad) + env(safe-area-inset-right));
  }

  .nav-pill__links {
    display: none;
    position: fixed;
    z-index: 210;
    top: calc(5.6rem + env(safe-area-inset-top));
    left: var(--page-pad);
    right: var(--page-pad);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(1, 51, 48, 0.18);
    max-height: calc(100dvh - 7rem - env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .nav-pill__links.is-open {
    display: flex;
  }

  .nav-pill__links a {
    padding: 14px 16px;
    font-size: 1.6rem;
    border-radius: 12px;
  }

  .nav-pill__actions .btn-connect .btn__label {
    font-size: 0;
    width: 1px;
    overflow: hidden;
    position: absolute;
    clip: rect(0, 0, 0, 0);
  }

  .nav-pill__actions .btn-connect {
    min-width: 4.4rem;
    min-height: 4.4rem;
    padding: 0 14px;
    border-radius: 999px;
  }

  .nav-pill__actions .btn-connect::after {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")
      center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")
      center / contain no-repeat;
  }

  .nav-pill__actions .btn-connect.is-connected::after {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  }
}

/* —— Hero mobile —— */
@media (max-width: 899px) {
  .hero {
    padding-bottom: 4.8rem;
  }

  .hero__grid {
    padding-top: 1.6rem;
    gap: 2.4rem;
  }

  .hero__title {
    font-size: clamp(3.6rem, 14vw, 5.2rem);
    text-align: center;
  }

  .hero__line {
    display: block;
  }

  .hero__promo {
    max-width: 100%;
  }

  .hero__lead {
    font-size: 1.6rem;
    line-height: 1.45;
  }

  .hero__cta .btn--lg {
    width: 100%;
    max-width: 28rem;
    min-height: 5.2rem;
  }

  .hero__media {
    min-height: 220px;
  }

  .hero__cards {
    max-width: min(100%, 36rem);
  }

  .hero__float-wrap {
    margin-left: 0;
    margin-top: 0;
  }
}

/* —— Features: touch scroll, no sticky pin gap —— */
@media (max-width: 767px) {
  .features {
    padding-top: 3.2rem;
  }

  .features__title {
    font-size: clamp(2.2rem, 6.5vw, 3.2rem);
    padding: 0 var(--pad);
  }

  .features__viewport {
    scroll-snap-type: x mandatory;
  }

  .fcard {
    scroll-snap-align: center;
  }

  .fcard__body h3 {
    font-size: 1.8rem;
  }

  .fcard__body p {
    font-size: 1.4rem;
  }
}

/* —— Pricing table mobile —— */
@media (max-width: 767px) {
  .pricing.has-flap-top .pricing__wrap {
    padding-top: 2.4rem;
  }

  .pricing__intro {
    padding: 20px 16px;
  }

  .pricing__h2 {
    font-size: clamp(2.2rem, 6vw, 3rem);
  }

  .pricing__plan {
    padding: 20px 12px;
  }

  .pricing__plan .btn {
    width: 100%;
    min-height: 4.8rem;
  }

  .section-flap {
    height: 2rem;
  }
}

/* —— Lifestyle / metal —— */
@media (max-width: 899px) {
  .lifestyle__title {
    margin-bottom: 2.4rem;
    font-size: clamp(2.2rem, 6vw, 3.2rem);
  }

  .lifestyle__grid {
    gap: 16px;
  }

  .metal__grid {
    gap: 28px;
  }

  .metal__title {
    font-size: clamp(2.4rem, 7vw, 3.6rem);
  }

  .metal__copy .btn--lg {
    width: 100%;
    max-width: 28rem;
    min-height: 5.2rem;
  }
}

/* —— Subpages —— */
@media (max-width: 899px) {
  .page__nav {
    flex-wrap: wrap;
    padding: 0.8rem var(--pad);
    gap: 8px;
  }

  .page__nav-groups {
    display: none;
  }

  .page__nav-end {
    margin-left: auto;
  }

  .page__nav-end .btn-connect .btn__label {
    font-size: 1.3rem;
  }

  .page__hero {
    padding: 2.4rem 0 3.2rem;
  }

  .page__hero h1 {
    font-size: clamp(2.4rem, 7vw, 3.6rem);
  }

  .page__hero__cta .btn--lg {
    width: 100%;
    max-width: 28rem;
    min-height: 5.2rem;
  }
}

/* —— FAQ touch —— */
@media (max-width: 899px) {
  .faq__grid {
    gap: 24px;
  }

  .faq__item summary {
    padding: 16px 0;
    font-size: 1.5rem;
    min-height: 48px;
  }
}

/* —— Dock & toast safe areas —— */
@media (max-width: 899px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .dock {
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
  }

  .dock .btn {
    min-height: 5.2rem;
    font-size: 1.6rem;
  }

  .toast {
    bottom: calc(88px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));
    font-size: 1.3rem;
  }
}

/* —— Wallet picker sheet —— */
.wallet-picker {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.wallet-picker[hidden] {
  display: none !important;
}

.wallet-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 20, 18, 0.55);
  backdrop-filter: blur(4px);
}

.wallet-picker__sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 48rem;
  max-height: min(85dvh, 640px);
  margin: 0 auto;
  padding: 2rem 2rem calc(2rem + env(safe-area-inset-bottom));
  background: var(--white);
  border-radius: 20px 20px 0 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.2);
}

@media (min-width: 600px) {
  .wallet-picker {
    align-items: center;
    padding: 24px;
  }

  .wallet-picker__sheet {
    border-radius: 20px;
    padding-bottom: 2rem;
  }
}

.wallet-picker-open {
  overflow: hidden;
}

.wallet-picker__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--black);
}

.wallet-picker__title {
  margin: 0 3.6rem 0.8rem 0;
  font-size: 2rem;
  font-weight: 600;
  color: var(--green-dark);
}

.wallet-picker__lead {
  margin: 0 0 1.6rem;
  font-size: 1.4rem;
  line-height: 1.45;
  color: var(--gray);
}

.wallet-picker__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wallet-picker__item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid var(--gray-border);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.wallet-picker__item:active {
  transform: scale(0.98);
  background: #f8faf9;
}

.wallet-picker__item:hover {
  border-color: var(--green-mid);
  background: #f8faf9;
}

.wallet-picker__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: #f3f4f6;
}

.wallet-picker__name {
  flex: 1;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--green-dark);
}

.wallet-picker__tag {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--gray);
}

.wallet-picker__foot {
  margin: 1.6rem 0 0;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--gray-mid);
  text-align: center;
}
