/* Ostrich Prop — the 3D home page (pages/home_page_scene.html, js/scene.js).
   One WebGL scene fixed behind the page tells the way from a challenge to a payout as the visitor scrolls; the copy
   keeps to the reading side (right in Persian, left in English) and the scene to the other; on a phone the scene
   takes the top of the screen and the copy reads below it. The colours of the scene are these tokens: js/scene.js
   reads them from here, so the gold and the silver looks are defined once. Loaded after site.css. */

/* the main button of this page: the scene's own metal in the gold and silver palettes, the firm's accent in the
   others (where the metal is plain white light and a white button would say nothing) */
.scene-home { --cta: var(--sc-accent); --cta-hi: var(--sc-accent-hi); --cta-ink: var(--sc-accent-ink); }
html:is([data-palette="crimson"], [data-palette="black"], [data-palette="navy"], [data-palette="graphite"], [data-palette="day"], [data-palette="paper"], [data-palette="custom"]) .scene-home {
  --cta: var(--brand); --cta-hi: var(--brand-hi); --cta-ink: var(--brand-ink);
}

/* the page's own links (to the story, the plans, the questions) glide rather than jump */
html:has(body.scene-home) { scroll-behavior: smooth; }

/* ------------------------------------------------------------------ the stage */
.sc-stage, .sc-veil, .sc-hud { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.sc-stage { width: 100%; height: 100lvh; display: block; opacity: 0; transition: opacity 1.2s ease; }
.sc-stage.is-on { opacity: 1; }
.sc-stage[hidden], .sc-hud[hidden] { display: none; }
/* the reading side gets a soft shade, so no line of the scene ever crosses the words */
.sc-veil { background: linear-gradient(to left, color-mix(in srgb, var(--ink) 82%, transparent) 0%,
           color-mix(in srgb, var(--ink) 54%, transparent) 36%, transparent 60%); }
[dir="ltr"] .sc-veil { background: linear-gradient(to right, color-mix(in srgb, var(--ink) 82%, transparent) 0%,
           color-mix(in srgb, var(--ink) 54%, transparent) 36%, transparent 60%); }
html.has-scene { background: var(--ink); }
html.has-scene body { background: transparent; }
html.has-scene body::before { display: none; }
/* without WebGL: a warm pool of light where the scene would be, and no screens kept empty for it */
html.no-scene .sc-veil { background: radial-gradient(60vmax 50vmax at 18% 30%, color-mix(in srgb, var(--sc-accent) 12%, transparent), transparent 62%); }
[dir="ltr"].no-scene .sc-veil { background: radial-gradient(60vmax 50vmax at 82% 30%, color-mix(in srgb, var(--sc-accent) 12%, transparent), transparent 62%); }

/* the header over a moving scene: no backdrop blur (it would be redrawn every frame), a little more ink instead */
.scene-home .site-header { background: color-mix(in srgb, var(--ink) 95%, transparent);
  -webkit-backdrop-filter: none; backdrop-filter: none; }
.scene-home .site-header .btn { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.scene-home .site-header .btn:hover { background: var(--cta-hi); border-color: var(--cta-hi); }
.scene-home .site-footer { position: relative; background: color-mix(in srgb, var(--ink) 92%, transparent); }

/* ------------------------------------------------------------------ the words */
.sc-copy { max-width: 560px; position: relative; }
.sc-hero .sc-copy { max-width: 660px; }
/* Its colour is the button's ground, and the sheen lies over that as a picture (the lighter colour, thinning to
   nothing at the foot). Under the pointer only the ground changes, so the change can glide. A gradient cannot fade
   into a flat colour: when the two were swapped the button stood empty for an instant, the page showing through,
   before its colour came back. */
.sc-btn, .sc-btn:hover { background-image: linear-gradient(180deg, var(--cta-hi), color-mix(in srgb, var(--cta-hi) 0%, transparent)); }
.sc-btn { background-color: var(--cta); border-color: var(--cta); color: var(--cta-ink);
  box-shadow: 0 10px 34px -12px color-mix(in srgb, var(--cta) 70%, transparent);
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease; }
.sc-btn:hover { background-color: var(--cta-hi); border-color: var(--cta-hi);
  box-shadow: 0 12px 38px -12px color-mix(in srgb, var(--cta) 88%, transparent); }
.scene-home .btn-ghost { background: color-mix(in srgb, var(--ink) 55%, transparent); }
.scene-home .btn-ghost:hover { border-color: color-mix(in srgb, var(--sc-accent) 60%, transparent); background: color-mix(in srgb, var(--ink) 70%, transparent); }
.is-gain { color: var(--sc-gain); }
.is-loss { color: var(--sc-loss); }
.is-sand { color: var(--sc-sand); }
.is-accent { color: var(--sc-accent); }

/* the first screen */
.sc-hero .wrap { padding-block: clamp(48px, 10vh, 124px) clamp(64px, 12vh, 140px); }
.sc-title { margin: 0; font-weight: 800; text-wrap: balance; }
.sc-title span { display: block; }
.sc-strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 1.2rem + 3.6vw, 4.4rem); line-height: 1.38; }
.sc-light { font-family: var(--font-text); font-weight: 400; font-size: clamp(2rem, 1rem + 3vw, 3.7rem); line-height: 1.36;
  color: color-mix(in srgb, var(--bone) 72%, var(--sc-accent)); }
:lang(en) .sc-strong { font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
:lang(en) .sc-light { line-height: 1.12; letter-spacing: -0.015em; }
.sc-lead { margin-top: 26px; max-width: 34em; color: var(--bone-2); font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem); }
.sc-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.sc-fine { margin-top: 18px; color: var(--muted); font-size: var(--step--1); }
/* the plan's numbers as an instrument row: the detail only a prop firm has */
.sc-rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 34px 0 0; padding-top: 18px;
  border-top: 1px solid var(--line); }
.sc-rules div { min-width: 0; }
.sc-rules dt { color: var(--muted); font-size: 0.8125rem; line-height: 1.6; }
.sc-rules dd { margin: 4px 0 0; font: 700 1.625rem/1.3 var(--font-display); font-variant-numeric: tabular-nums; }
/* Vazirmatn's fixed-width digits stand too far apart at this size: Persian pages keep the natural ones */
html[lang="fa"] .sc-rules dd { font-variant-numeric: normal; font-weight: 800; }

/* one orchestrated moment when the page opens: the words rise as the scene gathers (site.css stills it for
   visitors who asked for less motion). They wait for their own letters first (.sc-hold, put on and taken off by the
   page's first script: until the font is there, at most a second): words that rose in a stand-in font would jump
   to other line breaks the moment the real one arrived. */
.sc-js .sc-hero .sc-copy > * { animation: sc-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.sc-hold .sc-hero .sc-copy > * { animation-play-state: paused; }
.sc-js .sc-hero .sc-copy > :nth-child(2) { animation-delay: 0.12s; }
.sc-js .sc-hero .sc-copy > :nth-child(3) { animation-delay: 0.22s; }
.sc-js .sc-hero .sc-copy > :nth-child(4) { animation-delay: 0.3s; }
.sc-js .sc-hero .sc-copy > :nth-child(5) { animation-delay: 0.38s; }
@keyframes sc-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* the story: one screen per step, so the scene has room to move */
.sc-intro .wrap { padding-block: 40px 0; }
.sc-intro h2, .sc-head h2, .sc-final h2 { font-size: var(--step-3); }
.sc-intro p, .sc-head p, .sc-final p { margin-top: 14px; max-width: 36em; color: var(--bone-2); }
.sc-step .wrap { min-height: 88vh; display: grid; align-content: center; padding-block: 48px; }
.sc-no { font: 700 0.9375rem/1.4 var(--font-display); color: var(--sc-accent); font-variant-numeric: tabular-nums; }
.sc-step h3 { margin-top: 6px; font-size: var(--step-2); }
.sc-step p { margin-top: 12px; color: var(--bone-2); }
.sc-step .link-arrow { margin-top: 16px; color: var(--sc-accent); }
.sc-facts { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.sc-facts li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 0.9688rem; }
.sc-facts span { color: var(--bone-2); min-width: 0; }
.sc-facts b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* the plans */
.sc-plans .wrap { padding-block: 120px 40px; }
.sc-head { max-width: 46rem; }
.sc-panel { margin-top: 28px; max-width: 900px; padding: clamp(18px, 3vw, 32px); border: 1px solid var(--line);
  border-radius: 18px; background: color-mix(in srgb, var(--ink-2) 90%, transparent); }
.sc-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-tab { display: inline-grid; place-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--bone-2); font: 600 0.9375rem/1.2 var(--font-text);
  text-decoration: none; cursor: pointer; }
.sc-tab:hover { color: var(--bone); border-color: var(--bone-2); }
.sc-tab[aria-selected="true"] { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.sc-plan { margin-top: 20px; }
.sc-plan:focus-visible { outline-offset: 6px; }
.sc-tagline { color: var(--bone-2); }
.sc-table { overflow-x: auto; margin-top: 18px; }
.sc-table table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 0.9688rem; }
.sc-table th, .sc-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
.sc-table thead th { color: var(--muted); font-weight: 500; font-size: 0.875rem; }
.sc-table tbody th { color: var(--bone-2); font-weight: 500; }
.sc-table td { font-weight: 600; font-variant-numeric: tabular-nums; }
.sc-table td.is-none { color: var(--muted); font-weight: 400; }
.sc-sizes { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sc-sizes a { display: grid; gap: 2px; min-width: 118px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: border-color 0.15s ease, background-color 0.15s ease; }
.sc-sizes a:hover { border-color: color-mix(in srgb, var(--sc-accent) 70%, transparent); background: color-mix(in srgb, var(--sc-accent) 7%, transparent); }
.sc-sizes b { font: 700 1.25rem/1.35 var(--font-display); font-variant-numeric: tabular-nums; }
.sc-sizes span { color: var(--muted); font-size: 0.875rem; }
.sc-sizes s { color: var(--muted); font-size: 0.8125rem; }
.sc-payout { margin-top: 20px; color: var(--bone-2); font-size: 0.9688rem; }
.sc-plan .btn { margin-top: 20px; }
.sc-panel .sample-note { margin-top: 16px; }

/* the questions */
.sc-faq .wrap { padding-block: 110px 40px; }
.sc-faq .faq { margin-top: 24px; max-width: 46rem; border-top-color: var(--line); }
.sc-faq .faq details { background: none; }
.sc-more { margin-top: 20px; }

/* the last call */
.sc-final .wrap { min-height: 92vh; display: grid; align-content: center; padding-block: 80px; }
.sc-demo { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 12px; justify-items: start; }
.sc-demo p { color: var(--bone-2); font-size: 0.9688rem; }

/* ------------------------------------------------------------------ live labels in the scene */
.sc-tag { position: absolute; top: 0; left: 0; will-change: transform, opacity; }
.sc-tag[hidden] { display: none; }
.sc-tag-in { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; padding: 3px 10px; border-radius: 8px;
  font: 600 0.8125rem/1.55 var(--font-text); background: color-mix(in srgb, var(--ink) 74%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent); box-shadow: 0 6px 24px -10px var(--shadow-soft); }
.sc-tag-num { font-variant-numeric: tabular-nums; }
.sc-tag-num:empty { display: none; }
.sc-tag.at-above .sc-tag-in { transform: translate(-50%, calc(-100% - 12px)); }
.sc-tag.at-below .sc-tag-in { transform: translate(-50%, 12px); }
.sc-tag.at-center .sc-tag-in { transform: translate(-50%, -50%); }
.sc-tag.is-gain { color: var(--sc-gain); }
.sc-tag.is-loss { color: var(--sc-loss); }
.sc-tag.is-sand { color: var(--sc-sand); }
.sc-tag.is-accent { color: var(--sc-accent-hi); }
.sc-tag.is-quiet { color: var(--bone-2); }
.sc-tag.is-account .sc-tag-in { font-size: 0.875rem; padding: 4px 12px; background: color-mix(in srgb, var(--ink) 82%, transparent); }

/* ------------------------------------------------------------------ phones and portrait screens
   The scene keeps the top of the screen and the words read below it, on a darker ground. */
@media (max-width: 860px) {
  .sc-veil, [dir="ltr"] .sc-veil {
    background: linear-gradient(to bottom, transparent 0%, transparent 24%, color-mix(in srgb, var(--ink) 66%, transparent) 44%,
                color-mix(in srgb, var(--ink) 80%, transparent) 100%);
  }
  .sc-js:not(.no-scene) .sc-hero .wrap { padding-block: 31svh 40px; }
  .sc-hero .sc-fine { display: none; }
  .sc-lead { margin-top: 18px; font-size: 1.0625rem; }
  .sc-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .sc-js:not(.no-scene) .sc-step .wrap { min-height: 80vh; align-content: end; padding-block: 48px 9svh; }
  .sc-copy, .sc-hero .sc-copy { max-width: none; }
  .sc-tag-in { font-size: 0.75rem; padding: 2px 8px; }
}
/* without the scene the story needs no empty screens */
html.no-scene .sc-step .wrap, html.no-scene .sc-final .wrap { min-height: 0; padding-block: 56px; }
@media (prefers-reduced-motion: reduce) {
  .sc-stage { transition: none; }
}
@media print {
  .sc-stage, .sc-veil, .sc-hud { display: none; }
}
