/*
 * allum.ai landing page styles.
 *
 * A hand-written translation of the Tailwind classes of the allum.ai home page (frontend,
 * branch feat/allumai-demo at 7b92cf05). Breakpoints are Tailwind's: sm 640px, md 768px,
 * lg 1024px. Sizes are the app's own, in px.
 */

/* ---------- Font: Lexend, variable 100–900, latin subset (SIL OFL 1.1, see fonts/LICENSE-Lexend.txt) */

@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/lexend-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Arial sized to Lexend's metrics while the font loads, as next/font does in the app. */
@font-face {
  font-family: "Lexend Fallback";
  src: local("Arial");
  ascent-override: 90.98%;
  descent-override: 22.74%;
  line-gap-override: 0%;
  size-adjust: 109.91%;
}

/* ---------- Tokens: the app's --al- set (allumaiTheme.css), the ones this page uses */

:root {
  /* Surfaces */
  --al-page: #fbf8f0;
  --al-card: #ffffff;
  --al-sunk: #f4efe6;
  --al-header: rgba(251, 248, 240, 0.94);
  /* Lines */
  --al-line: #e9e2d6;
  --al-line-strong: #d9d0c1;
  /* Text, darkest first */
  --al-ink: #1b2a4a;
  --al-ink-2: #4a5672;
  --al-ink-3: #687288;
  /* Brand violet: actions, selection, the ".ai" of the wordmark */
  --al-violet: #6d28d9;
  --al-violet-hover: #5b21b6;
  --al-violet-soft: #efe8fc;
  --al-lavender: #c4b5fd;
  --al-on-violet: #ffffff;
  /* Accents */
  --al-magenta: #c026a9;
  --al-orange: #ea6a16;
  --al-orange-ink: #b24e0b;
  --al-red-ink: #b91c1c;
  /* The night sky */
  --al-night: #111a30;
  --al-night-deep: #0a1122;
  --al-night-accent: #a78bfa;
  /* The header's height */
  --al-header-height: 64px;

  --font-lexend: "Lexend", "Lexend Fallback", sans-serif;
  --transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Base: the parts of Tailwind's preflight the page relies on */

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

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  background: var(--al-page);
  color: var(--al-ink);
  font-family: var(--font-lexend);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

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

button,
textarea {
  margin: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

:disabled {
  cursor: default;
}

ol,
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

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

/* ---------- Shared pieces */

.icon--14 { width: 14px; height: 14px; }
.icon--15 { width: 15px; height: 15px; }
.icon--17 { width: 17px; height: 17px; }
.icon--19 { width: 19px; height: 19px; }
.icon--20 { width: 20px; height: 20px; }

/*
 * The keyboard focus ring (the app's focusRing.ts): violet, 2px, offset by 2px, on keyboard
 * focus only. An element with its own shadow sets --element-shadow, which the ring keeps.
 */
.focus-ring:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow:
    0 0 0 2px var(--ring-offset-color, #ffffff),
    0 0 0 4px var(--ring-color, var(--al-violet)),
    var(--element-shadow, 0 0 #0000);
}

/* The same ring on the night surfaces: the soft violet reads on navy where the brand violet does not. */
.focus-ring--night {
  --ring-color: var(--al-night-accent);
  --ring-offset-color: var(--al-night);
}

.chip,
.idea-submit,
.sky-toggle,
.waiting__cta {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: var(--transition-ease);
  transition-duration: 150ms;
}

/* ---------- Header: sticky from sm; on a phone the promises wrap below the brand and it scrolls away */

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--al-line);
  background: var(--al-header);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  min-height: var(--al-header-height);
  padding: 8px 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 6px;
}

.wordmark {
  color: var(--al-ink);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.wordmark__ai {
  color: var(--al-violet);
}

.brand__by {
  color: var(--al-ink-3);
  font-size: 12px;
  line-height: 16px;
}

.promises {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--al-ink-3);
  font-size: 13px;
}

.promises__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.promises__icon {
  color: var(--al-violet);
}

@media (min-width: 640px) {
  .site-header {
    position: sticky;
    top: 0;
  }

  .site-header__inner {
    padding-inline: 24px;
  }
}

/* ---------- Main and the hero (the sky band, then the sentence card over its foot) */

.page-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.hero {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 16px;
}

@media (min-width: 640px) {
  .hero {
    padding: 24px 24px 16px;
  }
}

/* ---------- The sky band */

.sky {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(170deg, var(--al-night) 0%, #1c2346 50%, #3a2a5e 100%);
}

@media (min-width: 640px) {
  .sky {
    min-height: 540px;
    border-radius: 24px;
  }
}

.night-sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* The waiting drones, right of the headline, from md. */
.night-sky__drones {
  display: none;
}

@media (min-width: 768px) {
  .night-sky__drones {
    display: inline;
  }
}

/*
 * The sky's motion, this page's own addition (the app's static sky stands still): the
 * stars twinkle and the drones hover. "still" draws the app's sky as is; "paused" freezes
 * the motion where it stands. main.js sets the state and each element's timing.
 */
.sky:not([data-sky-state="still"]) .sky-star {
  animation: sky-twinkle var(--twinkle-duration) ease-in-out var(--twinkle-delay) infinite alternate;
}

.sky:not([data-sky-state="still"]) .sky-drone {
  animation: sky-hover var(--hover-duration) ease-in-out var(--hover-delay) infinite alternate;
}

.sky[data-sky-state="paused"] :is(.sky-star, .sky-drone) {
  animation-play-state: paused;
}

@keyframes sky-twinkle {
  to {
    fill-opacity: 0.2;
  }
}

@keyframes sky-hover {
  to {
    transform: translateY(-4px);
  }
}

/* The town's rooftops along the band's foot. */
.skyline {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  width: 100%;
  height: 64px;
  fill: var(--al-night-deep);
  pointer-events: none;
}

@media (min-width: 640px) {
  .skyline {
    height: 86px;
  }
}

/* The headline; its bottom padding leaves room for the sentence card. */
.headline {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  max-width: 600px;
  padding: 40px 24px 132px;
}

.headline__pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  color: #e2e8f0;
  font-size: 13px;
}

.headline__pill-icon {
  color: var(--al-lavender);
}

.headline__title {
  color: #ffffff;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.headline__gradient {
  background-image: linear-gradient(to right, #c4b5fd, #f0abfc, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.headline__promise {
  max-width: 500px;
  color: #cbd2e0;
  font-size: 16px;
  line-height: 1.6;
}

@media (min-width: 640px) {
  .headline {
    padding: 64px 56px 140px;
  }

  .headline__title {
    font-size: 52px;
  }

  .headline__promise {
    font-size: 18px;
    line-height: 28px;
  }
}

@media (min-width: 1024px) {
  .headline__title {
    font-size: 58px;
  }
}

/* The pause button, in the band's corner from sm. */
.sky-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  display: none;
  align-items: center;
  gap: 6px;
  max-width: 45%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  background: rgba(5, 7, 15, 0.6);
  padding: 5px 11px;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sky-toggle:hover {
  background: rgba(5, 7, 15, 0.85);
}

@media (min-width: 640px) {
  .sky-toggle {
    display: inline-flex;
  }
}

.sky-toggle__icon {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.sky-toggle__label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sky[data-sky-state="playing"] .sky-toggle__icon--play,
.sky:not([data-sky-state="playing"]) .sky-toggle__icon--pause {
  display: none;
}

/* ---------- The sentence card */

.idea-card {
  --idea-card-shadow: 0 24px 48px -24px rgba(27, 42, 74, 0.38);
  position: relative;
  z-index: 1;
  width: calc(100% - 24px);
  max-width: 920px;
  margin: -92px auto 0;
  scroll-margin-top: 112px;
  border: 1px solid var(--al-line);
  border-radius: 22px;
  background: var(--al-card);
  padding: 20px;
  /* An empty ring first, so the focus ring grows from it instead of morphing the shadow. */
  box-shadow: 0 0 0 0 transparent, var(--idea-card-shadow);
  transition: box-shadow 150ms var(--transition-ease);
}

.idea-card:has(textarea:focus) {
  border-color: var(--al-violet);
  box-shadow: 0 0 0 4px var(--al-violet-soft), var(--idea-card-shadow);
}

.idea-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.idea-form__title {
  color: var(--al-violet);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.idea-form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}

.idea-form__field {
  display: flex;
  flex: 1 1 380px;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* The field grows with the sentence where the browser supports field-sizing, and keeps two rows elsewhere. */
.idea-input {
  width: 100%;
  min-height: 60px;
  max-height: 220px;
  resize: none;
  field-sizing: content;
  padding: 4px 0;
  color: var(--al-ink);
  font-family: var(--font-lexend);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.45;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.idea-input::placeholder {
  opacity: 1;
  color: var(--al-ink-3);
}

.idea-counter {
  align-self: flex-end;
  color: var(--al-ink-3);
  font-size: 12px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}

.idea-counter[data-level="warning"] {
  color: var(--al-orange-ink);
}

.idea-counter[data-level="over"] {
  color: var(--al-red-ink);
  font-weight: 500;
}

.idea-submit {
  --element-shadow: 0 10px 24px rgba(109, 40, 217, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  border-radius: 14px;
  background: var(--al-violet);
  padding: 0 24px;
  color: var(--al-on-violet);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  box-shadow: var(--element-shadow);
}

.idea-submit:enabled:hover {
  background: var(--al-violet-hover);
}

.idea-submit:disabled {
  --element-shadow: 0 0 #0000;
  cursor: not-allowed;
  opacity: 0.5;
}

@media (min-width: 640px) {
  .idea-card {
    width: calc(100% - 48px);
    padding-inline: 22px;
  }

  .idea-input {
    min-height: 69px;
    font-size: 21px;
  }

  .idea-submit {
    width: auto;
  }
}

/* The occasion chips: toggle buttons, at most one on, pressed again to turn off. */
.occasions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--al-sunk);
  padding-top: 12px;
}

.occasions__label {
  margin-right: 4px;
  color: var(--al-ink-3);
  font-size: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  border: 1px solid var(--al-line);
  border-radius: 9999px;
  background: var(--al-card);
  padding: 0 14px;
  color: var(--al-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.chip[aria-pressed="false"]:hover {
  border-color: var(--al-line-strong);
}

.chip[aria-pressed="true"] {
  border-color: var(--al-violet);
  background: var(--al-violet-soft);
  color: var(--al-violet);
}

.chip__check {
  display: none;
  width: 14px;
  height: 14px;
}

.chip[aria-pressed="true"] .chip__check {
  display: block;
}

.idea-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--al-ink-2);
  font-size: 14px;
  line-height: 20px;
}

.idea-hint__icon {
  flex-shrink: 0;
  color: var(--al-violet);
}

.idea-limit {
  color: var(--al-red-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

/* ---------- Landing sections */

.landing-section {
  padding: 64px 16px;
}

.landing-section--how {
  border-block: 1px solid var(--al-line);
  background: var(--al-card);
}

.landing-section__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.landing-section--how .landing-section__inner {
  gap: 48px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.section-heading__title {
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-heading__subtitle {
  color: var(--al-ink-3);
  font-size: 15px;
}

.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--al-violet);
  color: #ffffff;
}

.icon-tile--magenta {
  background: var(--al-magenta);
}

.icon-tile--orange {
  background: var(--al-orange);
}

.icon-tile--small {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
}

/* "Pourquoi Allum.AI" */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
  width: 100%;
}

.why-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--al-line);
  border-radius: 16px;
  background: var(--al-card);
  padding: 28px;
  box-shadow: 0 10px 30px rgba(27, 42, 74, 0.05);
}

.why-card__title {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
}

.why-card__text {
  color: var(--al-ink-3);
  font-size: 14.5px;
  line-height: 1.65;
}

/* "Comment ça marche": four steps, their discs going from violet to orange */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  width: 100%;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.step__disc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 500;
}

.step__disc--1 { background: var(--al-violet); }
.step__disc--2 { background: #9b2cb8; }
.step__disc--3 { background: #c8357f; }
.step__disc--4 { background: #c2550f; }

.step__title {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.step__text {
  color: var(--al-ink-3);
  font-size: 13.5px;
  line-height: 1.5;
}

/* "Ce que nous faisons et que les autres ne font pas" */
.others {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 920px;
}

.others__item {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--al-line);
  border-radius: 14px;
  background: var(--al-card);
  padding: 20px;
}

.others__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.others__title {
  font-size: 16.5px;
  font-weight: 500;
}

.others__text {
  color: var(--al-ink-3);
  font-size: 14px;
  line-height: 1.55;
}

/* "Vous n'êtes jamais seul" */
.sofia {
  border-top: 1px solid var(--al-line);
  background: var(--al-card);
  padding: 56px 16px;
}

.sofia__card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--al-line);
  border-radius: 16px;
  background: var(--al-card);
  padding: 28px 24px;
}

.sofia__bar {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 4px;
  background-image: linear-gradient(to bottom, var(--al-violet), var(--al-magenta), var(--al-orange));
}

.sofia__avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  background: var(--al-violet);
  color: #ffffff;
  font-size: 22px;
  font-weight: 500;
}

.sofia__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sofia__title {
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}

.sofia__text {
  color: var(--al-ink-3);
  font-size: 14.5px;
  line-height: 1.65;
}

@media (min-width: 640px) {
  .landing-section {
    padding: 88px 24px;
  }

  .landing-section--how {
    padding: 80px 24px;
  }

  .section-heading__title {
    font-size: 36px;
    line-height: 40px;
  }

  .others__item {
    padding-inline: 24px;
  }

  .sofia {
    padding: 72px 24px;
  }

  .sofia__card {
    padding-inline: 32px;
  }
}

/* ---------- "Votre spectacle vous attend": its button leads back to the sentence card */

.waiting {
  background: var(--al-ink);
  padding: 80px 16px;
  color: #ffffff;
}

.waiting__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.waiting__title {
  font-size: 32px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.waiting__text {
  color: #c3c6cf;
  font-size: 16px;
  line-height: 1.6;
}

.waiting__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  margin-top: 18px;
  border-radius: 12px;
  background: #7c3aed;
  padding: 0 26px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.waiting__cta:hover {
  background: var(--al-violet);
}

@media (min-width: 640px) {
  .waiting {
    padding: 96px 24px;
  }

  .waiting__title {
    font-size: 40px;
  }
}

/* ---------- Footer: the brand's gradient rule, then the wordmark on the night colour */

.brand-rule {
  height: 3px;
  background-image: linear-gradient(to right, var(--al-violet), var(--al-magenta), var(--al-orange));
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--al-night);
  padding: 40px 24px;
  text-align: center;
}

.site-footer__wordmark {
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.02em;
}

.site-footer__ai {
  color: #b79cf5;
}

.site-footer__line {
  color: #9aa0ae;
  font-size: 12.5px;
}
