/* Moogli · coming soon
   Source of truth: Figma inAExVleSpI0Whh2Ukungu, page «Chosen · Pantalla carrusel»
   (desktop 10:301, phone 20:1907, slides 10:300). */

@font-face {
  font-family: "Circular";
  src: url("/assets/fonts/CircularXXWeb-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Circular";
  src: url("/assets/fonts/CircularXXWeb-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Circular";
  src: url("/assets/fonts/CircularXXWeb-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --lime: #ecf86e;
  --indigo: #3a3ee2;
  --indigo-hover: #2e32c4;
  --title: #141414;
  --text: #71717a;
  --border: #e9ebf0;
  --dot-inactive: #8b8b94; /* ≥ 3:1 on white (WCAG 1.4.11); Figma uses the border grey */
  --indigo-bg: #edf2ff;
  --brand-second: #dadbf1;
  --ad-dark-from: #20227c;
  --ad-dark-to: #4043c2;
  --notch: #2a2c33;
  --white: #fff;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--title);
  font-family: "Circular", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Full-width wrapper: clips the glow's soft tail at the viewport edge on phones without
   becoming a scroll container (clip, not hidden, so nothing propagates to the viewport). */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 16px 16px 32px;
  overflow-x: hidden;
  overflow-x: clip;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- header */

.site-header,
.site-main,
.site-footer {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
}

.site-header__logo {
  display: block;
  width: 136px;
  height: auto;
}

.lang {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
}

.lang a {
  display: block;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  text-decoration: none;
}

.lang a:hover {
  color: var(--title);
}

.lang a[aria-current="page"] {
  background: var(--indigo);
  color: var(--white);
}

/* ------------------------------------------------------------------ main */

.site-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 14px;
  border: 1px solid var(--brand-second);
  border-radius: 999px;
  background: var(--indigo-bg);
  color: var(--indigo);
  /* 13 px from 375 px up; a touch smaller on the narrowest phones so it never wraps */
  font-size: min(13px, 3.45vw);
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.pill img {
  display: block;
  flex: none;
  width: 8px;
  height: 8px;
}

.headline {
  margin: 0;
  color: var(--title);
  font-size: clamp(40px, 7.3vw, 56px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.headline span {
  display: block;
}

.headline .accent {
  color: var(--indigo);
}

.sub {
  max-width: 600px;
  color: var(--text);
  font-size: clamp(17px, 2.6vw, 20px);
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  order: 3;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: clamp(16px, 4.6vw, 18px);
  font-weight: 500;
  line-height: normal;
  text-align: center;
  text-decoration: none;
}

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

.btn--primary:hover {
  background: var(--indigo-hover);
}

.btn--outline {
  /* 1.5 px border inside the same 54 px height as the primary button */
  padding: 14.5px 26.5px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--indigo);
}

.btn--outline:hover {
  border-color: var(--indigo);
}

/* -------------------------------------------------------------- carousel */

.carousel {
  order: 2;
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
}

/* One design unit (--u) = 1 px of the 620 px Figma stage, so every slide scales with the
   carousel width (358 px on a 390 px phone). */
.carousel__viewport {
  position: relative;
  container-type: inline-size;
  --u: calc(100cqw / 620);
}

/* The lime glow stays put behind the slides (Figma «Ellipse» 540 px at 40,40, blur 45;
   the SVG adds 90 px of blur room on each side, so its box starts at -50). */
.carousel__glow {
  position: absolute;
  left: calc(-50 * var(--u));
  top: calc(-50 * var(--u));
  width: calc(720 * var(--u));
  height: calc(720 * var(--u));
  max-width: none;
  pointer-events: none;
}

.carousel__track {
  position: relative;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: 8px;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__track:focus-visible {
  outline-offset: 4px;
}

.slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.slide__art {
  position: relative;
  height: calc(620 * var(--u));
}

.slide__caption {
  padding-top: calc(20 * var(--u));
  color: var(--text);
  font-size: max(12px, calc(14 * var(--u)));
  font-weight: 500;
  line-height: normal;
  text-align: center;
}

.ground {
  position: absolute;
  top: calc(584 * var(--u));
  height: calc(50 * var(--u));
  max-width: none;
}

.ground--mupi {
  left: calc(177.49 * var(--u));
  width: calc(265.024 * var(--u));
}

.ground--billboard {
  left: calc(87.9 * var(--u));
  width: calc(444.192 * var(--u));
}

.ground--billboard-grande {
  left: calc(118 * var(--u));
  width: calc(384 * var(--u));
  height: calc(48 * var(--u));
}

.ground--app-story {
  left: calc(171.75 * var(--u));
  top: calc(578 * var(--u));
  width: calc(276.5 * var(--u));
  height: calc(46 * var(--u));
}

/* Supports: the 2x exports are exactly 2 bitmap px per design px, origin at the node's
   top-left, so the box is the bitmap size / 2. */
.support {
  position: absolute;
}

.support__img {
  display: block;
  width: 100%;
  height: auto;
}

.support--mupi {
  left: calc(157 * var(--u));
  top: calc(24 * var(--u));
  width: calc(306.5 * var(--u));
}

.support--billboard {
  left: calc(45 * var(--u));
  top: calc(-4 * var(--u));
  width: calc(530.5 * var(--u));
}

.support--billboard-grande {
  left: calc(50 * var(--u));
  top: calc(120 * var(--u));
  width: calc(520 * var(--u));
}

/* App Story: CSS phone, no image. */
.phone {
  position: absolute;
  left: calc(168 * var(--u));
  top: calc(27 * var(--u));
  width: calc(285 * var(--u));
  height: calc(585 * var(--u));
  border-radius: calc(51 * var(--u));
  background: var(--title);
}

.phone__notch {
  position: absolute;
  left: calc(90 * var(--u));
  top: calc(24 * var(--u));
  width: calc(105 * var(--u));
  height: calc(12 * var(--u));
  border-radius: calc(6 * var(--u));
  background: var(--notch);
}

/* ------------------------------------------------------------------- ads */

.ad {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(20 * var(--u));
  overflow: hidden;
  font-weight: 400;
  line-height: normal;
}

/* Screen + 1 design px under the frame on every side, as a % of the support image
   (MUPI 306.5 × 588.5, Billboard 530.5 × 616.5, Billboard grande 520 × 492.5). */
.ad--mupi {
  left: 14.3556%;   /* (45 - 1) / 306.5 */
  top: 4.7579%;     /* (29 - 1) / 588.5 */
  width: 71.6476%;  /* (217.6 + 2) / 306.5 */
  height: 72.2345%; /* (423.1 + 2) / 588.5 */
  background: var(--lime);
}

.ad--billboard {
  left: 5.5042%;    /* (30.2 - 1) / 530.5 */
  top: 12.6683%;    /* (79.1 - 1) / 616.5 */
  width: 88.9349%;  /* (469.8 + 2) / 530.5 */
  height: 35.4096%; /* (216.3 + 2) / 616.5 */
  background: linear-gradient(90deg, var(--ad-dark-from), var(--ad-dark-to));
}

.ad--billboard-grande {
  left: 2.6731%;    /* (14.9 - 1) / 520 */
  top: 12.0609%;    /* (60.4 - 1) / 492.5 */
  width: 94.8462%;  /* (491.2 + 2) / 520 */
  height: 40.934%;  /* (199.6 + 2) / 492.5 */
  flex-direction: row;
  align-items: center;
  gap: calc(12 * var(--u));
  background: var(--white);
}

.ad--app-story {
  left: calc(13.5 * var(--u));
  top: calc(63 * var(--u));
  width: calc(258 * var(--u));
  height: calc(459 * var(--u));
  border-radius: calc(15 * var(--u));
  background: var(--indigo);
}

.ad__tag {
  display: inline-flex;
  flex: none;
  padding: calc(3 * var(--u)) calc(6 * var(--u));
  border-radius: 999px;
  font-size: calc(8 * var(--u));
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: normal;
  white-space: nowrap;
}

.ad__tag--dark {
  background: var(--title);
  color: var(--lime);
}

.ad__tag--lime {
  background: var(--lime);
  color: var(--title);
}

.ad__logo {
  display: block;
  flex: none;
  height: auto;
}

.ad__badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: calc(5 * var(--u)) calc(9 * var(--u));
  border-radius: 999px;
  background: var(--white);
}

.ad__badge .ad__logo {
  width: calc(72 * var(--u));
}

.ad__title {
  font-weight: 700;
  white-space: nowrap;
}

/* MUPI · lime */
.ad--mupi .ad__message {
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  width: 100%;
}

.ad--mupi .ad__title {
  color: var(--indigo);
  font-size: calc(34 * var(--u));
  line-height: 0.94;
  letter-spacing: -0.015em;
}

.ad--mupi .ad__body {
  color: var(--title);
  font-size: calc(12 * var(--u));
  line-height: 1.4;
}

.ad--mupi .ad__logo {
  width: calc(96 * var(--u));
}

/* Billboard · dark gradient */
.ad--billboard .ad__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(12 * var(--u));
  width: 100%;
}

.ad--billboard .ad__title {
  color: var(--white);
  font-size: calc(22 * var(--u));
  line-height: 1.1;
  letter-spacing: -0.008em;
}

.ad--billboard .ad__title .accent {
  color: var(--lime);
}

/* Billboard grande · white */
.ad--billboard-grande .ad__title {
  flex: none;
  color: var(--title);
  font-size: calc(30 * var(--u));
  line-height: 1;
  letter-spacing: -0.012em;
}

.ad--billboard-grande .ad__title .accent {
  color: var(--indigo);
}

.ad--billboard-grande .ad__side {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  justify-content: space-between;
  min-width: 1px;
}

.ad--billboard-grande .ad__body {
  width: 100%;
  color: var(--text);
  font-size: calc(12 * var(--u));
  line-height: 1.4;
}

.ad--billboard-grande .ad__logo {
  width: calc(84 * var(--u));
}

/* App Story · indigo */
.ad--app-story .ad__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.ad--app-story .ad__tag {
  padding: calc(2.8 * var(--u)) calc(6.4 * var(--u));
}

.ad__formats {
  position: relative;
  flex: none;
  width: calc(218 * var(--u));
  height: calc(150 * var(--u));
}

.ad__formats span {
  position: absolute;
  border-radius: calc(6 * var(--u));
}

.ad__formats span:nth-child(1) { left: 0; top: calc(40 * var(--u)); width: calc(96 * var(--u)); height: calc(52 * var(--u)); background: rgb(255 255 255 / 0.18); }
.ad__formats span:nth-child(2) { left: calc(108 * var(--u)); top: calc(30 * var(--u)); width: calc(110 * var(--u)); height: calc(64 * var(--u)); background: var(--lime); }
.ad__formats span:nth-child(3) { left: 0; top: calc(104 * var(--u)); width: calc(70 * var(--u)); height: calc(40 * var(--u)); background: rgb(255 255 255 / 0.12); }
.ad__formats span:nth-child(4) { left: calc(82 * var(--u)); top: calc(104 * var(--u)); width: calc(40 * var(--u)); height: calc(40 * var(--u)); background: rgb(255 255 255 / 0.25); }
.ad__formats span:nth-child(5) { left: calc(134 * var(--u)); top: calc(104 * var(--u)); width: calc(84 * var(--u)); height: calc(40 * var(--u)); background: rgb(255 255 255 / 0.12); }

.ad--app-story .ad__message {
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  width: 100%;
}

.ad__kicker {
  color: var(--lime);
  font-size: calc(10 * var(--u));
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.ad--app-story .ad__title {
  color: var(--white);
  font-size: calc(34 * var(--u));
  line-height: 0.96;
  letter-spacing: -0.015em;
}

.ad--app-story .ad__body {
  color: rgb(255 255 255 / 0.8);
  font-size: calc(13 * var(--u));
  line-height: 1.35;
}

/* -------------------------------------------------------------- controls */

.carousel__arrow {
  position: absolute;
  top: calc(310 * var(--u));
  z-index: 1;
  display: grid;
  place-items: center;
  /* 40 px in Figma desktop, scaled with the stage on phones (23 px in Figma 20:1907) but
     never below 24 px (WCAG 2.5.8); the ::before below widens the touch area to 40 px. */
  width: max(24px, calc(40 * var(--u)));
  height: max(24px, calc(40 * var(--u)));
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--indigo-bg);
  cursor: pointer;
  transform: translateY(-50%);
}

.carousel__arrow:hover,
.carousel__toggle:hover {
  background: var(--brand-second);
}

.carousel__arrow::before {
  content: "";
  position: absolute;
  inset: min(0px, calc((100% - 40px) / 2));
}

.carousel__arrow img {
  display: block;
  width: 50%;
  height: 50%;
}

.carousel__arrow--prev {
  left: 0;
}

.carousel__arrow--next {
  right: 0;
}

.carousel__controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 8px;
  /* Figma: 12 px between caption and dots; the dot buttons carry 8 px of hit area above */
  margin-top: 4px;
}

.carousel__dots {
  grid-column: 2;
  display: flex;
}

.carousel__dot {
  display: block;
  height: 24px;
  padding: 8px 4px;
  border: 0;
  background: none;
  cursor: pointer;
}

.carousel__dot span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--dot-inactive);
}

.carousel__dot[aria-current="true"] span {
  width: 24px;
  background: var(--indigo);
}

.carousel__dot:focus-visible {
  outline-offset: 0;
  border-radius: 6px;
}

.carousel__toggle {
  grid-column: 3;
  justify-self: start;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--indigo-bg);
  color: var(--indigo);
  cursor: pointer;
}

.carousel__toggle svg {
  display: block;
  width: 10px;
  height: 10px;
}

.carousel__toggle .icon-play,
.carousel__toggle[data-state="paused"] .icon-pause {
  display: none;
}

.carousel__toggle[data-state="paused"] .icon-play {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .carousel__track {
    scroll-behavior: smooth;
  }

  .carousel__dot span {
    transition: width 0.2s ease, background-color 0.2s ease;
  }
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tagline {
  color: var(--indigo);
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
}

.legal {
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- tablet */

@media (min-width: 768px) {
  .page {
    padding: 24px 32px 40px;
    gap: 32px;
  }

  .site-main {
    gap: 32px;
  }

  .intro {
    gap: 24px;
  }

  .actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* --------------------------------------------------------------- desktop */

@media (min-width: 1024px) {
  .page {
    justify-content: space-between;
    padding: 48px clamp(32px, 5.556vw, 80px);
  }

  .site-header {
    min-height: 39px;
  }

  /* Figma 10:305: text column 600, stage 620, both centred vertically. */
  .site-main {
    display: grid;
    grid-template-columns: minmax(0, 600px) minmax(0, 620px);
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas:
      ".       carousel"
      "intro   carousel"
      "actions carousel"
      ".       carousel";
    justify-content: space-between;
    column-gap: 40px;
    row-gap: 28px;
  }

  .intro {
    grid-area: intro;
    gap: 28px;
  }

  .actions {
    grid-area: actions;
    align-self: start;
  }

  .carousel {
    grid-area: carousel;
    align-self: center;
    margin: 0;
  }

  .pill {
    font-size: 13px;
  }

  .headline {
    font-size: clamp(56px, 5.556vw, 80px);
    line-height: 1;
    letter-spacing: -0.02em;
  }

  .sub {
    font-size: clamp(18px, 1.53vw, 22px);
  }

  .btn {
    font-size: 18px;
  }

  /* Figma desktop footer: one row, legal line on the left; the tagline sits on the right. */
  .site-footer {
    flex-direction: row-reverse;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    column-gap: 24px;
    row-gap: 4px;
    padding-top: 0;
    border-top: 0;
  }

  .legal {
    flex: 0 1 auto;
    line-height: normal;
  }

  .tagline {
    flex: none;
  }
}

.nowrap {
  white-space: nowrap;
}
