:root {
  --night: #14153a;
  --ink: #0c0d26;
  --gold: #c9a24b;
  --gold-soft: #e6ce8e;
  --violet: #7a6cff;
  --violet-deep: #3f33b8;
  --paper: #ecebf4;
  --text: #f3f2f9;
  --mute: #b1b0cc;
  --ink-mute: #4a4a68;
  --kufi: "Reem Kufi", "IBM Plex Sans Arabic", sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 1.0625rem/1.85 "IBM Plex Sans Arabic", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--kufi); font-weight: 500; margin: 0; line-height: 1.25; }
/* Reem Kufi loses its dots at small sizes, so it stays on display type only */
h3 { font-weight: 600; margin: 0; line-height: 1.4; }
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--gold); color: var(--ink); padding: .5rem 1rem; z-index: 30; }
.skip:focus { top: 1rem; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 2rem;
  padding: .85rem var(--gutter);
  background: rgb(20 21 58 / .96);
  backdrop-filter: blur(10px);
}
.mark { font: 600 1.45rem var(--kufi); color: var(--gold-soft); text-decoration: none; }
.top nav { display: flex; gap: 1.6rem; margin-inline-start: auto; }
.top nav a { text-decoration: none; font-size: .95rem; color: var(--mute); }
.top nav a:hover { color: var(--text); }
.login-link { font-size: .95rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.login-link:hover { color: var(--gold-soft); }

/* Buttons */
.btn {
  display: inline-block; padding: .8rem 1.7rem;
  background: var(--gold); color: var(--ink);
  font-weight: 600; text-decoration: none; border-radius: 3px;
  border: 1.5px solid var(--gold);
  transition: background-color .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--gold-soft); border-color: var(--gold-soft); transform: translateY(-2px); }
.btn-small { padding: .35rem 1.1rem; font-size: .92rem; }
.btn-ghost { background: transparent; color: var(--gold-soft); }
.btn-ghost:hover { color: var(--ink); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--violet-deep); border-color: var(--violet-deep); }
.btn-line { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* Hero: photo, chart and a silhouette-clipped copy of the photo stack so price runs behind him */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100vh - 4rem); min-height: calc(100svh - 4rem);
  padding: clamp(1.5rem, 5vh, 3.5rem) var(--gutter) 0;
  /* Glow matches the photo's grey-indigo backdrop so its masked edges disappear */
  background: radial-gradient(38% 85% at 26% 45%, #2c2e4a 45%, var(--night));
}
.hero-text { position: relative; z-index: 4; max-width: 44rem; }
h1 {
  font-size: clamp(5rem, 13.5vw, 13rem); font-weight: 600; line-height: 1.05;
  color: var(--text);
  animation: rise .9s cubic-bezier(.2,.7,.2,1) both;
}
.role { font-size: clamp(1.25rem, 2vw, 1.7rem); font-weight: 500; color: var(--gold-soft); margin-top: .25rem; }
.lead { max-width: 30rem; margin: 1rem 0 1.6rem; color: var(--mute); }
.figure { position: absolute; inset: 0; pointer-events: none; }
.photo {
  position: absolute; bottom: 0; left: 5%; z-index: 1;
  height: 100%; width: auto; max-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent 4%, #000 34%, #000 58%, transparent 92%), linear-gradient(to bottom, transparent 3%, #000 22%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 4%, #000 34%, #000 58%, transparent 92%), linear-gradient(to bottom, transparent 3%, #000 22%);
  mask-composite: intersect;
}
.photo-front {
  z-index: 3; -webkit-mask-image: none; mask-image: none;
  clip-path: polygon(46.9% 15.5%, 52.5% 16.25%, 56.1% 19.4%, 57.4% 25%, 56.3% 28.4%, 54.9% 33.1%, 61% 36.6%, 67.5% 40%, 74.1% 45%, 78.8% 53.1%, 84.1% 60%, 83.7% 63.1%, 75% 68.1%, 69.9% 71.9%, 74.9% 83.75%, 72.4% 100%, 29.8% 100%, 26.7% 83.4%, 30% 70.6%, 32.8% 59.4%, 28.1% 50%, 24.6% 43.1%, 25.8% 39%, 37.1% 32.5%, 39.9% 29.4%, 36.8% 26.25%, 37.5% 20.6%, 40.8% 16.9%);
}
.chart { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.chart .candle { animation: candle .35s ease-out both; transform-box: fill-box; transform-origin: center; }
.chart text { font: 500 21px "IBM Plex Sans Arabic", sans-serif; fill: var(--gold-soft); }
.chart .small { font-size: 16px; font-weight: 400; fill: var(--mute); }
.chart .level { stroke: var(--gold-soft); stroke-width: 1.5; stroke-dasharray: 7 7; opacity: .75; }
.chart .ann { animation: fade .6s 1.9s both; }

/* Light sections */
.paper { background: var(--paper); color: var(--ink); }
.about {
  display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(4rem, 9vw, 8rem) var(--gutter) clamp(2rem, 4vw, 3.5rem);
}
.about h2 { font-size: clamp(2.2rem, 4.6vw, 4rem); }
.about-body > p { font-size: 1.2rem; max-width: 36rem; }
.rules { margin: 2rem 0 0; }
.rules div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: .9rem 0; border-top: 1px solid rgb(12 13 38 / .22); }
.rules dt { font-weight: 600; }
.rules dd { margin: 0; color: var(--ink-mute); }

.vip { padding: clamp(3rem, 6vw, 5rem) var(--gutter) clamp(4rem, 8vw, 7rem); }
.vip-head { max-width: 42rem; }
.vip-head p { margin-top: 1rem; font-size: 1.12rem; color: var(--ink-mute); }
/* One line joins the numbered steps in reading direction; gold marks the goal */
.steps { list-style: none; margin: 3rem 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; }
.steps li { position: relative; padding-top: 4.5rem; }
.steps li:not(:last-child)::before { content: ""; position: absolute; top: 1.5rem; inset-inline-start: 0; width: calc(100% + 2.5rem); height: 2px; background: var(--ink); }
.steps .n {
  position: absolute; top: 0; inset-inline-start: 0; z-index: 1;
  display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-size: 1.3rem; font-weight: 600; line-height: 1;
}
.steps li:last-child .n { background: var(--gold); color: var(--ink); }
.steps h3 { margin-bottom: .35rem; }
.steps p { max-width: 19rem; color: var(--ink-mute); font-size: 1rem; text-wrap: pretty; }
.note { margin-top: 1.75rem; max-width: 46rem; font-size: .92rem; color: var(--ink-mute); }

/* Services */
.service {
  display: grid; grid-template-columns: 6fr 5fr; gap: clamp(2rem, 6vw, 6rem); align-items: center;
  padding: clamp(4rem, 8vw, 7rem) var(--gutter);
}
.service-lead { font-size: 1.2rem; color: var(--mute); margin: 1rem 0 1.75rem; max-width: 32rem; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { padding: 1rem 0; border-top: 1px solid rgb(255 255 255 / .16); color: var(--mute); }
.ticks strong { display: block; font-size: 1.15rem; font-weight: 600; color: var(--text); }
.live { background: var(--violet-deep); }
.live .service-lead { color: #dcd9f8; }
.live .btn-ghost { color: var(--text); border-color: var(--text); }
.live .btn-ghost:hover { background: var(--text); color: var(--ink); }
.live-note { color: #dcd9f8; border-inline-start: 3px solid var(--gold); padding-inline-start: 1.25rem; }
.dot { display: inline-block; width: .42em; height: .42em; margin-inline-end: .4em; vertical-align: .15em; border-radius: 50%; background: var(--gold-soft); animation: pulse 2s infinite; }

/* Agenda */
.agenda {
  display: grid; grid-template-columns: 4fr 8fr; gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(4rem, 8vw, 7rem) var(--gutter);
  background: var(--ink);
}
.agenda h2 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); }
.agenda-side > p { margin-top: 1rem; color: var(--mute); }
.glossary { margin: 1.75rem 0 0; }
.glossary div { padding: .85rem 0; border-top: 1px solid rgb(255 255 255 / .16); }
.glossary dt { font-weight: 600; color: var(--gold-soft); }
.glossary dd { margin: 0; color: var(--mute); font-size: .97rem; }
.calendar { min-width: 0; }
.cal-status { padding-inline-start: 1rem; border-inline-start: 3px solid var(--gold); font-size: 1.15rem; font-weight: 500; color: var(--gold-soft); }
.cal-table { width: 100%; margin-top: 1.5rem; border-collapse: collapse; font-size: 1.02rem; }
.cal-table th, .cal-table td { padding: .8rem .75rem; text-align: start; }
.cal-table thead th { font-size: .9rem; font-weight: 500; color: var(--mute); border-bottom: 1px solid rgb(255 255 255 / .3); }
.cal-table td { border-bottom: 1px solid rgb(255 255 255 / .1); }
.cal-day th { padding-top: 1.5rem; font-weight: 600; color: var(--text); }
.cal-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cal-table td[dir="ltr"] { text-align: right; }
.is-past td { color: #9190ae; }
.is-next td { background: rgb(201 162 75 / .14); color: var(--text); font-weight: 600; }
.cal-source { margin-top: 1.25rem; font-size: .88rem; color: var(--mute); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* FAQ */
.faq { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(2rem, 5vw, 4.5rem); padding: clamp(4rem, 8vw, 7rem) var(--gutter); }
details { border-top: 1px solid rgb(12 13 38 / .25); }
details:last-child { border-bottom: 1px solid rgb(12 13 38 / .25); }
summary { padding: 1.1rem 0; font-size: 1.12rem; font-weight: 600; cursor: pointer; }
details p { padding-bottom: 1.2rem; color: var(--ink-mute); max-width: 42rem; }

/* Footer */
.foot { padding: clamp(3.5rem, 7vw, 6rem) var(--gutter) 2rem; background: var(--night); }
.foot-contact { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.risk { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / .16); max-width: 62rem; font-size: .92rem; color: var(--mute); }
.risk h3 { font-size: 1.1rem; color: var(--gold-soft); margin-bottom: .5rem; }
.risk p + p { margin-top: .75rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin-top: 1.25rem; font-size: .92rem; }
.foot-links a { color: var(--gold-soft); }
.copy { margin-top: 2rem; font-size: .85rem; color: var(--mute); }

/* Scroll reveal. main.js adds .reveal, so content stays visible without JS or with reduced motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease-out, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* VIP timeline: the line draws from step to step, then each step appears */
.steps.reveal { opacity: 1; transform: none; }
.steps li { --delay: 0s; }
.steps li:nth-child(2) { --delay: .35s; }
.steps li:nth-child(3) { --delay: .7s; }
.steps li:nth-child(4) { --delay: 1.05s; }
.steps.reveal li::before { transform: scaleX(0); transform-origin: right; transition: transform .45s ease-in-out calc(var(--delay) + .1s); }
.steps.reveal .n { opacity: 0; transform: scale(.6); transition: opacity .35s ease-out var(--delay), transform .35s cubic-bezier(.3,1.4,.5,1) var(--delay); }
.steps.reveal h3, .steps.reveal p { opacity: 0; transform: translateY(8px); transition: opacity .5s ease-out calc(var(--delay) + .1s), transform .5s ease-out calc(var(--delay) + .1s); }
.steps.reveal.in li::before { transform: none; }
.steps.reveal.in .n, .steps.reveal.in h3, .steps.reveal.in p { opacity: 1; transform: none; }

details[open] p { animation: fade .35s ease-out; }

@keyframes rise { from { opacity: 0; transform: translateY(.18em); } }
@keyframes fade { from { opacity: 0; } }
@keyframes candle { from { opacity: 0; transform: scaleY(.2); } }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 1080px) { .top nav { display: none; } .login-link { margin-inline-start: auto; } }

@media (max-width: 860px) {
  .hero { display: flex; flex-direction: column; min-height: 0; }
  .figure { position: relative; inset: auto; height: 118vw; max-height: 760px; margin: 1rem calc(var(--gutter) * -1) 0; }
  .photo { left: 50%; translate: -50% 0; }
  .chart .ann { display: none; }
  .about, .service, .agenda, .faq { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 4.25rem 2rem 0; min-height: 5.5rem; }
  .steps li:last-child { padding-bottom: 0; }
  .steps li:not(:last-child)::before { top: 0; bottom: 0; inset-inline-start: 1.5rem; width: 2px; height: auto; }
  .steps h3 { padding-top: .35rem; }
  .steps.reveal li::before { transform: scaleY(0); transform-origin: top; }
  .cal-table { font-size: .95rem; }
  .cal-table th, .cal-table td { padding-inline: .4rem; }
  .hero { background: radial-gradient(70% 45% at 50% 78%, #2c2e4a 40%, var(--night)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
