*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #142e57;
  background: #f4f8ff;
  line-height: 1.5;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

ol {
  list-style: none;
}

.page {
  width: 100%;
  margin: 0 auto;
  background: #f4f8ff;
}

.section-head h2 {
  font-size: 36px;
  font-weight: 800;
  line-height: 54px;
  letter-spacing: -0.9px;
  color: #142e57;
}

.section-bar {
  display: block;
  width: 64px;
  height: 6px;
  margin-top: 8px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #1464f4, #00d4da);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16.8px 38.4px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #1464f4, #00d4da);
  color: #fff;
  font-size: 21.6px;
  font-weight: 700;
  line-height: 32.4px;
  white-space: nowrap;
}

.btn-cta img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.btn-cta--md {
  padding: 15.4px 35.2px;
  font-size: 19.8px;
  line-height: 29.7px;
  gap: 11px;
}

.btn-cta--md img {
  width: 22px;
  height: 22px;
}

#how-it-works {
  scroll-margin-top: 88px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 34px;
  background: #f4f8ff;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 25px;
}

.header__logo-img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
}

.header__logo span {
  font-size: 24px;
  font-weight: 800;
  line-height: 27px;
  letter-spacing: -0.45px;
  color: #000;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header__nav-link {
  font-size: 18px;
  font-weight: 500;
  line-height: 27px;
  color: #142e57;
  padding-left: 36px;
}

.header__nav-link:first-child {
  padding-left: 0;
}

.header__nav-link--active {
  font-weight: 700;
  color: #1464f4;
}

.header__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.header__toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #142e57;
  border-radius: 2px;
}

.nav-backdrop {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  height: 618px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__copy {
  position: relative;
  z-index: 2;
  width: 586px;
  padding: 87px 0 0 49px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  padding: 9.6px 19.2px;
  margin-bottom: 28.8px;
  background: #e5eef9;
  border-radius: 9999px;
  font-size: 21.6px;
  font-weight: 600;
  line-height: 32.4px;
  color: #142e57;
}

.hero__title {
  margin-bottom: 24px;
  font-size: 43.2px;
  font-weight: 800;
  line-height: 50.976px;
  letter-spacing: -1.08px;
  color: #142e57;
}

.hero__desc {
  max-width: 534px;
  margin-bottom: 38.4px;
  font-size: 19.2px;
  font-weight: 500;
  line-height: 31.2px;
  color: #526783;
}

.hero__phone {
  position: absolute;
  left: auto;
  right: clamp(48px, calc(268px - (100vw - 1280px) * 0.35), 268px);
  top: 64px;
  z-index: 2;
}

/* Phone mockup */
.phone {
  width: 250.5px;
  height: 526.8px;
  flex-shrink: 0;
}

.phone__screen {
  position: absolute;
  left: 11.6px;
  top: 13.4px;
  width: 226.56px;
  height: 490.58px;
  object-fit: cover;
  border-radius: 28px;
}

.phone__screen--loans {
  object-position: top center;
}

.phone__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

/* Flexibility */
.flex-sec {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 32px 34px 0;
}

.flex-sec__cards {
  display: flex;
  gap: 24px;
}

.info-card {
  flex: 1;
  display: flex;
  align-items: flex-start;
  min-width: 0;
  padding: 29px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.info-card__icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: #e3f4fc;
  border-radius: 16px;
  overflow: hidden;
}

.info-card__icon img {
  width: 64px;
  height: 64px;
  object-fit: cover;
}

.info-card h3 {
  padding-left: 20px;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
}

.info-card p {
  padding-left: 20px;
  margin-top: 8px;
  font-size: 16px;
  line-height: 26px;
  color: #526783;
}

/* How it works */
.how {
  padding: 88px 34px;
}

.how__steps {
  display: flex;
  gap: 32px;
  margin-top: 48px;
}

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

.how__icon-row {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.how__icon {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: #e3f4fc;
  border-radius: 16px;
}

.how__icon img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.how__badge {
  position: absolute;
  left: -12px;
  top: -12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #1464f4;
  border-radius: 9999px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.how__line {
  flex: 1;
  height: 0;
  margin: 0 8px 0 16px;
  border-bottom: 2px dashed #a5c7e8;
}

.how__step h3 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
}

.how__step p {
  font-size: 16px;
  line-height: 26px;
  color: #526783;
}

/* Glance */
.glance {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 494px;
  margin: 0 20px;
  padding: 4% 6.3% 0 6.3%;
  overflow: hidden;
  background: linear-gradient(90deg, #ebf4fe 0%, #e2f1fc 50%, #ddf7f8 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.glance__phone {
  position: relative;
  flex-shrink: 0;
}

.glance__copy {
  margin-left: 80px;
  max-width: 682px;
  flex: 1;
}

.glance__copy h2 {
  font-size: 39.6px;
  font-weight: 800;
  line-height: 49.5px;
  color: #142e57;
}

.glance__copy p {
  max-width: 551px;
  margin: 18px 0 18px;
  font-size: 17.6px;
  font-weight: 500;
  line-height: 28.6px;
  color: #526783;
}

/* Footer */
.footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 96px;
  padding: 57px 20px 56px;
  background: #eaf2fc;
  border-top: 1px solid #dfe8f5;
}

.footer__brand {
  max-width: 563px;
}

.footer__name {
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.4px;
  text-transform: capitalize;
  color: #142e57;
}

.footer__brand p {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #526783;
}

.footer__brand p + p {
  margin-top: 6px;
}

.footer__brand a {
  color: #526783;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 32px;
  min-width: 200px;
}

.footer__links a {
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: #142e57;
}

/* 769–1279: keep 1280 layout and scale it to the viewport */
@media (min-width: 769px) and (max-width: 1279px) {
  html,
  body {
    overflow-x: hidden;
  }

  .page {
    width: 1280px;
    zoom: calc(100vw / 1280);
  }
}

/* 1280+: real 100% full-width layout, no canvas zoom */
@media (min-width: 1280px) {
  html,
  body {
    overflow-x: hidden;
  }

  .page {
    width: 100%;
    max-width: none;
    margin: 0;
    zoom: 1;
  }

  .header {
    padding: 0 2.66%;
  }

  .flex-sec,
  .how {
    padding-left: 2.66%;
    padding-right: 2.66%;
  }

  .footer {
    padding-left: 1.56%;
    padding-right: 1.56%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .page {
    width: 100%;
  }

  body.nav-open {
    overflow: hidden;
  }

  .header {
    padding: 0 16px;
  }

  .header__logo {
    gap: 10px;
  }

  .header__logo-img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .header__logo span {
    font-size: 20px;
  }

  .header__nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 120;
    width: min(300px, 84vw);
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 88px 24px 32px;
    background: #fff;
    box-shadow: -8px 0 24px rgba(20, 46, 87, 0.12);
    transform: translateX(100%);
    transition: transform 0.24s ease;
  }

  body.nav-open .header__nav {
    transform: translateX(0);
  }

  .header__nav-link {
    display: block;
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid #e8eef6;
  }

  .header__toggle {
    display: flex;
    z-index: 130;
  }

  body.nav-open .header__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.nav-open .header__toggle-bar:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .header__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(20, 46, 87, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .hero {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 32px;
  }

  .hero__copy {
    width: 100%;
    padding: 28px 20px 0;
  }

  .hero__pill {
    font-size: 14px;
    line-height: 22px;
    padding: 8px 14px;
    margin-bottom: 16px;
  }

  .hero__title {
    font-size: 32px;
    line-height: 38px;
    margin-bottom: 12px;
  }

  .hero__desc {
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 20px;
  }

  .btn-cta {
    font-size: 16px;
    line-height: 24px;
    padding: 12px 24px;
  }

  .hero__phone {
    position: relative;
    left: auto;
    top: auto;
    right: 6%;
    margin: 28px auto 0;
  }

  .section-head h2,
  .glance__copy h2 {
    font-size: 26px;
    line-height: 34px;
  }

  .flex-sec,
  .how {
    padding: 40px 16px;
  }

  .flex-sec__cards,
  .how__steps,
  .glance,
  .footer {
    flex-direction: column;
  }

  .how__line {
    display: none;
  }

  .how__steps {
    gap: 28px;
    margin-top: 28px;
  }

  .glance {
    height: auto;
    margin: 0 16px;
    padding: 32px 20px 8px;
    align-items: center;
  }

  .glance__phone {
    margin: 0 auto;
  }

  .glance__copy {
    margin: 24px 0 32px;
    max-width: none;
  }

  .footer {
    margin-top: 48px;
    padding: 32px 20px;
    gap: 24px;
  }

  .footer__links {
    padding-left: 0;
  }
}
