/* === NEXREPS — Apple-like additions === */
/* Adds: Lenis smooth scroll support, sticky iPhone showcase, depth-tier MacBook scene.
   Append after styles.css (loads after = wins specificity).
   © 2026 Abderrahim El Otmani — Confidential. */

/* === Lenis smooth scroll === */
html.lenis,html.lenis body{height:auto}
.lenis.lenis-smooth{scroll-behavior:auto!important}
.lenis.lenis-smooth [data-lenis-prevent]{overscroll-behavior:contain}
.lenis.lenis-stopped{overflow:clip}

/* === STICKY iPHONE SHOWCASE === */
/* Replaces the 3 separate showcase-blocks with one tall section
   that pins the iPhone and crossfades both text + iPhone screen at scroll progress. */

.sticky-showcase{
  position:relative;
  background:var(--bg-alt);
  /* 3 substations × ~95vh — long enough to feel deliberate, short enough to not bore */
  height:285vh;
}

/* Section opener (sits before the sticky pin, gives context) */
.sticky-showcase-intro{
  height:90vh;
  display:flex;align-items:center;justify-content:center;text-align:center;
  padding:0 24px;
}
.sticky-showcase-intro .eyebrow{margin-bottom:18px}
.sticky-showcase-intro h2{
  font-family:var(--font-display);font-weight:600;
  font-size:clamp(40px,6vw,72px);letter-spacing:-0.04em;line-height:1.05;
  max-width:18ch;
}

/* The sticky stage */
.sticky-stage{
  position:sticky;top:0;
  height:100vh;
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
  gap:80px;
  max-width:var(--container);
  margin:0 auto;
  padding:0 48px;
  overflow:hidden;
}

/* TEXT COLUMN — left */
.sticky-text-col{
  position:relative;
  height:60vh;
  max-width:520px;
}
.sticky-text{
  position:absolute;inset:0;
  display:flex;flex-direction:column;justify-content:center;
  opacity:0;
  transform:translateY(20px);
  transition:opacity .55s var(--ease-out),transform .55s var(--ease-out);
  pointer-events:none;
}
.sticky-text.active{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
.sticky-text .eyebrow{margin-bottom:20px}
.sticky-text h3{
  font-family:var(--font-display);
  font-size:clamp(32px,4vw,52px);
  font-weight:600;letter-spacing:-0.035em;line-height:1.05;
  margin-bottom:20px;
}
.sticky-text p{
  font-size:clamp(16px,1.4vw,19px);
  line-height:1.55;
  color:var(--text-2);
  margin-bottom:24px;
}
.sticky-text .sc-list{margin-top:12px}

/* PHONE COLUMN — right (or left if rev) */
.sticky-phone-col{
  position:relative;
  display:flex;
  justify-content:center;align-items:center;
  height:80vh;
  perspective:1600px;
}

/* Smaller, controlled iPhone clone (different from hero iPhone) */
.sx-iphone{
  position:relative;
  width:320px;height:660px;
  background:linear-gradient(145deg,#1d1d1f 0%,#0a0a0a 50%,#1d1d1f 100%);
  border-radius:54px;
  padding:8px;
  box-shadow:
    0 0 0 2px #2a2a2c,
    0 0 0 3px #0a0a0a,
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 60px 120px -30px rgba(0,0,0,0.5),
    0 30px 80px -20px rgba(124,92,196,0.3);
  transform-style:preserve-3d;
  will-change:transform;
}
html[data-theme="dark"] .sx-iphone,
html[data-variation="spotlight"]:not([data-theme="light"]) .sx-iphone{
  box-shadow:
    0 0 0 2px #2a2a2c,
    0 0 0 3px #0a0a0a,
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 60px 120px -30px rgba(0,0,0,0.7),
    0 30px 80px -20px rgba(124,92,196,0.35);
}

.sx-iphone-screen{
  position:absolute;inset:8px;
  border-radius:46px;
  overflow:hidden;
  background:#000;
}
.sx-iphone-notch{
  position:absolute;top:8px;left:50%;transform:translateX(-50%);
  width:96px;height:30px;border-radius:18px;
  background:#000;z-index:20;
  display:flex;align-items:center;justify-content:flex-end;padding-right:14px;
}
.sx-iphone-notch::before{
  content:'';width:9px;height:9px;border-radius:50%;
  background:radial-gradient(circle at 30% 30%,#1a1a2a,#000);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.06);
}

/* SCREEN LAYERS inside the sx-iphone */
.sx-screen{
  position:absolute;inset:0;
  opacity:0;
  transition:opacity .5s var(--ease-out),transform .6s var(--ease-out);
  transform:scale(1.02);
  padding:42px 14px 14px;
  overflow:hidden;
}
.sx-screen.active{
  opacity:1;
  transform:scale(1);
}

/* Status bar */
.sx-status{
  position:absolute;top:12px;left:0;right:0;
  display:flex;justify-content:space-between;align-items:center;
  padding:0 24px;
  font-size:11px;font-weight:600;color:#fff;
  z-index:15;
}
.sx-status .ip-icons{display:flex;gap:5px;align-items:center}
.sx-status .ip-icons span{display:block;background:#fff;border-radius:1px}
.sx-sig{width:14px;height:8px;clip-path:polygon(0 60%,25% 60%,25% 40%,50% 40%,50% 20%,75% 20%,75% 0%,100% 0%,100% 100%,0 100%)}
.sx-wifi{width:11px;height:8px;clip-path:polygon(0 50%,50% 0,100% 50%,85% 65%,50% 30%,15% 65%)}
.sx-bat{width:18px;height:8px;border-radius:2px;position:relative}
.sx-bat::after{content:'';position:absolute;right:-2px;top:2px;width:1.5px;height:4px;background:#fff;border-radius:1px}

/* ====== SCREEN 1 — Group Dashboard (Dark/Premium) ====== */
.sx-screen-dashboard{
  background:
    radial-gradient(ellipse at top right,rgba(124,92,196,0.25),transparent 60%),
    linear-gradient(180deg,#000 0%,#0a0a0f 100%);
  color:#fff;
}
.sx-greet{font-size:13px;color:rgba(255,255,255,0.55);margin-top:4px}
.sx-name{font-family:var(--font-display);font-size:30px;font-weight:700;letter-spacing:-0.025em;line-height:1;margin-top:2px}
.sx-meta{font-size:11px;color:rgba(255,255,255,0.5);margin-top:8px}
.sx-pills{display:flex;gap:7px;margin:14px 0}
.sx-pill{
  font-size:11px;font-weight:500;
  padding:7px 14px;border-radius:99px;
  background:rgba(255,255,255,0.06);
  color:rgba(255,255,255,0.6);
}
.sx-pill.on{background:#7c5cc4;color:#fff}
.sx-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
.sx-stat{
  background:rgba(124,92,196,0.06);
  border:1px solid rgba(124,92,196,0.12);
  border-radius:14px;
  padding:10px 12px;
  backdrop-filter:blur(10px);
}
.sx-stat-l{
  display:flex;align-items:center;gap:5px;
  font-size:9px;font-weight:500;
  letter-spacing:0.1em;text-transform:uppercase;
  color:rgba(255,255,255,0.5);
  margin-bottom:6px;
}
.sx-stat-v{
  font-family:var(--font-display);
  font-size:18px;font-weight:700;
  letter-spacing:-0.02em;
  font-variant-numeric:tabular-nums;
}
.sx-stat-c{
  font-size:10px;font-weight:500;
  color:#30d158;margin-top:3px;
}
.sx-chart-card{
  background:rgba(124,92,196,0.06);
  border:1px solid rgba(124,92,196,0.12);
  border-radius:14px;
  padding:11px;
  height:110px;
  position:relative;
}
.sx-chart-t{font-size:12px;font-weight:600;margin-bottom:2px}
.sx-chart-s{font-size:10px;color:rgba(255,255,255,0.45)}
.sx-chart-svg{position:absolute;bottom:8px;left:10px;right:10px;height:60px}

.sx-performers{
  margin-top:10px;
  background:rgba(124,92,196,0.06);
  border:1px solid rgba(124,92,196,0.12);
  border-radius:14px;
  padding:11px;
}
.sx-performers-t{font-size:11px;font-weight:600;margin-bottom:8px}
.sx-perf-row{display:flex;align-items:center;gap:8px;padding:4px 0;font-size:11px}
.sx-perf-num{
  width:16px;height:16px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:9px;font-weight:700;
  background:rgba(124,92,196,0.15);
}
.sx-perf-num.gold{background:rgba(251,191,36,0.2);color:#fbbf24}
.sx-perf-name{flex:1}
.sx-perf-val{font-family:var(--font-mono);font-size:10px;color:rgba(255,255,255,0.8)}

/* ====== SCREEN 2 — Forecast (Premium) ====== */
.sx-screen-forecast{
  background:
    radial-gradient(ellipse at top right,rgba(124,92,196,0.4),transparent 60%),
    linear-gradient(180deg,#0a0014 0%,#1a0f2a 50%,#0a0014 100%);
  color:#fff;
}
.sx-back{
  display:flex;align-items:center;justify-content:space-between;
  margin-top:8px;margin-bottom:18px;
}
.sx-back-arr{font-size:18px;color:#fff;width:18px}
.sx-venue{
  font-size:18px;font-weight:700;letter-spacing:-0.01em;
  display:flex;align-items:center;gap:4px;
  font-family:var(--font-display);
}
.sx-venue-drop{
  width:16px;height:16px;border-radius:50%;
  background:rgba(124,92,196,0.2);
  display:flex;align-items:center;justify-content:center;
  font-size:9px;color:#7c5cc4;
}
.sx-tabs{
  display:flex;gap:22px;margin-bottom:16px;
  border-bottom:1px solid rgba(124,92,196,0.1);
  padding-bottom:10px;
}
.sx-tab{font-size:13px;font-weight:500;color:rgba(255,255,255,0.5)}
.sx-tab.on{color:#7c5cc4;position:relative}
.sx-tab.on::after{
  content:'';position:absolute;
  bottom:-11px;left:0;right:0;height:2px;background:#7c5cc4;border-radius:2px;
}
.sx-weather{
  background:rgba(124,92,196,0.08);
  border:1px solid rgba(124,92,196,0.15);
  border-radius:14px;
  padding:11px 13px;
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:12px;
}
.sx-temp{display:flex;align-items:baseline;gap:6px}
.sx-temp-v{font-family:var(--font-display);font-size:24px;font-weight:700;letter-spacing:-0.02em}
.sx-temp-c{font-size:12px;color:rgba(255,255,255,0.55)}
.sx-warn-badge{
  font-size:10px;font-weight:600;
  padding:5px 10px;border-radius:99px;
  background:rgba(234,88,12,0.15);
  color:#fb923c;
  border:1px solid rgba(234,88,12,0.2);
}
.sx-fc-stat{
  background:rgba(124,92,196,0.06);
  border:1px solid rgba(124,92,196,0.12);
  border-radius:14px;
  padding:12px 10px;
  text-align:center;
}
.sx-fc-stat .sx-stat-l{justify-content:center;letter-spacing:0.12em}
.sx-fc-stat .sx-stat-v{font-size:18px}
.sx-fc-range{font-size:10px;color:rgba(255,255,255,0.4);margin-top:3px;font-family:var(--font-mono)}

.sx-ai{
  display:flex;align-items:center;gap:8px;
  margin:12px 0 8px;
}
.sx-ai-l{font-size:12px;color:rgba(255,255,255,0.55)}
.sx-ai-badge{
  font-size:10px;font-weight:600;
  padding:4px 10px;border-radius:99px;
  background:rgba(239,68,68,0.15);
  color:#f87171;
}
.sx-insights{
  background:rgba(124,92,196,0.06);
  border:1px solid rgba(124,92,196,0.12);
  border-radius:12px;
  padding:11px;
  font-size:11px;line-height:1.55;
  color:rgba(255,255,255,0.75);
}
.sx-insights p{margin-bottom:7px}
.sx-insights p:last-child{margin-bottom:0}

/* ====== SCREEN 3 — Inventory/Menu prices ====== */
.sx-screen-inventory{
  background:
    radial-gradient(ellipse at top right,rgba(124,92,196,0.2),transparent 60%),
    linear-gradient(180deg,#000 0%,#0a0a0f 100%);
  color:#fff;
}
.sx-inv-h{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:14px;
}
.sx-inv-title{font-family:var(--font-display);font-size:22px;font-weight:700;letter-spacing:-0.02em}
.sx-inv-search{
  width:28px;height:28px;border-radius:50%;
  background:rgba(255,255,255,0.06);
  display:flex;align-items:center;justify-content:center;
  font-size:14px;
}
.sx-inv-tabs{
  display:flex;gap:6px;margin-bottom:14px;
}
.sx-inv-tab{
  font-size:11px;font-weight:500;
  padding:7px 12px;border-radius:99px;
  background:rgba(255,255,255,0.05);
  color:rgba(255,255,255,0.55);
}
.sx-inv-tab.on{background:rgba(124,92,196,0.18);color:#7c5cc4}
.sx-inv-row{
  display:flex;align-items:center;gap:10px;
  padding:11px 12px;
  background:rgba(124,92,196,0.06);
  border:1px solid rgba(124,92,196,0.1);
  border-radius:12px;
  margin-bottom:7px;
}
.sx-inv-name{flex:1;font-size:12px;font-weight:500}
.sx-inv-price{font-family:var(--font-mono);font-size:11px;color:rgba(255,255,255,0.65)}
.sx-inv-change{
  font-size:10px;font-weight:600;
  padding:3px 8px;border-radius:99px;
  background:rgba(48,209,88,0.12);color:#30d158;
}
.sx-inv-change.up{background:rgba(255,159,10,0.12);color:#ff9f0a}
.sx-inv-change.stable{background:rgba(255,255,255,0.05);color:rgba(255,255,255,0.5)}

/* === DEPTH TIER — MacBook scene === */
.depth-tier{
  background:var(--bg-dark);
  color:var(--text-on-dark);
  padding:160px 24px;
  position:relative;
  overflow:hidden;
}
.depth-tier::before{
  content:'';position:absolute;top:50%;left:50%;
  width:1200px;height:800px;
  transform:translate(-50%,-50%);
  background:radial-gradient(closest-side,color-mix(in oklab,var(--accent) 25%,transparent),transparent);
  filter:blur(100px);opacity:0.4;pointer-events:none;
}
.depth-inner{
  max-width:1200px;margin:0 auto;position:relative;z-index:1;
}
.depth-text{
  text-align:center;
  max-width:760px;
  margin:0 auto 80px;
}
.depth-text .eyebrow{color:var(--accent);margin-bottom:18px}
.depth-text h2{
  font-family:var(--font-display);
  font-size:clamp(44px,6.5vw,80px);
  font-weight:600;
  letter-spacing:-0.04em;
  line-height:1;
  margin-bottom:24px;
}
html[data-variation="editorial"] .depth-text h2{font-weight:400}
.depth-text h2 em{font-style:italic;font-weight:400;color:var(--accent)}
.depth-text p{
  font-size:clamp(16px,1.5vw,20px);
  color:var(--text-on-dark-2);
  line-height:1.55;
  max-width:560px;margin:0 auto;
}

/* MacBook frame */
.macbook-wrap{
  perspective:2400px;
  margin:0 auto;
  max-width:1100px;
  opacity:0;
  transform:translateY(60px);
  transition:opacity 1.1s var(--ease-out),transform 1.1s var(--ease-out);
}
.macbook-wrap.in{opacity:1;transform:translateY(0)}
.macbook{
  position:relative;
  transform-style:preserve-3d;
  transform:rotateX(6deg);
  will-change:transform;
}
.macbook-screen{
  background:#000;
  border-radius:16px 16px 4px 4px;
  padding:20px;
  position:relative;
  box-shadow:
    0 0 0 1px rgba(124,92,196,0.12),
    0 30px 80px -20px rgba(124,92,196,0.35),
    0 80px 160px -40px rgba(0,0,0,0.7);
}
.macbook-screen::before{
  content:'';position:absolute;
  top:9px;left:50%;transform:translateX(-50%);
  width:5px;height:5px;background:#222;border-radius:50%;
}
.macbook-display{
  aspect-ratio:16/10;
  background:
    radial-gradient(ellipse at top right,rgba(124,92,196,0.2),transparent 60%),
    linear-gradient(180deg,#000 0%,#0a0a0f 50%,#000 100%);
  border-radius:6px;
  overflow:hidden;
  display:grid;
  grid-template-columns:180px 1fr;
  color:#fff;
}
.macbook-base{
  height:14px;
  background:linear-gradient(180deg,#2a2a2a 0%,#1a1a1a 100%);
  border-radius:0 0 18px 18px;
  position:relative;
  margin:0 -6px;
  box-shadow:0 2px 0 rgba(255,255,255,0.05) inset;
}
.macbook-base::before{
  content:'';position:absolute;
  bottom:0;left:50%;transform:translateX(-50%);
  width:110px;height:5px;background:#0a0a0a;
  border-radius:0 0 8px 8px;
}

/* Desktop screen content */
.mac-sidebar{
  background:rgba(0,0,0,0.4);
  border-right:1px solid rgba(124,92,196,0.1);
  padding:16px 14px;
}
.mac-logo{
  font-family:var(--font-display);
  font-weight:700;font-size:14px;
  letter-spacing:-0.01em;margin-bottom:20px;
}
.mac-nav-group{margin-top:14px}
.mac-nav-label{
  font-size:9px;font-weight:500;
  color:rgba(255,255,255,0.35);
  letter-spacing:0.15em;text-transform:uppercase;
  margin-bottom:6px;padding:0 6px;
}
.mac-nav-item{
  font-size:11px;color:rgba(255,255,255,0.65);
  padding:6px 8px;border-radius:6px;margin-bottom:2px;
}
.mac-nav-item.on{background:rgba(124,92,196,0.1);color:#fff}

.mac-content{padding:16px 18px;overflow:hidden}
.mac-header h1{
  font-family:var(--font-display);
  font-weight:700;font-size:18px;
  letter-spacing:-0.015em;margin-bottom:4px;
}
.mac-header p{font-size:11px;color:rgba(255,255,255,0.45);margin-bottom:14px}

.mac-stats{
  display:grid;grid-template-columns:repeat(4,1fr);
  gap:8px;margin-bottom:12px;
}
.mac-stat{
  background:rgba(124,92,196,0.06);
  border:1px solid rgba(124,92,196,0.1);
  border-radius:10px;padding:10px 11px;
}
.mac-stat-l{
  font-size:9px;font-weight:500;
  letter-spacing:0.12em;text-transform:uppercase;
  color:rgba(255,255,255,0.5);margin-bottom:5px;
}
.mac-stat-v{
  font-family:var(--font-display);
  font-size:17px;font-weight:700;
  letter-spacing:-0.018em;
  font-variant-numeric:tabular-nums;
}
.mac-stat-c{font-size:9px;color:#f87171;margin-top:2px}
.mac-stat-c.up{color:#30d158}

.mac-row-2{display:grid;grid-template-columns:2fr 1fr;gap:10px;margin-bottom:12px}
.mac-card{
  background:rgba(124,92,196,0.06);
  border:1px solid rgba(124,92,196,0.1);
  border-radius:10px;padding:11px;
}
.mac-card-t{font-size:11px;font-weight:600;margin-bottom:2px}
.mac-card-s{font-size:9px;color:rgba(255,255,255,0.45);margin-bottom:6px}

.mac-perf{display:flex;align-items:center;justify-content:space-between;padding:4px 0;font-size:11px}
.mac-perf-l{display:flex;align-items:center;gap:7px}
.mac-perf-num{
  width:14px;height:14px;border-radius:50%;
  background:rgba(124,92,196,0.15);
  display:flex;align-items:center;justify-content:center;
  font-size:9px;font-weight:700;
}
.mac-perf-num.gold{background:rgba(251,191,36,0.2);color:#fbbf24}
.mac-perf-v{display:flex;gap:7px;align-items:center}
.mac-perf-c{font-size:9px;color:#f87171}
.mac-perf-c.up{color:#30d158}

.mac-table-tabs{display:flex;gap:7px;margin-bottom:7px}
.mac-table-tab{
  font-size:10px;padding:3px 9px;border-radius:99px;
  background:rgba(255,255,255,0.04);color:rgba(255,255,255,0.55);
}
.mac-table-tab.on{background:rgba(255,255,255,0.1);color:#fff}
.mac-table-tab span{font-family:var(--font-mono);margin-left:4px;opacity:0.65}

.mac-table-row{
  display:grid;
  grid-template-columns:1fr 0.5fr 0.8fr 0.8fr 0.4fr 0.7fr 0.6fr;
  gap:8px;padding:4px 0;
  font-size:10px;
  border-top:1px solid rgba(124,92,196,0.06);
  align-items:center;
}
.mac-table-row.h{
  font-size:8px;letter-spacing:0.1em;text-transform:uppercase;
  color:rgba(255,255,255,0.35);border-top:none;margin-top:6px;
}
.mac-live{color:#30d158;display:flex;align-items:center;gap:3px;font-size:9px}
.mac-live::before{content:'●';font-size:7px}

/* === Responsive === */
@media(max-width:980px){
  .sticky-stage{
    grid-template-columns:1fr;
    grid-template-rows:auto 1fr;
    gap:0;
    padding:0 24px;
  }
  .sticky-text-col{
    height:auto;
    padding-top:20vh;
    order:0;
  }
  .sticky-phone-col{
    height:50vh;
    order:1;
  }
  .sx-iphone{transform:scale(0.65);transform-origin:center top}
  .sticky-showcase{height:auto;min-height:285vh}
  .depth-tier{padding:120px 16px}
}

@media(max-width:640px){
  .sticky-showcase{height:auto;min-height:300vh}
  .sx-iphone{transform:scale(0.5)}
  .sticky-text h3{font-size:28px}
  .sticky-text p{font-size:15px}
  .macbook-screen{padding:14px}
  .mac-sidebar{display:none}
  .macbook-display{grid-template-columns:1fr}
  .mac-content > .mac-card{display:none}
  .mac-row-2{display:block}
  .mac-row-2 > .mac-card:first-child{display:none}
  .mac-content{padding:10px 12px}
  .mac-header h1{font-size:14px;margin-bottom:2px}
  .mac-header p{font-size:9px;margin-bottom:8px}
  .mac-stats{grid-template-columns:repeat(2,1fr);gap:6px;margin-bottom:8px}
  .mac-stat{padding:6px 8px;border-radius:8px}
  .mac-stat-l{font-size:8px;margin-bottom:3px}
  .mac-stat-v{font-size:13px}
  .mac-stat-c{font-size:8px;margin-top:1px}
  .mac-card{padding:8px}
  .mac-card-t{font-size:10px}
  .mac-card-s{font-size:8px;margin-bottom:4px}
  .mac-perf{font-size:9px;padding:2px 0}
  .mac-perf-num{width:12px;height:12px;font-size:8px}
}
