/* Tokens from Figma "DS 2 Brainqraft" (web/landing — app, node 7387:248742) */
:root {
  --surface-background: #212034;
  --starry-stop-1: #524f82;
  --starry-stop-2: #212144;
  --starry-stop-3: #212034;
  --star-soft: #807a90;
  --star-strong: #666076;
  --text-primary: #f5f4f8;
  --store-label: #f5f4f8;
  --store-label-secondary: #cac9de;
  --indigo-500: #66639c;
  --indigo-600: #524f82;
  --indigo-800: #343252;
  --radius-20: 20px;
  --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html,
body {
  margin: 0;
  background: var(--surface-background);
  color: var(--text-primary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  /* No rubber-band bounce on a page that fits the screen. */
  overscroll-behavior: none;
}

img {
  display: block;
  max-width: none;
}

/* Exactly one screen tall, like the Figma frame: the island shrinks from the
   bottom (cropped) instead of making the page scroll. Only when the text and
   badges themselves don't fit does the page scroll (overflow-y stays visible). */
.page {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(48px, 11.25vh, 101px);
  padding: 48px clamp(20px, 4.5vw, 64px) 0;
}

.page > * {
  flex-shrink: 0;
}

/* foundation/starry-violet/web */
.starry {
  position: absolute;
  inset: 0 0 auto;
  height: min(900px, 100%);
  background: linear-gradient(
    to bottom,
    var(--starry-stop-1) 0%,
    var(--starry-stop-2) 35%,
    var(--starry-stop-3) 100%
  );
  pointer-events: none;
}

.star {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: 1.035px;
  background: var(--star-strong);
  transform: rotate(-45deg);
}

.star--soft {
  background: var(--star-soft);
}

/* nav + logo/brainqraft-lockup */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 62px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo__mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.logo__mark img {
  position: absolute;
  inset: 0 -3.3% -7.58% -0.63%;
  width: auto;
  height: auto;
}

.logo__wordmark {
  width: 132.344px;
  height: 32px;
}

/* Display/Large */
.title {
  position: relative;
  max-width: 900px;
  margin: 0;
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  overflow-wrap: break-word;
}

.download {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* badge/store */
.store-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 14px 24px 14px 20px;
  border: 1px solid var(--indigo-500);
  border-radius: var(--radius-20);
  background-image: linear-gradient(147deg, var(--indigo-800) 12.793%, var(--indigo-600) 150.42%);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.store-badge:hover {
  border-color: var(--store-label-secondary);
}

.store-badge:active {
  transform: scale(0.98);
}

.store-badge:focus-visible {
  outline: 2px solid var(--store-label);
  outline-offset: 3px;
}

.store-badge--apple {
  width: 190px;
}

.store-badge--google {
  width: 198px;
}

.store-badge__icon {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.store-badge__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
  overflow: hidden;
}

/* Caption/Default */
.store-badge__caption {
  font-size: 12px;
  font-weight: 500;
  line-height: 12px;
  color: var(--store-label-secondary);
}

/* Heading/H5 */
.store-badge__name {
  font-size: 20px;
  font-weight: 700;
  line-height: 20px;
  color: var(--store-label);
}

/* icon/google: brand-colour blob clipped by the "G" shape */
.icon-google {
  overflow: hidden;
}

.icon-google__mask {
  position: absolute;
  inset: -0.43% -0.75% -0.73% -0.75%;
  -webkit-mask: url("/assets/icons/google-mask.svg") 0.149px 0.086px / 28px 28px no-repeat;
  mask: url("/assets/icons/google-mask.svg") 0.149px 0.086px / 28px 28px no-repeat;
}

.icon-google__mask img {
  position: absolute;
  inset: -7.62% -1.65% -1.66% -1.65%;
  width: auto;
  height: auto;
}

.join-hint {
  display: none;
  max-width: 420px;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--store-label-secondary);
}

.is-join .join-hint {
  display: block;
}

/* illustration/landing-island — 1440×329 artboard, scales with viewport width,
   cropped (centred) below 900px so the island stays readable on phones. */
.island {
  position: relative;
  width: 100vw;
  margin-top: auto;
  flex-shrink: 1;
  min-height: 40px;
  overflow: hidden;
}

.island__art {
  position: relative;
  width: max(100vw, 900px);
  aspect-ratio: 1440 / 329;
  left: 50%;
  transform: translateX(-50%);
}

/* Phones: the artboard's top ~22% is empty sky (pillars start at 24.72%).
   Trim it so the short visible slice shows the pillars and island. */
@media (max-width: 600px) {
  .page {
    gap: clamp(24px, 6vh, 101px);
  }

  .island__art {
    margin-top: calc(max(100vw, 900px) * -0.05);
  }
}

.island__art span {
  position: absolute;
  display: block;
}

.island__art img {
  width: 100%;
  height: 100%;
}

.island__art .flip {
  transform: scaleX(-1);
}

/* Legal links: under the store badges on the landing, and the footer of the
   text pages (informations-legales, support-technique). */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.legal-links a {
  color: var(--store-label-secondary);
  text-decoration: none;
  opacity: 0.8;
}

.legal-links a:hover,
.legal-links a[aria-current="page"] {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Text pages: a readable scrolling column on the same starry sky. */
.doc {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 48px clamp(20px, 4.5vw, 64px) 40px;
}

.doc__nav,
.doc__body,
.doc__footer {
  position: relative;
}

.doc__body {
  width: 100%;
  max-width: 760px;
  margin: 56px auto 64px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--store-label-secondary);
}

.doc__title {
  margin: 0 0 24px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}

.doc__lead {
  margin: -8px 0 32px;
  font-size: 18px;
}

.doc__card {
  margin-bottom: 20px;
  padding: 20px 24px;
  border: 1px solid var(--indigo-500);
  border-radius: var(--radius-20);
  background-image: linear-gradient(147deg, var(--indigo-800) 12.793%, var(--indigo-600) 150.42%);
}

.doc__card > :first-child {
  margin-top: 0;
}

.doc__card > :last-child {
  margin-bottom: 0;
}

.doc__identity p {
  margin: 0;
}

.doc__muted {
  margin-top: 8px !important;
  font-size: 14px;
  opacity: 0.8;
}

.doc__toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 8px;
}

.doc__toc a {
  padding: 6px 14px;
  border: 1px solid var(--indigo-500);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
}

.doc__toc a:hover {
  border-color: var(--store-label-secondary);
}

.doc__section {
  padding-top: 40px;
  scroll-margin-top: 16px;
}

.doc h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.doc__card h2 {
  font-size: 20px;
}

.doc h3 {
  margin: 24px 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.doc p,
.doc ul {
  margin: 0 0 12px;
}

.doc ul {
  padding-left: 20px;
}

.doc li {
  margin-bottom: 4px;
}

.doc__body a {
  color: var(--text-primary);
  text-underline-offset: 3px;
}

.doc__mail {
  font-size: 18px;
  font-weight: 700;
}

.doc__footer {
  margin-top: auto;
}
