/* ==========================================================================
   AI EA -- BasketGo
   Aesthetic: laboratory instrumentation. Oscilloscope, seismograph, graph
   paper. Deliberately NOT the forex-marketing vocabulary of green candles and
   gold coins -- the product is an instrument panel, and the sales argument is
   measurement, so the surface should read as a calibrated readout.

   The signature component is .reading: every claim on this site is rendered as
   an instrument reading carrying its own measurement conditions, visibly,
   never in a footnote.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Substrate -- cold near-black, the colour of an unlit screen */
  --ink-900: #08090B;
  --ink-800: #0D0F13;
  --ink-700: #12151A;
  --ink-600: #181C23;
  --line:    #232932;
  --line-hi: #333B47;

  /* Readout */
  --text:    #E4E9EE;
  --dim:     #93A0AD;
  --faint:   #5C6774;

  /* Signal amber: the instrument-lamp accent. Used sparingly, never as fill. */
  --amber:   #FFB000;
  --amber-8: rgba(255, 176, 0, 0.08);
  --amber-2: rgba(255, 176, 0, 0.22);

  /* Measured data reads cold; human interface reads warm. */
  --probe:   #5FD3E4;
  --probe-8: rgba(95, 211, 228, 0.08);

  /* Limits and honesty live in a colour that refuses to be reassuring. */
  --limit:   #E8674C;

  --sans: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --rule: 1px solid var(--line);
}

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

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

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
  line-height: 1.75;
  overflow-x: hidden;
}

/* --- Atmosphere: graph paper + a fine grain, both barely there ----------- */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(to right,  rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px, 140px 140px, 140px 140px;
  mask-image: radial-gradient(ellipse 120% 80% at 70% 0%, #000 0%, transparent 75%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

.shell { position: relative; z-index: 2; }

/* --- Type ---------------------------------------------------------------- */

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.15rem, 1.4rem + 3.4vw, 4.35rem); font-weight: 700; line-height: 1.14; }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 1.02rem + 0.5vw, 1.4rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

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

.num, .mono {
  font-family: var(--mono);
  font-feature-settings: 'tnum' 1;
  direction: ltr;
  unicode-bidi: isolate;
}

/* Small-caps latin tag, used for section markers and instrument labels */
.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  direction: ltr;
  unicode-bidi: isolate;
}

/* --- Layout -------------------------------------------------------------- */

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

section { padding-block: clamp(4rem, 9vw, 8rem); }

.head { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 62ch; }
.head .tag { display: block; margin-bottom: 1.1rem; }
.head .tag b { color: var(--amber); font-weight: 500; }
.head p { color: var(--dim); margin-top: 1.1rem; font-size: 1.05em; }

/* --- Navigation ---------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 9, 11, 0.78);
  border-bottom: var(--rule);
}
.nav-in {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-mark {
  width: 26px; height: 26px;
  flex: none;
  border: 1px solid var(--amber-2);
  border-radius: 3px;
  position: relative;
  background: var(--amber-8);
}
/* a rising trace inside the mark -- the instrument, not the profit */
.brand-mark::after {
  content: '';
  position: absolute; inset: 5px;
  border-inline-start: 1px solid var(--amber);
  border-bottom: 1px solid var(--amber);
  opacity: 0.85;
}
.brand-mark::before {
  content: '';
  position: absolute;
  inset-block-end: 6px; inset-inline-start: 6px;
  width: 9px; height: 9px;
  border-top: 1px solid var(--amber);
  border-inline-end: 1px solid var(--amber);
  transform: rotate(45deg);
  opacity: 0.55;
}
.nav-links { display: flex; gap: 1.6rem; margin-inline-start: auto; }
.nav-links a {
  font-size: 0.925rem;
  color: var(--dim);
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}
.nav-links a:hover { color: var(--text); border-bottom-color: var(--amber); }

/* --- Mobile navigation --------------------------------------------------- */
/* Egypt and the Gulf are mobile-first markets. Hiding the links below a
   breakpoint with nothing in their place would leave most visitors with no
   way to move around the site at all. */

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-inline-start: auto;
    width: 42px;
    height: 42px;
    padding: 0 9px;
    background: none;
    border: 1px solid var(--line);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color .18s;
  }
  .nav-toggle:hover { border-color: var(--amber); }
  .nav-toggle span {
    display: block;
    height: 1.5px;
    background: var(--text);
    transition: transform .26s cubic-bezier(.22,.61,.36,1), opacity .18s;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* Plain display toggle. An earlier attempt animated grid-template-rows
     from 0fr to 1fr, which measured 1px tall rows on a real viewport --
     the panel looked open and was untappable. A menu that works beats a
     menu that slides. */
  .nav-links {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0 var(--gut) 0.5rem;
    background: rgba(8, 9, 11, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: var(--rule);
    box-shadow: 0 22px 40px -24px rgba(0, 0, 0, 0.9);
  }
  .nav-in[data-open="true"] .nav-links {
    display: flex;
    animation: navdrop .24s cubic-bezier(.22, .61, .36, 1);
  }
  .nav-links a {
    padding-block: 0.95rem;          /* ~48px tap target */
    border-bottom: 1px solid var(--line);
    font-size: 1.02rem;
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a.on { color: var(--amber); border-bottom-color: var(--line); }
}

@keyframes navdrop {
  from { opacity: 0; transform: translateY(-8px); }
}

.nav-in { position: relative; }

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.78rem 1.5rem;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--line-hi);
  color: var(--text);
  transition: border-color .18s, background .18s, transform .18s;
}
.btn:hover { border-color: var(--amber); transform: translateY(-1px); }
.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #14100A;
  font-weight: 600;
}
.btn-primary:hover { background: #FFC12E; border-color: #FFC12E; }
.btn .num { font-size: 0.82em; opacity: 0.7; }

/* --- Hero ---------------------------------------------------------------- */

.hero { padding-block: clamp(3.5rem, 8vw, 7rem) clamp(3rem, 6vw, 5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 1000px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: 1.5rem; }
.hero h1 .quiet { color: var(--faint); font-weight: 300; }
.hero h1 .lit {
  color: var(--amber);
  position: relative;
  white-space: nowrap;
}
.hero-lede {
  color: var(--dim);
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.22rem);
  max-width: 46ch;
  margin-bottom: 2.1rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.4rem; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2rem;
  padding-top: 1.5rem;
  border-top: var(--rule);
}
.hero-meta div { padding-block: 0.45rem; }
.hero-meta dt { font-size: 0.78rem; color: var(--faint); margin-bottom: 0.1rem; }
.hero-meta dd { margin: 0; font-size: 0.95rem; font-weight: 500; }

/* --- The panel mock: the product, shown rather than described ------------ */

.panel-stage { perspective: 1400px; }
.panel {
  direction: ltr;
  font-family: var(--mono);
  font-size: 0.735rem;
  line-height: 1.62;
  background: linear-gradient(180deg, #0E1116 0%, #0A0C10 100%);
  border: 1px solid var(--line-hi);
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6),
    0 34px 70px -26px rgba(0,0,0,0.95),
    0 0 90px -40px rgba(255,176,0,0.28);
  transform: rotateY(6deg) rotateX(2deg) rotateZ(-0.5deg);
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
  overflow: hidden;
}
.panel:hover { transform: rotateY(2deg) rotateX(1deg); }
@media (max-width: 1000px) { .panel { transform: none; } }

.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background: #070809;
  border-bottom: 1px solid var(--line);
  color: var(--amber);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
}
.panel-bar span:last-child { color: var(--faint); font-weight: 400; }
.panel-body { padding: 0.85rem; }

.prow {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding-block: 0.2rem;
}
.prow + .prow { border-top: 1px solid rgba(35,41,50,0.55); }
.pccy { color: var(--dim); font-weight: 500; }

/* the strength bar: a measurement, drawn from the centre out */
.pbar { height: 5px; background: #14181E; border-radius: 1px; position: relative; }
.pbar i {
  position: absolute;
  inset-block: 0;
  border-radius: 1px;
  display: block;
}
.pbar i.pos { left: 50%; background: var(--probe); }
.pbar i.neg { right: 50%; background: var(--limit); opacity: 0.75; }
.pbar::after {
  content: '';
  position: absolute;
  inset-block: -2px;
  left: 50%;
  width: 1px;
  background: var(--line-hi);
}

.pval { color: var(--faint); font-size: 0.68rem; min-width: 46px; text-align: right; }

.pgo {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.42rem;
  border-radius: 2px;
  border: 1px solid var(--amber-2);
  color: var(--amber);
  background: var(--amber-8);
}
.pgo.off { border-color: var(--line); color: var(--faint); background: none; }

.pstate {
  margin-top: 0.75rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--amber-2);
  border-radius: 2px;
  background: var(--amber-8);
}
.pstate b { color: var(--amber); letter-spacing: 0.08em; }
.pstate em { font-style: normal; color: var(--faint); }
.pmeter { height: 3px; background: #14181E; margin-top: 0.5rem; position: relative; }
.pmeter i { position: absolute; inset-block: 0; left: 0; background: var(--amber); }
.pmeter u {
  position: absolute; inset-block: -3px; width: 1px;
  background: var(--line-hi); text-decoration: none;
}
.pnote { margin-top: 0.55rem; color: var(--faint); font-size: 0.66rem; }
.pnote span { color: var(--probe); }

.panel-cap {
  margin-top: 1.1rem;
  font-size: 0.82rem;
  color: var(--faint);
  text-align: center;
  line-height: 1.6;
}

/* --- The honest strip, immediately under the hero ------------------------ */

.strip {
  border-block: var(--rule);
  background: linear-gradient(90deg, transparent, rgba(232,103,76,0.045), transparent);
}
.strip-in {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-block: 1.15rem;
  font-size: 0.92rem;
  color: var(--dim);
}
.strip-in .tag { color: var(--limit); flex: none; padding-top: 0.28rem; }

/* --- Cost cards (why traders lose) --------------------------------------- */

.cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr));
  gap: 1px;
  background: var(--line);
  border: var(--rule);
}
.cost {
  background: var(--ink-900);
  padding: clamp(1.5rem, 3vw, 2.15rem);
  transition: background .25s;
}
.cost:hover { background: var(--ink-800); }
.cost-fig {
  font-family: var(--mono);
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.1rem);
  font-weight: 600;
  color: var(--limit);
  line-height: 1;
  letter-spacing: -0.03em;
  direction: ltr;
  unicode-bidi: isolate;
  margin-bottom: 0.85rem;
}
.cost h3 { margin-bottom: 0.7rem; font-size: 1.05rem; }
.cost p { color: var(--dim); font-size: 0.94rem; }
.cost .cond {
  display: block;
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  font-size: 0.775rem;
  color: var(--faint);
  line-height: 1.6;
}

/* --- Feature list -------------------------------------------------------- */

.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(1.75rem, 3vw, 2.75rem);
}
.feat { padding-inline-start: 1.2rem; border-inline-start: 1px solid var(--line); }
.feat:hover { border-inline-start-color: var(--amber); }
.feat .tag { color: var(--amber); display: block; margin-bottom: 0.7rem; }
.feat h3 { margin-bottom: 0.5rem; }
.feat p { color: var(--dim); font-size: 0.94rem; }

/* --- .reading: the signature component ----------------------------------- */

.readings { display: grid; gap: 1px; background: var(--line); border: var(--rule); }
.reading {
  background: var(--ink-900);
  display: grid;
  grid-template-columns: minmax(190px, 0.9fr) minmax(0, 2.1fr);
  gap: clamp(1.25rem, 3vw, 2.75rem);
  padding: clamp(1.65rem, 3.2vw, 2.6rem);
}
@media (max-width: 780px) { .reading { grid-template-columns: 1fr; gap: 1.25rem; } }

.reading-fig {
  font-family: var(--mono);
  font-size: clamp(2.1rem, 1.5rem + 2.3vw, 3rem);
  font-weight: 600;
  color: var(--probe);
  line-height: 1;
  letter-spacing: -0.03em;
  direction: ltr;
  unicode-bidi: isolate;
}
.reading-unit {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.83rem;
  color: var(--faint);
  font-family: var(--sans);
  letter-spacing: 0;
  direction: rtl;
  line-height: 1.5;
}
.reading-claim { font-size: 1.02rem; margin-bottom: 1.3rem; }

.reading dl { margin: 0; display: grid; gap: 0.85rem; }
.reading dt {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.28rem;
  direction: ltr;
  unicode-bidi: isolate;
}
.reading dd { margin: 0; font-size: 0.9rem; color: var(--dim); line-height: 1.65; }
.reading .neg dt { color: var(--limit); }
.reading .neg dd { color: var(--dim); }

/* --- Limits: deliberately the loudest section on the page ---------------- */

.limits { background: var(--ink-800); border-block: var(--rule); }
.limit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.6rem, 3vw, 2.5rem);
}
.limit {
  position: relative;
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  background: var(--ink-900);
  border: var(--rule);
  border-top: 2px solid var(--limit);
}
.limit h3 { margin-bottom: 0.65rem; font-size: 1.05rem; }
.limit p { color: var(--dim); font-size: 0.925rem; }

/* --- Closing ------------------------------------------------------------- */

.close-in { text-align: center; max-width: 60ch; margin-inline: auto; }
.close-in h2 { margin-bottom: 1.2rem; }
.close-in p { color: var(--dim); margin-bottom: 2.2rem; }
.close-cta { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* --- Footer -------------------------------------------------------------- */

.foot { border-top: var(--rule); padding-block: 3rem 3.5rem; background: var(--ink-800); }
.foot-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: center;
  padding-bottom: 1.8rem;
  border-bottom: var(--rule);
  margin-bottom: 1.8rem;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-inline-start: auto; }
.foot-links a { color: var(--dim); font-size: 0.9rem; }
.foot-links a:hover { color: var(--amber); }
.risk {
  font-size: 0.83rem;
  color: var(--faint);
  line-height: 1.85;
  max-width: 92ch;
}
.foot-end {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  font-size: 0.8rem;
  color: var(--faint);
}

/* --- Entrance: one orchestrated reveal, not scattered fidgeting ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    opacity: 0;
    transform: translateY(14px);
    animation: rise .72s cubic-bezier(.22,.61,.36,1) forwards;
  }
  .rise:nth-child(1) { animation-delay: .04s; }
  .rise:nth-child(2) { animation-delay: .12s; }
  .rise:nth-child(3) { animation-delay: .20s; }
  .rise:nth-child(4) { animation-delay: .28s; }
  .rise:nth-child(5) { animation-delay: .36s; }
  .rise:nth-child(6) { animation-delay: .44s; }

  .hero h1        { animation: rise .8s cubic-bezier(.22,.61,.36,1) both .05s; }
  .hero-lede      { animation: rise .8s cubic-bezier(.22,.61,.36,1) both .16s; }
  .hero-cta       { animation: rise .8s cubic-bezier(.22,.61,.36,1) both .26s; }
  .hero-meta      { animation: rise .8s cubic-bezier(.22,.61,.36,1) both .34s; }
  .panel-stage    { animation: rise .95s cubic-bezier(.22,.61,.36,1) both .22s; }

  /* the lock meter fills once, like an instrument settling */
  .pmeter i { animation: settle 1.5s cubic-bezier(.22,.61,.36,1) both .85s; }
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}
@keyframes settle {
  from { width: 0; }
}

/* Reveal-on-scroll hook, driven by site.js */
@media (prefers-reduced-motion: no-preference) {
  .obs { opacity: 0; transform: translateY(16px); transition: opacity .7s, transform .7s; }
  .obs.seen { opacity: 1; transform: none; }
}

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

::selection { background: var(--amber-2); color: #fff; }
