/* FomoTrading website. The palette and the font are the app's own (src/theme/tokens.ts, assets/fonts). */

@font-face {
  font-family: 'Onest';
  src: url('fonts/Onest-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('fonts/Onest-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('fonts/Onest-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('fonts/Onest-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #181d27;
  --card: #2a2f38;
  --info: #023164;
  --primary: #2e90fa;
  --reward: #fcc32e;
  --text: #ffffff;
  --prose: rgba(255, 255, 255, 0.8);
  --muted: rgba(255, 255, 255, 0.54);
  --border: rgba(255, 255, 255, 0.12);
  --fill: rgba(255, 255, 255, 0.08);
  --screen-gradient: linear-gradient(160deg, #0563c7 0%, #2e92ff 30%, #0563c7 100%);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.6 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

a {
  color: var(--primary);
}

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

.wrap {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 20px;
}

main {
  flex: 1;
}

/* Header / footer */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--screen-gradient);
  font-size: 17px;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

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

.footer-nav a:hover,
.footer-nav a[aria-current='page'] {
  color: var(--text);
}

/* Home */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  margin-block: 32px 12px;
  padding: 48px 40px;
  border-radius: 24px;
  background: var(--screen-gradient);
  overflow: hidden;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 36ch;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-art {
  width: clamp(160px, 26vw, 280px);
  height: auto;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* The official badges, sized as on the gps site (not links yet). */
.store-apple {
  width: 140px;
  height: auto;
}

/* google-play.png carries ~10px of transparent padding around the badge; the negative margin cancels it. */
.store-google {
  width: 168px;
  height: auto;
  margin: -10px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.feature {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
}

.feature h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* The tile art carries the card fill baked in, so it bleeds into the bottom-right corner. */
.feature img {
  align-self: flex-end;
  width: 168px;
  height: 168px;
  margin: auto -20px -20px auto;
}

.notice {
  margin-block: 12px 48px;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--info);
}

.notice h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.notice p {
  margin: 0;
  color: var(--prose);
  font-size: 15px;
}

/* Legal documents */

.doc {
  max-width: 760px;
  padding-block: 40px 64px;
}

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.doc .meta {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
}

.doc h2 {
  margin: 44px 0 12px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.doc p,
.doc li {
  color: var(--prose);
}

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

.doc li + li {
  margin-top: 6px;
}

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

.toc {
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--card);
}

.toc h2 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}

.toc ol {
  margin: 0;
  padding-left: 22px;
  columns: 2 240px;
  column-gap: 32px;
}

.toc li + li {
  margin-top: 4px;
}

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

.toc a:hover {
  color: var(--primary);
}

.table-wrap {
  margin-block: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  color: var(--prose);
}

th {
  background: var(--fill);
  color: var(--muted);
  font-weight: 500;
}

tr:last-child td {
  border-bottom: 0;
}

/* FAQ: the app's accordion rows (FaqScreen) as <details>. */

.faq-item {
  margin-top: 12px;
  border-radius: 16px;
  background: var(--card);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary::after {
  content: '+';
  flex: none;
  color: var(--muted);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-answer {
  padding: 0 20px 16px;
}

.faq-answer p {
  margin: 0;
}

.faq-answer p + p {
  margin-top: 12px;
}

/* Values the operator still has to fill in before publishing. */
.ph {
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(252, 195, 46, 0.16);
  color: var(--reward);
  font-weight: 600;
}

@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
    margin-block-start: 20px;
    padding: 28px 20px;
  }

  .hero-art {
    order: -1;
    width: 150px;
  }
}
