/* ===========================
   CSS Custom Properties
   (Matched to Figma design tokens)
   =========================== */
:root {
  --night: #170A2D;
  --dark-grey: #6C687E;
  --monet: #A79EE8;
  --grey-monet: #F8F8FF;
  --white: #FFFFFF;

  --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 1280px;
  --container-padding: 56px;
  --section-padding: 120px;

  --radius-btn: 16px;
  --radius-card: 16px;
}

/* ===========================
   Reset & Base
   =========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--night);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.3;
  color: var(--night);
}

/* ===========================
   Utilities
   =========================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 56px;
  letter-spacing: -1.12px;
  margin-bottom: 20px;
}

.section-header p {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 8px 40px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.21px;
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  border: 1px solid var(--night);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--night);
  color: var(--white);
}

.btn--primary:hover {
  background: #2D1B69;
  border-color: #2D1B69;
}

.btn--outline {
  background: transparent;
  color: var(--night);
}

.btn--outline:hover {
  background: var(--night);
  color: var(--white);
}

.btn--sm {
  height: 40px;
  padding: 6px 28px;
  font-size: 13px;
}

/* ===========================
   Navbar
   =========================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid #E0DDE6;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 600;
  color: var(--night);
}

.navbar__logo-icon {
  width: 32px;
  height: 32px;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar__links a:not(.btn) {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.21px;
  text-transform: uppercase;
  color: var(--night);
  transition: color 0.2s;
}

.navbar__links a:not(.btn)::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: var(--night);
  position: absolute;
  bottom: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.navbar__links a:not(.btn):hover::after {
  opacity: 1;
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--night);
  transition: all 0.3s;
}

.navbar__toggle--active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle--active span:nth-child(2) {
  opacity: 0;
}

.navbar__toggle--active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===========================
   Hero
   =========================== */
.hero {
  display: flex;
  align-items: center;
  background: linear-gradient(315deg, #F7DD6D, #FCECAC, #CDCDF7, #A79EE8);
  background-size: 150% 150%;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
  text-align: center;
  min-height: 750px;
  animation: hero-gradient 15s ease infinite;
}

.hero h1 {
  font-size: 64px;
  letter-spacing: -1.28px;
  margin-bottom: 24px;
}

.hero__sub {
  font-size: 24px;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================
   Content Block (Text + Image)
   =========================== */
.content-block {
  padding: var(--section-padding) 0;
}

.content-block__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.content-block__text {
  padding-right: 80px;
}

.content-block__text h2 {
  font-size: 56px;
  letter-spacing: -1.12px;
  margin-bottom: 8px;
}

.content-block__text p {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 40px;
}

.content-block__image {
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 624/500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-block__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-card);
}

/* ===========================
   Stats Block
   =========================== */
.stats {
  padding: 32px 0 var(--section-padding);
}

.stats__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.stats__item {
  border-top: 1px solid var(--dark-grey);
  padding-top: 32px;
}

.stats__item h3 {
  font-size: 40px;
  letter-spacing: -0.6px;
  margin-bottom: 16px;
}

.stats__item ul {
  list-style: disc;
  padding-left: 24px;
}

.stats__item li {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.16px;
}

/* ===========================
   Features
   =========================== */
.features {
  padding: var(--section-padding) 0;
  background: var(--grey-monet);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.feature-card__image {
	margin-bottom: 24px;
}

.feature-card h3 {
  font-size: 40px;
  letter-spacing: -0.6px;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.16px;
  line-height: 1.5;
}

/* ===========================
   How It Works
   =========================== */
.how-it-works {
  padding: var(--section-padding) 0;
}

.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 56px;
}

.step:last-child {
  margin-bottom: 0;
}

.step__number {
  display: block;
  font-size: 24px;
  font-weight: 500;
  color: var(--dark-grey);
  margin-bottom: 8px;
}

.step__text h3 {
  font-size: 48px;
  letter-spacing: -0.72px;
  margin-bottom: 16px;
}

.step__text p {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  max-width: 420px;
}

.step__text {
  padding-right: 80px;
}

/* ===========================
   CTA
   =========================== */
.cta {
  background: linear-gradient(128.23deg, #A79EE8 0.24%, #CDCDF7 51.56%, #FCECAC 100%);
  padding: 80px 0;
  text-align: center;
}

.cta__inner {
  max-width: 800px;
  margin: 0 auto;
}

.cta h2 {
  font-size: 56px;
  letter-spacing: -1.12px;
  margin-bottom: 16px;
}

.cta p:not(.btn) {
  font-size: 24px;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 32px;
}

/* ===========================
   Footer
   =========================== */
.footer {
  background: var(--night);
  color: var(--grey-monet);
  padding: 48px 0 32px;
}

.footer .container {
  max-width: calc(var(--container-max) + 2 * var(--container-padding));
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 56px;
}

.footer__nav {
  display: flex;
  gap: 24px;
}

.footer__nav a,
.footer__back-to-top {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.21px;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.footer__nav a:hover,
.footer__back-to-top:hover {
  opacity: 0.7;
}

.footer__back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer__logo {
  text-align: center;
  margin-bottom: 56px;
}

.footer__logo img {
  margin-inline: auto;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.14px;
  line-height: 1.6;
}

.footer__legal {
  display: flex;
  gap: 24px;
}

.footer__legal a {
  transition: opacity 0.2s;
}

.footer__legal a:hover {
  opacity: 0.7;
}

/* ===========================
   Tablet (max-width: 1024px)
   =========================== */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
    --container-padding: 32px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero__sub {
    font-size: 20px;
  }

  .content-block__text {
    padding-right: 40px;
  }

  .content-block__text h2 {
    font-size: 40px;
  }

  .section-header h2 {
    font-size: 44px;
  }

  .step__text {
    padding-right: 40px;
  }

  .step__text h3 {
    font-size: 36px;
  }

  .step {
    gap: 32px;
    margin-bottom: 48px;
  }

  .features__grid {
    gap: 24px;
  }

  .feature-card h3 {
    font-size: 28px;
  }

  .stats__item h3 {
    font-size: 32px;
  }

  .cta h2 {
    font-size: 44px;
  }

  .cta p {
    font-size: 20px;
  }
}

/* ===========================
   Tablet Portrait (max-width: 768px)
   =========================== */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 80px;
  }

  :root {
    --section-padding: 64px;
    --container-padding: 24px;
  }

  /* Navbar mobile */
  .navbar__toggle {
    display: flex;
  }

  .navbar__links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid #E0DDE6;
    gap: 20px;
  }

  .navbar__links--open {
    display: flex;
  }

  /* Hero */
  .hero {
    padding: 80px 0 64px;
    min-height: 0;
  }

  .hero h1 {
    font-size: 36px;
    letter-spacing: -0.72px;
  }

  .hero__sub {
    font-size: 16px;
  }

  /* Content block stack */
  .content-block__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .content-block__text {
    padding-right: 0;
  }

  .content-block__text h2 {
    font-size: 36px;
  }

  /* Stats stack */
  .stats__inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .stats__item {
    padding-bottom: 32px;
    margin-bottom: 32px;
  }

  .stats__item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .stats__item h3 {
    font-size: 28px;
  }

  /* Features 2-col */
  .features__grid {
    gap: 20px;
  }

  .feature-card h3 {
    font-size: 22px;
  }

  .feature-card__image {
    padding: 16px;
  }

  /* Steps stack */
  .step {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .step__text {
    padding-right: 0;
  }

  .step__text h3 {
    font-size: 32px;
  }

  .section-header h2 {
    font-size: 36px;
  }

  .cta h2 {
    font-size: 36px;
  }

  .cta p {
    font-size: 18px;
  }

  /* Footer */
  .footer__top {
    gap: 24px;
    align-items: flex-start;
  }

  .footer__nav {
    flex-direction: column;
    flex-wrap: wrap;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ===========================
   Mobile (max-width: 480px)
   =========================== */
@media (max-width: 480px) {
  :root {
    --section-padding: 48px;
    --container-padding: 20px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero__sub {
    font-size: 14px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero__actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .content-block__text h2 {
    font-size: 28px;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .feature-card h3 {
    font-size: 24px;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .step__text h3 {
    font-size: 24px;
  }

  .cta h2 {
    font-size: 28px;
  }

  .cta p {
    font-size: 16px;
  }

  .stats__item h3 {
    font-size: 24px;
  }
}

/* ===========================
   Keyframes.
   =========================== */
@keyframes hero-gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
