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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--neutral-700);
  background: var(--color-surface-canvas);
  line-height: 1.5;
}

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

a {
  color: inherit;
}

.link {
  color: var(--color-text-link);
  text-decoration: underline;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 2rem;
  padding: 1.5rem 1.5rem 2rem;
  text-align: center;
  background: var(--color-surface-canvas) url("/assets/images/background-image.webp") no-repeat
    bottom center / contain;
}

.hero__logo {
  position: absolute;
  top: 2rem;
  left: 1.5rem;
}

.hero__logo img {
  height: 29px;
  width: auto;
}

.hero__intro {
  max-width: 720px;
  margin: 6rem auto 0;
}

.hero__title {
  margin: 0 0 1rem;
  color: var(--primary-700);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.5px;
  white-space: pre-wrap;
}

.hero__subtitle {
  margin: 0;
  color: var(--primary-700);
  font-size: 18px;
}

.hero__form {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  align-self: start;
}

/* ---------- Sign-in card ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 32rem;
  min-height: 540px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 32px 0 28px;
  text-align: center;
  overflow: hidden;
}

.card__terms {
  margin: 0;
  padding: 0 24px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--neutral-500);
  text-align: center;
}

.card__skeleton {
  display: grid;
  gap: 1rem;
  padding: 0 24px;
}

.card__skeleton-title,
.card__skeleton-subtitle,
.card__skeleton-input,
.card__skeleton-btn,
.card__skeleton-sso > div {
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    var(--neutral-200) 0%,
    var(--neutral-100) 50%,
    var(--neutral-200) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.card__skeleton-title {
  height: 32px;
  width: 72%;
  margin: 0 auto;
}

.card__skeleton-subtitle {
  height: 48px;
  width: 88%;
  margin: 0 auto;
}

.card__skeleton-input {
  height: 60px;
  width: 100%;
}

.card__skeleton-btn {
  height: 56px;
  width: 100%;
  border-radius: 9999px;
}

.card__skeleton-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.25rem 0;
}

.card__skeleton-divider::before,
.card__skeleton-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--neutral-300);
}

.card__skeleton-sso {
  display: flex;
  gap: 0.5rem;
}

.card__skeleton-sso > div {
  flex: 1;
  height: 48px;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card__skeleton-title,
  .card__skeleton-subtitle,
  .card__skeleton-input,
  .card__skeleton-btn,
  .card__skeleton-sso > div {
    animation: none;
    background: var(--neutral-200);
  }
}

/* ---------- Benefits ---------- */
.benefits {
  display: grid;
  gap: 3.5rem;
  padding: 4rem 2rem;
  background: var(--primary-700);
  color: var(--white);
  text-align: center;
}

.benefit {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.benefit__icon {
  width: 44px;
  height: 44px;
}

.benefit__title {
  margin: 0;
  font-weight: 700;
}

.benefit__desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Showcase ---------- */
.showcase {
  display: grid;
  gap: 3rem;
  align-items: center;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.showcase__title {
  margin: 0 0 1.5rem;
  color: var(--primary-700);
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 600;
  white-space: pre-wrap;
}

.showcase__body {
  margin: 0 0 1rem;
  color: var(--neutral-600);
}

.showcase__img {
  border-radius: var(--radius-xl);
  width: 100%;
  height: auto;
}

/* ---------- Callout ---------- */
.callout {
  display: grid;
  place-items: center;
  min-height: 300px;
  width: 100%;
  padding: 3rem 1.5rem;
  text-align: center;
  background: #3777d7;
}

.callout p {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 400;
  white-space: pre-wrap;
}

/* ---------- App stores ---------- */
.appstores {
  display: grid;
  gap: 2rem;
  justify-items: center;
  padding: 3rem 2rem;
  background: var(--primary-700);
  text-align: center;
}

.appstores__badges {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.appstores__heading {
  margin: 0;
  color: var(--white);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.3;
}

/* ---------- Footer ---------- */
.footer {
  display: grid;
  gap: 2rem;
  padding: 3rem 1.5rem;
  background: var(--neutral-200);
  color: var(--neutral-700);
  text-align: center;
}

.footer__top {
  display: grid;
  gap: 3rem;
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
}

.footer__logo {
  height: 29px;
  width: auto;
  margin: 0 auto;
}

.footer__cols {
  display: grid;
  gap: 3rem;
  align-items: start;
}

.footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer__col-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.footer__col a {
  text-decoration: none;
  font-weight: 500;
}

.footer__col a:hover {
  text-decoration: underline;
}

.footer__divider {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  border: none;
  border-top: 1px solid var(--neutral-300);
}

.footer__legal {
  display: grid;
  gap: 1rem;
  max-width: var(--max-content);
  margin: 0 auto;
  color: var(--neutral-500);
  font-size: 13px;
  text-align: left;
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .hero__title {
    font-size: 3rem;
    line-height: 46px;
  }
  .showcase__title {
    font-size: 2.5rem;
  }
  .callout {
    padding: 4rem 1.5rem;
  }

  .callout p {
    font-size: 1.75rem;
    line-height: 1.5;
  }
}

@media (min-width: 1024px) {
  .benefits {
    grid-auto-flow: column;
    gap: 6rem;
    text-align: left;
  }
  .benefit {
    justify-items: start;
  }
  .showcase {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
  .showcase--reverse .showcase__text {
    order: 2;
  }
  .footer {
    padding: 3rem 5rem;
  }
  .footer__top {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 2rem;
    text-align: left;
  }
  .footer__logo {
    margin: 0;
  }
  .footer__cols {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 4rem;
  }
}
