/* Accounts page — full redesign */

/* Reset layout.css main section padding without blocking section-specific spacing */
body.accounts-page main > section {
  background: transparent;
}

body.accounts-page main > section.acc-hero {
  padding: 2.75rem 0 3rem;
}

body.accounts-page main > section.acc-stats-wrap {
  padding: 2rem 0 0;
}

body.accounts-page main > section.acc-benefits {
  padding: 3.5rem 0 5rem;
}

body.accounts-page main > section.acc-cta {
  padding: 0 0 4rem;
}

.acc-page {
  background: var(--color-bg);
}

/* —— Hero —— */
.acc-hero {
  background: linear-gradient(165deg, #f0f9ff 0%, #ffffff 55%, #f8fafc 100%);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.acc-hero__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.acc-hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.acc-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 5.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.acc-hero__lead {
  margin: 0 0 1.75rem;
  max-width: 32rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.acc-hero__btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 20rem;
}

.acc-hero__art {
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

/* Three castles in one row */
.acc-castle-stack {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.5rem);
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  padding: 0.25rem 0;
}

.acc-castle-stack__img {
  display: block;
  flex: 1 1 0;
  width: auto;
  max-width: 130px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.12));
  pointer-events: none;
  user-select: none;
}

/* —— Stats bar —— */
.acc-stats-wrap {
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.acc-stats-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.acc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.75rem 1.25rem;
  margin: 0;
  text-align: center;
  opacity: 1;
  transform: none;
}

/* Animated entrance when JS runs (desktop + mobile) */
.js-acc-stats .acc-stat {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

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

.acc-stat.is-visible:nth-child(1) { transition-delay: 0ms; }
.acc-stat.is-visible:nth-child(2) { transition-delay: 120ms; }

.acc-stat__label {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
}

.acc-stat__hint {
  margin: 0.25rem 0 0;
  max-width: 16rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  text-align: center;
}

.acc-stat__value--range {
  margin: 0.15rem 0;
}

.acc-stat__value--range span {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.03em;
}

.acc-stat__value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.05em;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.acc-stat__number {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.03em;
}

.acc-stat__number.is-done {
  animation: acc-pop 0.4s ease;
}

.acc-stat__suffix {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
}

@keyframes acc-pop {
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* —— Benefits —— */
.acc-benefits {
  margin-top: 0;
  background: var(--color-bg-muted);
}

.acc-section-head {
  text-align: center;
  margin: 0 0 3rem;
  padding-top: 0.5rem;
}

.acc-section-head__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.acc-section-head__sub {
  margin: 0 auto;
  max-width: 28rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.acc-benefit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

.acc-benefit {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.15rem;
  align-items: start;
  padding: 1.65rem 1.5rem;
  margin: 0;
}

.acc-benefit__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--color-primary-light), #fff);
  border: 1px solid var(--color-border);
}

.acc-benefit__icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.acc-benefit__title {
  margin: 0 0 0.4rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.acc-benefit__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.acc-benefit__text strong {
  color: var(--color-text);
  font-weight: 600;
}

/* —— CTA band —— */
.acc-cta {
  background: var(--color-bg);
}

.acc-cta__box {
  margin-top: 4.5rem;
  text-align: center;
  padding: 2.75rem 1.75rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: var(--color-text-inverse);
  box-shadow: 0 12px 40px rgba(11, 142, 201, 0.28);
}

/* Gap above footer */
body.accounts-page .site-footer {
  margin-top: 2.5rem;
}

.acc-cta__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: 800;
  color: #fff;
}

.acc-cta__text {
  margin: 0 auto 1.75rem;
  max-width: 26rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.acc-cta__btns {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  max-width: 22rem;
  margin-inline: auto;
}

.acc-cta .btn-primary {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.acc-cta .btn-primary:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-hover);
}

.acc-cta .btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}

.acc-cta .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.btn-lg {
  min-height: 48px;
  padding: 0.85rem 1.35rem;
  font-size: 0.9375rem;
}

/* —— Responsive —— */
@media (min-width: 600px) {
  .acc-stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .acc-stat {
    padding: 2rem 1.5rem;
  }

  .acc-hero__btns {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: none;
  }

  .acc-hero__btns .btn {
    flex: 0 1 auto;
  }

}

@media (min-width: 768px) {
  body.accounts-page main > section.acc-hero {
    padding: 3.5rem 0 3.75rem;
  }

  body.accounts-page main > section.acc-benefits {
    padding-bottom: 5rem;
  }

  body.accounts-page main > section.acc-cta {
    padding-bottom: 5rem;
  }

  .acc-hero__grid {
    grid-template-columns: 1fr min(46%, 420px);
    gap: 2.5rem;
  }

  .acc-castle-stack {
    max-width: 460px;
    gap: 1.75rem;
  }

  .acc-castle-stack__img {
    max-width: 150px;
  }

  .acc-stats-wrap {
    margin-bottom: 4rem;
  }

  body.accounts-page main > section.acc-benefits {
    padding-top: 4rem;
    padding-bottom: 5.5rem;
  }

  .acc-cta__box {
    margin-top: 5rem;
  }

  .acc-section-head {
    margin-bottom: 3.5rem;
  }

  .acc-benefit-list {
    gap: 1.5rem;
  }

  .acc-benefit {
    padding: 1.85rem 1.65rem;
  }

  .acc-cta__box {
    padding: 3rem 2.5rem;
  }

  body.accounts-page .site-footer {
    margin-top: 3.5rem;
  }

  .acc-cta__btns {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 36rem;
  }

  .acc-cta__btns .btn {
    flex: 1 1 14rem;
    max-width: 17rem;
  }
}

@media (min-width: 1024px) {
  .acc-benefit-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }

  .acc-benefit {
    grid-template-columns: 1fr;
    text-align: center;
    align-items: center;
    padding: 2rem 1.5rem;
  }

  .acc-benefit__icon {
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .acc-stat,
  .acc-stat__number {
    transition: none;
    animation: none;
  }

  .acc-stat {
    opacity: 1;
    transform: none;
  }
}
