/*
 * Trade Journey — the website's one stylesheet.
 *
 * SOURCE: artifacts/trading-academy/scripts/website/site.css. build-website.ts
 * copies it to website/styles.css (and stamps the font's address): edit this
 * file, never the copy.
 *
 * The look is the app's: its dark background, its green, its typeface, the
 * glow and the faint grid of the reels. One breakpoint for the two-column
 * layouts (900 px); everything else flows.
 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2?v=f11d729b") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #0b0e11;
  --bg-2: #0e1216;
  --surface: #161a1e;
  --surface-2: #1e232a;
  --line: #252a33;
  --line-soft: rgba(234, 236, 239, 0.08);
  --fg: #eaecef;
  --muted: #a9b3bf;
  --dim: #8a94a2;
  --green: #0ecb81;
  --green-ink: #04130c;
  --green-soft: rgba(14, 203, 129, 0.12);
  --gold: #f0b90b;
  --gold-soft: rgba(240, 185, 11, 0.12);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: 20px;
  --radius: 16px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Nothing may widen the page: the glows are wider than a phone's screen. */
main {
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

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

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

a {
  color: var(--green);
  text-underline-offset: 3px;
}

a:hover {
  color: #45dea0;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

/* For screen readers only. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--green);
  color: var(--green-ink);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
  color: var(--green-ink);
}

/* ── top bar ─────────────────────────────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 17, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--fg);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(234, 236, 239, 0.14);
}

.nav {
  display: none;
  gap: 26px;
  margin-left: auto;
}

.nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--fg);
}

.lang {
  position: relative;
  margin-left: auto;
}

.lang summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid var(--dim);
  border-bottom: 2px solid var(--dim);
  transform: rotate(45deg);
}

.lang[open] summary::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 176px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lang li a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--fg);
  font-size: 15px;
  text-decoration: none;
}

.lang li a:hover {
  background: var(--surface-2);
}

.lang li a[aria-current] {
  color: var(--green);
  font-weight: 600;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .nav + .lang {
    margin-left: 0;
  }
}

/* ── hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  isolation: isolate;
  padding: 48px 0 56px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(62% 56% at 12% 0%, rgba(14, 203, 129, 0.2), rgba(14, 203, 129, 0) 70%),
    radial-gradient(52% 52% at 96% 78%, rgba(14, 203, 129, 0.1), rgba(14, 203, 129, 0) 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  background-image:
    linear-gradient(to right, #eaecef 1px, transparent 1px),
    linear-gradient(to bottom, #eaecef 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

/* The headline is sized from the width of this column (see h1 below). */
.hero .copy {
  container-type: inline-size;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px 7px 11px;
  border: 1px solid rgba(14, 203, 129, 0.28);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: clamp(11.5px, 3.3vw, 13px);
  font-weight: 600;
  line-height: 1.35;
}

.pill::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(14, 203, 129, 0.18);
}

h1 {
  margin-top: 22px;
  font-size: clamp(28px, 8.6vw, 62px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

h1 span {
  display: block;
}

/*
 * The headline's two lines stay on one line each, as large as the column
 * allows: fit-7 is a headline whose longer line is up to 7 em wide (English),
 * fit-9 up to 9.2 em (French, German). build-website.ts picks the class from
 * the measured width; a browser without container units keeps the size above.
 */
@supports (font-size: 1cqi) {
  .hero h1.fit-7 {
    font-size: clamp(28px, 13.6cqi, 62px);
  }

  .hero h1.fit-8 {
    font-size: clamp(28px, 11.8cqi, 62px);
  }

  .hero h1.fit-9 {
    font-size: clamp(26px, 10.4cqi, 62px);
  }

  .hero h1.fit-10 {
    font-size: clamp(24px, 9.3cqi, 62px);
  }
}

h1 .g {
  color: var(--green);
}

.lede {
  max-width: 34em;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.store {
  display: inline-flex;
  flex-direction: column;
  min-width: 148px;
  padding: 9px 18px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(22, 26, 30, 0.72);
}

.store small {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.store b {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  font-weight: 600;
  text-decoration: none;
}

.more::after {
  content: "\2193";
}

.media {
  position: relative;
  display: grid;
  place-items: center;
}

.phone {
  width: min(100%, 300px);
  padding: 9px;
  border-radius: 46px;
  background: #05070a;
  box-shadow:
    0 0 0 2px #2b3139,
    0 40px 90px rgba(0, 0, 0, 0.6),
    0 0 64px rgba(14, 203, 129, 0.1);
}

.phone img {
  width: 100%;
  aspect-ratio: 393 / 852;
  border-radius: 38px;
  background: var(--bg);
}

@media (min-width: 900px) {
  .hero {
    padding: 84px 0 88px;
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 40px;
  }

  .hero .phone {
    width: min(100%, 320px);
  }
}

/* ── the four numbers ────────────────────────────────────────────────────── */
.stats {
  border-block: 1px solid var(--line-soft);
  background: rgba(22, 26, 30, 0.4);
}

.stats ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 16px;
  padding: 30px 0;
}

.stats b {
  display: block;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.stats span {
  color: var(--dim);
  font-size: 14.5px;
}

@media (min-width: 720px) {
  .stats ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── sections ────────────────────────────────────────────────────────────── */
.section {
  padding: 76px 0;
}

.section.alt {
  border-block: 1px solid var(--line-soft);
  background: var(--bg-2);
}

.eyebrow {
  color: var(--green);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 {
  margin-top: 12px;
  font-size: clamp(28px, 5.4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.text {
  max-width: 36em;
  margin-top: 18px;
  color: var(--muted);
}

.center {
  text-align: center;
}

.center .text {
  margin-inline: auto;
}

.feature .wrap {
  display: grid;
  gap: 52px;
  align-items: center;
}

@media (min-width: 900px) {
  .section {
    padding: 108px 0;
  }

  .feature .wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
  }

  .feature.flip .media {
    order: -1;
  }
}

.checks {
  display: grid;
  gap: 13px;
  margin-top: 26px;
}

.checks li {
  position: relative;
  padding-left: 36px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.16em;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(14, 203, 129, 0.35);
  border-radius: 50%;
  background: var(--green-soft);
}

.checks li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: calc(0.16em + 5px);
  width: 6px;
  height: 10px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(40deg);
}

/* The course's seven blocks, drawn as the app draws its learning path. */
.blocks {
  margin-top: 28px;
  counter-reset: block;
}

.blocks li {
  position: relative;
  padding: 9px 0 9px 48px;
  font-weight: 500;
  counter-increment: block;
}

.blocks li::before {
  content: counter(block);
  position: absolute;
  left: 0;
  top: 7px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(14, 203, 129, 0.6);
  border-radius: 50%;
  background: var(--bg);
  color: var(--green);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
}

.blocks li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 37px;
  bottom: -7px;
  width: 2px;
  background: rgba(14, 203, 129, 0.22);
}

/* ── risk first ──────────────────────────────────────────────────────────── */
.cards {
  display: grid;
  gap: 14px;
  margin-top: 44px;
  text-align: left;
}

.card {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card svg {
  display: block;
  width: 26px;
  height: 26px;
  margin-bottom: 16px;
  color: var(--green);
}

.card h3 {
  font-size: 18.5px;
  letter-spacing: -0.01em;
}

.card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

@media (min-width: 800px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ── free and PRO ────────────────────────────────────────────────────────── */
.plans {
  display: grid;
  gap: 16px;
  max-width: 900px;
  margin: 44px auto 0;
  text-align: left;
}

.plan {
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.plan.is-free {
  border-color: rgba(14, 203, 129, 0.5);
  box-shadow: 0 24px 70px rgba(14, 203, 129, 0.07);
}

.plan h3 {
  font-size: 23px;
  letter-spacing: -0.02em;
}

.plan h3 span {
  color: var(--gold);
}

.plan > p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 16px;
}

.plan .checks {
  margin-top: 20px;
  font-size: 16px;
}

.plan.is-pro .checks li::before {
  border-color: rgba(240, 185, 11, 0.4);
  background: var(--gold-soft);
}

.plan.is-pro .checks li::after {
  border-color: var(--gold);
}

.note {
  margin-top: 22px;
  color: var(--dim);
  font-size: 14.5px;
}

@media (min-width: 800px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── questions ───────────────────────────────────────────────────────────── */
.faq {
  max-width: 800px;
  margin: 36px auto 0;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--green);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 48px 24px 0;
  color: var(--muted);
}

/* ── the last word ───────────────────────────────────────────────────────── */
.closing {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
}

.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(46% 58% at 50% 42%, rgba(14, 203, 129, 0.14), rgba(14, 203, 129, 0) 72%);
}

.closing .bot {
  width: 148px;
  margin: 0 auto 10px;
}

.closing .text {
  margin-inline: auto;
}

.closing .stores {
  justify-content: center;
}

.closing .store {
  text-align: left;
}

/* ── footer ──────────────────────────────────────────────────────────────── */
.foot {
  padding: 46px 0 56px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 14.5px;
}

.foot a {
  color: var(--muted);
  text-decoration: none;
}

.foot a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.foot .cols {
  display: grid;
  gap: 30px;
}

.foot .about p {
  max-width: 30em;
  margin-top: 14px;
}

.foot nav ul {
  display: grid;
  gap: 9px;
}

.foot nav .small {
  color: var(--dim);
  font-size: 13px;
}

.foot .langs ul {
  grid-template-columns: repeat(2, max-content);
  column-gap: 26px;
}

.foot .langs a[aria-current] {
  color: var(--green);
}

.fine {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
}

@media (min-width: 800px) {
  .foot .cols {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* ── the offer of another language ───────────────────────────────────────── */
.suggest {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
  font-size: 15px;
  transform: translateX(-50%);
}

.suggest[hidden] {
  display: none;
}

.suggest a {
  font-weight: 600;
  text-decoration: none;
}

.suggest button {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  font: 400 22px/1 var(--font);
  cursor: pointer;
}

.suggest button:hover {
  background: var(--surface-2);
  color: var(--fg);
}

/* ── the documents (privacy, terms, delete account, support) ─────────────── */
.doc {
  max-width: 780px;
  padding: 52px 0 76px;
}

.doc h1 {
  margin-top: 0;
  font-size: clamp(32px, 6.4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.doc .updated {
  margin-top: 10px;
  color: var(--dim);
  font-size: 14.5px;
}

.doc h2 {
  margin-top: 40px;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.doc p,
.doc ul,
.doc ol {
  margin-top: 14px;
  color: #c9d0d8;
  font-size: 16.5px;
}

.doc .updated + p,
.doc h1 + p {
  margin-top: 26px;
}

.doc ul,
.doc ol {
  display: grid;
  gap: 9px;
  padding-left: 22px;
}

.doc ul {
  list-style: disc;
}

.doc ol {
  list-style: decimal;
}

.doc li::marker {
  color: var(--green);
}

.doc strong {
  color: var(--fg);
  font-weight: 600;
}

.doc .box {
  margin-top: 26px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.doc .box h2 {
  font-size: 18.5px;
}

.lost {
  padding: 96px 0 120px;
  text-align: center;
}

.lost .bot {
  width: 140px;
  margin: 0 auto 14px;
}

.lost .text {
  margin-inline: auto;
}

.button {
  display: inline-block;
  margin-top: 28px;
  padding: 13px 22px;
  border-radius: 12px;
  background: var(--green);
  color: var(--green-ink);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: #2bd693;
  color: var(--green-ink);
}

/* ── motion: a section rises into place as it enters the screen ──────────── */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }

    @keyframes rise {
      from {
        opacity: 0;
        transform: translateY(26px);
      }

      to {
        opacity: 1;
        transform: none;
      }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .faq summary::after {
    transition: none;
  }
}
