/* The coming-soon page (coming-soon.html). It loads this file and
   src/footer.css, not styles.css, so the first paint carries only what this
   page needs. The fonts and tokens mirror :root in styles.css, as legal.css
   does; change them together. The top bar's logo and language button and
   the email form copy their looks from the home page. */

@font-face {
  font-family: 'General Sans';
  src: url('../assets/fonts/GeneralSans-Latin.woff2') format('woff2');
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('../assets/fonts/NunitoSans-Latin.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Arabic';
  src: url('../assets/fonts/NotoSansArabic.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200F;
}

:root {
  --p-clear: #f8f5ff;
  --p-soft: #f0e9ff;
  --p-subtle: #d9c6ff;
  --p-default: #994dfe;
  --p-base: #7c02fd;
  --p-strong: #5b01b9;
  --p-dark: #3c007c;
  --p-inverse: #25004b;
  --ink: #1b1030;
  --ink-2: #4a3f66;
  --focus: #3c007c;
  --n-ink: #2a2a2a;
  --n-ink-2: #6d6d6d;
  --n-muted: #8f8f8f;
  --n-line: #f2f2f2;
  --gutter: clamp(16px, 5.56vw, 80px);
  --font-head: 'General Sans', 'Nunito Sans', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
  color-scheme: light;
}

[dir='rtl'] {
  --font-head: 'Noto Sans Arabic', 'General Sans', sans-serif;
  --font-body: 'Noto Sans Arabic', 'Nunito Sans', sans-serif;
}

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

/* lang-boot.js hides the English copy for Arabic visitors until
   coming-soon.js has swapped in the Arabic */
html.i18n-pending .cs-bar,
html.i18n-pending main,
html.i18n-pending footer {
  visibility: hidden;
}

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

body {
  margin: 0;
  background: var(--p-clear);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
[dir='rtl'] body {
  line-height: 1.7;
}

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

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

.skip {
  position: fixed;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 50;
  background: var(--p-base);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}
.skip:focus {
  top: 12px;
}

/* ---------- the top bar: the logo and the language button ---------- */

.cs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1440px;
  min-height: 88px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  color: var(--p-base);
  text-decoration: none;
  border-radius: 10px;
  padding: 4px;
}
.brand-bull,
.brand-word {
  display: block;
  background: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
}
.brand-bull {
  --m: url('../assets/img/bull.svg');
  width: 54px;
  height: 32px;
}
.brand-word {
  --m: url('../assets/img/wordmark.svg');
  width: 52px;
  height: 16px;
  margin-inline-start: -6px;
  margin-bottom: 0.5px;
  color: var(--n-ink);
}
/* the logo never mirrors */
[dir='rtl'] .brand {
  direction: ltr;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  border-radius: 256px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--n-line);
  color: var(--n-ink);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.lang-btn::before {
  content: '';
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url('../assets/icons/translate.svg') center / 16px 16px no-repeat;
  mask: url('../assets/icons/translate.svg') center / 16px 16px no-repeat;
}
.lang-btn:lang(ar) {
  /* a system Arabic face, so the English page never downloads the Arabic
     web font just for this one word */
  font-family: 'Geeza Pro', 'Segoe UI', 'Noto Naskh Arabic', 'Noto Sans Arabic UI', Tahoma, sans-serif;
}
.lang-btn:lang(en) {
  font-family: 'Nunito Sans', sans-serif;
}

/* ---------- the hero: the copy beside Toro ---------- */

.cs-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-areas: 'copy stage';
  align-items: center;
  column-gap: clamp(24px, 5vw, 80px);
  max-width: 1440px;
  min-height: calc(100vh - 88px);
  min-height: calc(100svh - 88px);
  margin: 0 auto;
  padding: 8px var(--gutter) clamp(48px, 8vh, 88px);
}
/* the page fades to the footer's white */
body::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 100%;
  max-height: 1400px;
  z-index: -1;
  background:
    radial-gradient(48% 40% at 72% 42%, rgba(207, 182, 255, 0.5), rgba(207, 182, 255, 0) 70%),
    radial-gradient(36% 30% at 8% 8%, rgba(240, 233, 255, 0.9), rgba(240, 233, 255, 0) 70%),
    linear-gradient(180deg, #f6f0ff 0, var(--p-clear) 55%, #fff 100%);
  pointer-events: none;
}
[dir='rtl'] body::before {
  background:
    radial-gradient(48% 40% at 28% 42%, rgba(207, 182, 255, 0.5), rgba(207, 182, 255, 0) 70%),
    radial-gradient(36% 30% at 92% 8%, rgba(240, 233, 255, 0.9), rgba(240, 233, 255, 0) 70%),
    linear-gradient(180deg, #f6f0ff 0, var(--p-clear) 55%, #fff 100%);
}
body {
  position: relative;
  z-index: 0;
}

.cs-copy {
  grid-area: copy;
  max-width: 620px;
  min-width: 0;
}

/* the launch date, in a white chip with a coin */
.cs-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 5px 16px 5px 6px;
  border-radius: 256px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--p-soft), 0 3px 0 var(--p-subtle);
  color: var(--p-base);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
}
[dir='rtl'] .cs-date {
  padding: 5px 6px 5px 16px;
}
.cs-date img {
  flex: none;
  width: 24px;
  height: 24px;
}

h1 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--n-ink);
  text-wrap: balance;
}
[dir='rtl'] h1 {
  letter-spacing: 0;
  line-height: 1.3;
}
/* the brand name in brand purple, as in the design's "FunFi is almost here" */
.brand-text {
  color: var(--p-base);
  background: linear-gradient(90deg, var(--p-base), #9a3bff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cs-lede {
  margin: 20px 0 0;
  max-width: 34em;
  text-wrap: pretty;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.45;
  letter-spacing: -0.011em;
  color: var(--n-ink-2);
}
[dir='rtl'] .cs-lede {
  letter-spacing: 0;
  line-height: 1.75;
}

/* ---------- the countdown ---------- */

.cs-count {
  margin-top: 32px;
}
.cs-clock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 12px);
  max-width: 460px;
  /* the space is kept while coming-soon.js fills in the digits */
  visibility: hidden;
}
html.cs-ticking .cs-clock {
  visibility: visible;
}
.cs-unit {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  padding: 12px 4px 10px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--p-soft), 0 4px 0 var(--p-subtle), 0 18px 30px -20px rgba(60, 0, 124, 0.45);
}
/* One cell per digit: the brand font's subset has no tabular figures, so
   fixed cells keep the numbers from shifting as they count. The digits
   read left to right in Arabic too. */
.cs-num {
  display: flex;
  justify-content: center;
  direction: ltr;
  overflow: hidden;
  min-height: 1.15em;
  font-family: 'General Sans', 'Nunito Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(30px, 3.3vw, 46px);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--p-inverse);
}
.cs-dg {
  display: inline-block;
  width: 0.62em;
  text-align: center;
}
.cs-lbl {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--n-ink-2);
}
[dir='rtl'] .cs-lbl {
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
}
.cs-when {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--n-ink-2);
}

/* Once the countdown reaches zero (coming-soon.js adds is-out) the title
   says FunFi is out, the store pills say "Now on", and the countdown and
   the form go. */
html.is-out .cs-count,
html.is-out .notify {
  display: none;
}

/* ---------- the Notify me form (src/notify.js) ---------- */

/* the design's email field with Notify me inside the pill, and the line
   under it that also carries the form's answers (as on preview/web-v5) */
.notify {
  position: relative;
  max-width: 460px;
  margin-top: 28px;
}
.notify-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 60px;
  padding: 8px;
  padding-inline-start: 22px;
  border-radius: 256px;
  background: #fff;
  border: 1px solid #e1e1e1;
  transition: border-color 0.2s ease;
}
.notify-field[hidden] {
  display: none;
}
/* the ring goes round the whole pill while the field has focus */
.notify-field:focus-within {
  border-color: var(--p-base);
}
.notify-field:has(input:focus) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
@supports not selector(:has(*)) {
  .notify-field:focus-within {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }
}
.notify-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.008em;
  color: var(--n-ink);
}
/* an address reads left to right; in Arabic it still sits at the right */
[dir='rtl'] .notify-field input {
  text-align: right;
  letter-spacing: 0;
}
.notify-field input::placeholder {
  color: var(--n-muted);
  opacity: 1;
}
.notify-field input[aria-invalid='true'] {
  color: #b42318;
}
/* the design's Skeuomorphic Brand Primary button */
.notify-btn {
  flex: none;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 256px;
  background: linear-gradient(180deg, #a654fe 0, #8e26fd 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.12),
    0 0 0 0.8px #5b01b9,
    0 1.5px 3px rgba(7, 7, 7, 0.08),
    0 4px 4px rgba(7, 7, 7, 0.06),
    0 12px 6px rgba(7, 7, 7, 0.04);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.notify-btn:hover {
  filter: brightness(1.06);
}
.notify-btn:active {
  transform: translateY(1px);
}
.notify-btn:disabled {
  cursor: progress;
  filter: saturate(0.7) brightness(1.05);
}
.notify-note {
  margin: 10px 0 0;
  padding-inline: 4px;
  text-wrap: pretty;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  color: var(--n-ink-2);
}
.notify-note.is-error {
  color: #b42318;
}
/* "You are on the list" takes the field's place */
.notify-note.is-done {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  margin: 0;
  padding: 10px 22px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid var(--p-subtle);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  color: var(--p-inverse);
  text-align: start;
}
.notify-note.is-done::before {
  content: '';
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--p-base) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.notify-again {
  margin: 8px 0 0;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--p-base);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.notify-again[hidden] {
  display: none;
}
/* the honeypot: out of sight and out of reach, for people and screen readers */
.notify-hp {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

/* ---------- the store pills ---------- */

/* Not links and not buttons: there is nothing to open until launch. So
   they look like labels, with a dashed edge, and never react to the
   pointer. No store badge artwork: that is only for live links. */
.cs-stores {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
}
.cs-store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px 8px 14px;
  border-radius: 256px;
  border: 1px dashed var(--p-subtle);
  background: rgba(255, 255, 255, 0.55);
  color: var(--n-ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.35;
}
[dir='rtl'] .cs-store {
  padding: 8px 14px 8px 18px;
}
.cs-store svg {
  flex: none;
  width: auto;
  height: 18px;
}
.cs-store b {
  font-weight: 700;
}
html.is-out .cs-store {
  border-style: solid;
  background: #fff;
}

/* ---------- Toro ---------- */

/* The still image shows first. Once the 3D scene has drawn the same frame,
   coming-soon.js adds is-live: the canvas fades in over the still, then the
   still fades out. Both mirror in Arabic, so Toro turns toward the copy. */
.cs-stage {
  grid-area: stage;
  position: relative;
  justify-self: center;
  width: min(100%, 500px);
  aspect-ratio: 4 / 5;
  margin: 0;
}
.cs-glow {
  position: absolute;
  inset: 8% -6% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(185, 140, 255, 0.42), rgba(185, 140, 255, 0.16) 62%, rgba(185, 140, 255, 0));
}
.cs-poster,
.cs-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.cs-poster {
  z-index: 2;
  object-fit: contain;
  transition: opacity 0.3s ease 0.45s;
}
.cs-canvas {
  z-index: 3;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.cs-stage.is-live .cs-canvas {
  opacity: 1;
}
.cs-stage.is-live .cs-poster {
  opacity: 0;
}
[dir='rtl'] .cs-poster,
[dir='rtl'] .cs-canvas {
  transform: scaleX(-1);
}

/* coins and a gift floating round him; one coin sits behind him */
.cs-float {
  position: absolute;
  z-index: 4;
  height: auto;
  pointer-events: none;
  animation: cs-bob var(--t, 6s) ease-in-out var(--d, 0s) infinite;
  transform: rotate(var(--r, 0deg));
}
.cs-coin-a {
  width: 15%;
  top: 22%;
  inset-inline-start: 0;
  --r: -14deg;
  --t: 6.4s;
}
.cs-coin-b {
  z-index: 1;
  width: 10%;
  top: 9%;
  inset-inline-end: 9%;
  --r: 12deg;
  --t: 7.2s;
  --d: -2.4s;
}
.cs-coin-c {
  width: 9%;
  top: 56%;
  inset-inline-end: 2%;
  --r: -8deg;
  --t: 5.6s;
  --d: -1.2s;
}
.cs-gift {
  width: 15%;
  bottom: 9%;
  inset-inline-start: 6%;
  --r: -6deg;
  --t: 6.8s;
  --d: -3.6s;
}
@keyframes cs-bob {
  0%,
  100% {
    transform: translateY(0) rotate(var(--r, 0deg));
  }
  50% {
    transform: translateY(-10px) rotate(calc(var(--r, 0deg) + 7deg));
  }
}

/* ---------- without JavaScript, reduced motion ---------- */

/* the countdown and the form need the script; the date stays */
@media (scripting: none) {
  .cs-clock,
  .notify {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cs-float {
    animation: none;
  }
  .cs-poster,
  .cs-canvas,
  .notify-field,
  .notify-btn {
    transition: none;
  }
}
html.reduced .cs-float {
  animation: none;
}

/* ---------- the footer (src/footer.css) ---------- */

/* the Help column takes the place of the home page's Explore column */
.foot-help {
  grid-area: explore;
}

/* ---------- phones and narrow tablets: Toro above the copy ---------- */

@media (max-width: 859px) {
  .cs-bar {
    min-height: 64px;
  }
  .brand-bull {
    width: 46px;
    height: 27px;
  }
  .brand-word {
    width: 46px;
    height: 14px;
  }
  .lang-btn {
    height: 40px;
    padding: 0 14px;
  }
  .cs-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'stage'
      'copy';
    justify-items: center;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 56px;
    text-align: center;
  }
  body::before,
  [dir='rtl'] body::before {
    background:
      radial-gradient(70% 22% at 50% 14%, rgba(207, 182, 255, 0.55), rgba(207, 182, 255, 0) 70%),
      linear-gradient(180deg, #f6f0ff 0, var(--p-clear) 55%, #fff 100%);
  }
  .cs-stage {
    width: min(58vw, 250px);
  }
  .cs-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 480px;
  }
  .cs-date {
    margin-bottom: 14px;
  }
  h1 {
    font-size: clamp(32px, 9.4vw, 46px);
  }
  .cs-lede {
    margin-top: 14px;
    font-size: 17px;
  }
  .cs-count {
    width: 100%;
    margin-top: 24px;
  }
  .cs-clock {
    margin: 0 auto;
  }
  .cs-unit {
    border-radius: 16px;
    padding: 10px 2px 8px;
  }
  .cs-num {
    font-size: clamp(26px, 8vw, 36px);
  }
  .cs-lbl {
    font-size: 11px;
    letter-spacing: 0.04em;
  }
  [dir='rtl'] .cs-lbl {
    font-size: 12px;
  }
  .notify {
    width: 100%;
    margin-top: 24px;
  }
  .notify-field {
    height: 56px;
    padding: 6px;
    padding-inline-start: 18px;
  }
  .notify-btn {
    height: 44px;
    padding: 0 18px;
    font-size: 15px;
  }
  .notify-note {
    font-size: 13px;
  }
  .notify-note.is-done {
    font-size: 14px;
  }
  .cs-stores {
    justify-content: center;
    margin-top: 22px;
  }
}

/* the narrowest phones: the button keeps its words, the field shrinks */
@media (max-width: 359px) {
  .notify-field {
    padding-inline-start: 14px;
    gap: 6px;
  }
  .notify-btn {
    padding: 0 14px;
  }
  .cs-store {
    font-size: 13px;
  }
}
