/* ============================================================
   ShareMatch v2 — motion homepage
   Brand: emerald #074E2C · gold #C9A24D · deep #021A1A
   ============================================================ */

:root {
  --emerald: #074E2C;
  --emerald-bright: #0B7A45;
  --gold: #C9A24D;
  --gold-bright: #E6C172;
  --deep: #021A1A;
  --deep-2: #02110F;
  --ink: #041512;
  --paper: #F5F3EC;
  --mist: rgba(245, 243, 236, 0.62);
  --line: rgba(201, 162, 77, 0.22);
  --glass: rgba(7, 78, 44, 0.18);
  --maxw: 1280px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Clash Display", "Poppins", system-ui, sans-serif;
  --font-body: "General Sans", "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  background: var(--deep-2);
  color: var(--paper);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--gold); color: var(--ink); }

/* grain + vignette overlay */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
}

/* ---------- Preloader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--deep-2);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 24px;
}
#loader .ld-mark { width: 220px; max-width: 60vw; opacity: 0; transform: translateY(12px); }
#loader .ld-bar { width: 220px; max-width: 60vw; height: 2px; background: rgba(245,243,236,.12); overflow: hidden; border-radius: 2px; }
#loader .ld-bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--emerald-bright), var(--gold)); }
#loader.done { opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility .8s; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 64px);
  transition: background .5s var(--ease), padding .5s var(--ease), backdrop-filter .5s;
}
.nav.scrolled {
  background: rgba(2, 17, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.nav__logo img { height: 34px; }
.nav__links { display: flex; gap: 30px; align-items: center; }
.nav__links a { font-size: 14px; letter-spacing: .02em; color: var(--mist); transition: color .3s; }
.nav__links a:hover { color: var(--paper); }
.nav__cta {
  padding: 11px 22px; border-radius: 100px;
  background: var(--gold); color: var(--ink); font-weight: 600; font-size: 14px;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.nav__cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(201,162,77,.35); }
.nav__burger { display: none; }
@media (max-width: 900px) {
  .nav__links { display: none; }
}

/* ---------- Utility ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
.eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--gold); opacity: .7; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.02; letter-spacing: -0.01em; }
.h-display { font-size: clamp(2.6rem, 7vw, 6.4rem); }
.h-section { font-size: clamp(2rem, 4.6vw, 4rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: var(--mist); max-width: 56ch; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 100px; font-weight: 600; font-size: 15px;
  transition: transform .35s var(--ease), box-shadow .35s, background .35s;
}
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(201,162,77,.3); }
.btn--ghost { border: 1px solid var(--line); color: var(--paper); }
.btn--ghost:hover { border-color: var(--gold); transform: translateY(-3px); }
.btn svg { width: 16px; height: 16px; }

/* reveal helpers */
.reveal { opacity: 0; transform: translateY(34px); }
.reveal-line { display: block; overflow: hidden; }
.reveal-line > * { display: block; transform: translateY(110%); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(2,17,15,.55) 0%, rgba(2,17,15,.2) 35%, rgba(2,17,15,.6) 75%, var(--deep-2) 100%),
    radial-gradient(120% 90% at 15% 30%, rgba(7,78,44,.45), transparent 60%);
}
.hero__inner { position: relative; z-index: 3; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px,4vw,64px); }
.hero h1 { margin: 22px 0 26px; max-width: 16ch; }
.hero h1 .gold { color: var(--gold); font-style: italic; }
.hero__sub { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 30px; }

/* floating glass index cards */
.hero__cards { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.idx-card {
  position: absolute; pointer-events: auto;
  width: 220px; padding: 18px 20px; border-radius: 18px;
  background: rgba(4,21,18,.55); backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.idx-card .ic-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--mist); }
.idx-card .ic-val { font-family: var(--font-display); font-size: 1.9rem; margin-top: 6px; }
.idx-card .ic-delta { font-size: 13px; font-weight: 600; margin-top: 2px; }
.up { color: #4ade80; } .down { color: #f87171; }
.idx-card.c1 { top: 17%; right: 5%; }
.idx-card.c3 { top: 43%; right: 12%; width: 188px; }
.idx-card.c2 { bottom: 13%; right: 5%; width: 204px; }
@media (max-width: 1320px) { .idx-card.c3 { display: none; } }
@media (max-width: 1080px) { .hero__cards { display: none; } }

.scrollcue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .2em; color: var(--mist); text-transform: uppercase; }
.scrollcue .dot { width: 1px; height: 46px; background: linear-gradient(var(--gold), transparent); }

/* ============================================================
   TICKER MARQUEE
   ============================================================ */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink); padding: 18px 0; overflow: hidden; }
.ticker__track { display: flex; gap: 56px; white-space: nowrap; width: max-content; will-change: transform; }
.ticker__item { display: inline-flex; align-items: baseline; gap: 12px; font-family: var(--font-display); font-size: 1.15rem; }
.ticker__item .t-name { color: var(--paper); }
.ticker__item .t-d { font-family: var(--font-body); font-size: .85rem; font-weight: 600; }
.ticker__item .star { color: var(--gold); margin-right: 8px; }

/* ============================================================
   SECTION shell
   ============================================================ */
.section { position: relative; padding: clamp(90px, 13vh, 170px) 0; }
.section--dark { background: var(--deep-2); }
.section--emerald { background: linear-gradient(180deg, var(--deep-2), var(--ink) 50%, var(--deep-2)); }
.sec-head { max-width: 60ch; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head h2 { margin: 18px 0 20px; }

/* ============================================================
   WHAT IS — pinned film
   ============================================================ */
.whatis { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 84px); align-items: center; }
@media (max-width: 980px) { .whatis { grid-template-columns: 1fr; } }
.whatis__copy ul { list-style: none; margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.whatis__copy li { position: relative; padding-left: 30px; color: var(--mist); font-size: 1.02rem; }
.whatis__copy li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(201,162,77,.15); }
.whatis__copy li b { color: var(--paper); font-weight: 600; }

.filmframe {
  position: relative; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px rgba(0,0,0,.5);
  transform: perspective(1400px) rotateY(-9deg) rotateX(3deg);
  transition: transform .8s var(--ease);
}
.filmframe:hover { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg); }
.filmframe video { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.filmframe__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(2,17,15,.25); transition: opacity .4s;
}
.filmframe__play button {
  width: 84px; height: 84px; border-radius: 50%; background: var(--gold); color: var(--ink);
  display: grid; place-items: center; box-shadow: 0 14px 40px rgba(201,162,77,.4);
  transition: transform .3s var(--ease);
}
.filmframe__play button:hover { transform: scale(1.08); }
.filmframe.playing .filmframe__play { opacity: 0; pointer-events: none; }
.filmframe__badge { position: absolute; top: 16px; left: 16px; z-index: 2; padding: 7px 14px; border-radius: 100px; background: rgba(2,17,15,.7); border: 1px solid var(--line); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }

/* ============================================================
   SPORT REEL — horizontal pinned
   ============================================================ */
.reel { position: relative; height: 100svh; overflow: hidden; background: #000; }
.reel__track { display: flex; height: 100%; will-change: transform; }
.reel__panel { position: relative; flex: 0 0 100vw; height: 100%; overflow: hidden; }
.reel__panel video, .reel__panel .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel__panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.1) 50%, rgba(0,0,0,.4)); }
.reel__cap { position: absolute; z-index: 3; bottom: clamp(48px,10vh,120px); left: clamp(24px,5vw,90px); }
.reel__cap .num { font-family: var(--font-display); font-size: 1rem; color: var(--gold); letter-spacing: .2em; }
.reel__cap h3 { font-size: clamp(2.6rem, 8vw, 7rem); line-height: .9; margin: 8px 0; }
.reel__cap p { color: var(--mist); max-width: 40ch; }
.reel__progress { position: absolute; z-index: 4; bottom: 40px; right: clamp(24px,5vw,90px); display: flex; gap: 8px; }
.reel__progress span { width: 34px; height: 3px; background: rgba(245,243,236,.2); border-radius: 3px; overflow: hidden; }
.reel__progress span i { display: block; height: 100%; width: 0; background: var(--gold); }

/* ============================================================
   PLATFORM — phone + screens
   ============================================================ */
.platform { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px,6vw,80px); align-items: center; }
@media (max-width: 980px) { .platform { grid-template-columns: 1fr; } }
.phone {
  position: relative; width: 290px; margin: 0 auto; border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #0b2b22, #02110f); border: 1px solid var(--line);
  box-shadow: 0 50px 110px rgba(0,0,0,.6);
}
.phone__screen { border-radius: 32px; overflow: hidden; aspect-ratio: 450/800; background: #000; }
.phone__screen video { width: 100%; height: 100%; object-fit: cover; }
.phone__notch { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 110px; height: 26px; background: #02110f; border-radius: 0 0 16px 16px; z-index: 2; }
.platform__feats { display: flex; flex-direction: column; gap: 22px; margin-top: 30px; }
.feat { display: flex; gap: 16px; align-items: flex-start; }
.feat__ic { flex: 0 0 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); color: var(--gold); }
.feat h4 { font-family: var(--font-display); font-size: 1.15rem; }
.feat p { color: var(--mist); font-size: .98rem; }

/* ============================================================
   STEPS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; padding: 30px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(7,78,44,.16), rgba(2,17,15,.4));
  border: 1px solid var(--line); overflow: hidden;
}
.step__num { font-family: var(--font-display); font-size: 3.4rem; color: rgba(201,162,77,.25); line-height: 1; }
.step h3 { font-size: 1.4rem; margin: 8px 0 10px; }
.step p { color: var(--mist); font-size: .98rem; }
.step::before { content: ""; position: absolute; top: 0; left: 0; width: 0; height: 3px; background: var(--gold); transition: width .6s var(--ease); }
.step:hover::before { width: 100%; }

/* ============================================================
   EDGE cards
   ============================================================ */
.edge { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .edge { grid-template-columns: 1fr; } }
.ecard {
  padding: 32px; border-radius: 20px; border: 1px solid var(--line);
  background: rgba(4,21,18,.5); transition: transform .5s var(--ease), border-color .5s, background .5s;
  transform-style: preserve-3d;
}
.ecard:hover { transform: translateY(-8px); border-color: var(--gold); background: rgba(7,78,44,.22); }
.ecard__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); color: var(--gold); margin-bottom: 22px; }
.ecard h3 { font-size: 1.45rem; margin-bottom: 12px; }
.ecard p { color: var(--mist); font-size: .98rem; }

/* ============================================================
   FATWA quote
   ============================================================ */
.quote { position: relative; overflow: hidden; }
.quote__bg { position: absolute; inset: 0; z-index: 0; }
.quote__bg video { width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.quote__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(2,17,15,.5), var(--deep-2) 75%); }
.quote__inner { position: relative; z-index: 2; max-width: 60ch; margin: 0 auto; text-align: center; }
.quote blockquote { font-family: var(--font-display); font-size: clamp(1.5rem, 3.2vw, 2.7rem); line-height: 1.25; font-weight: 500; }
.quote blockquote .gold { color: var(--gold); }
.quote .attr { margin-top: 28px; color: var(--mist); letter-spacing: .1em; text-transform: uppercase; font-size: 13px; }

/* ============================================================
   VIDEO GALLERY
   ============================================================ */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }
.gcard { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16/10; border: 1px solid var(--line); cursor: pointer; }
.gcard video, .gcard img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gcard:hover video, .gcard:hover img { transform: scale(1.06); }
.gcard__lab { position: absolute; left: 14px; bottom: 12px; z-index: 2; font-family: var(--font-display); font-size: 1.05rem; }
.gcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.6), transparent 60%); }

/* lightbox */
#lightbox { position: fixed; inset: 0; z-index: 9000; background: rgba(2,17,15,.94); display: none; align-items: center; justify-content: center; padding: 4vw; }
#lightbox.open { display: flex; }
#lightbox video { max-width: 92vw; max-height: 86vh; border-radius: 14px; }
#lightbox .lb-close { position: absolute; top: 24px; right: 28px; font-size: 30px; color: var(--paper); }

/* ============================================================
   CTA / FOOTER
   ============================================================ */
.cta { position: relative; text-align: center; }
.cta h2 { max-width: 18ch; margin: 18px auto 18px; }
.cta .lead { margin: 0 auto 36px; }
.cta__form { display: flex; gap: 12px; max-width: 520px; margin: 0 auto; flex-wrap: wrap; }
.cta__form input { flex: 1; min-width: 200px; padding: 16px 20px; border-radius: 100px; background: rgba(4,21,18,.6); border: 1px solid var(--line); color: var(--paper); font-family: inherit; font-size: 15px; }
.cta__form input:focus { outline: none; border-color: var(--gold); }
.cta__note { margin-top: 18px; font-size: 12.5px; color: var(--mist); }

footer { border-top: 1px solid var(--line); padding: 54px 0 40px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot img { height: 30px; }
.foot__links { display: flex; gap: 24px; font-size: 14px; color: var(--mist); flex-wrap: wrap; }
.foot__links a:hover { color: var(--gold); }
.foot__legal { width: 100%; margin-top: 28px; font-size: 12px; color: rgba(245,243,236,.4); max-width: 80ch; }

.preview-flag {
  position: fixed; bottom: 16px; left: 16px; z-index: 9500;
  background: var(--gold); color: var(--ink); font-weight: 700; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; padding: 7px 13px; border-radius: 100px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .reveal-line > * { transform: none; }
}
