:root {
  --blue: #00A0E5;
  --blue-deep: #0086c3;     /* text on white cards, still blue */
  --navy: #1a4a5e;          /* dock only, never inside the blue panel */
  --white: #ffffff;
  --desk: #e6ebee;
  --dock-pill: #eef3f6;
  --line: rgba(255, 255, 255, .38);
  --soft: rgba(255, 255, 255, .72);
  --shadow-blue: rgba(0, 70, 120, .38);

  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --text-head: clamp(28px, 8.2vw, 34px);
  --pad-x: 28px;
  --dock-h: 92px;
  --curve: 96px;
  --parallax: 120px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --slide-ms: 650ms;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--desk);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  display: grid;
  place-items: center;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
ol, ul { list-style: none; }
.i { width: 1em; height: 1em; flex: none; }
.i--ne { transform: rotate(-45deg); }

/* ── DEVICE ─────────────────────────────── */
.device {
  position: relative;
  width: 100vw;
  height: 100svh;
  background: var(--white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 560px) {
  .device {
    width: 400px;
    height: min(860px, calc(100svh - 48px));
    border-radius: 48px;
    box-shadow:
      0 40px 80px -30px rgba(26, 74, 94, .35),
      0 12px 24px -12px rgba(26, 74, 94, .18),
      0 0 0 1px rgba(26, 74, 94, .05);
  }
}

/* ── PANEL: the blue part, the only thing that slides ── */
.panel {
  position: relative;
  flex: 1;
  min-height: 0;
  background:
    radial-gradient(90% 55% at 100% 0%, rgba(255, 255, 255, .26), transparent 62%),
    radial-gradient(80% 50% at 0% 100%, rgba(0, 110, 175, .45), transparent 70%),
    var(--blue);
  border-radius: 0 0 0 var(--curve);
  overflow: hidden;
  overflow: clip; /* blocks anchor jumps and focus from scrolling the panel */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  isolation: isolate;
}
/* film grain over everything blue */
.panel::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .14; mix-blend-mode: overlay;
}

/* orbit rings, turn a step on every menu change */
.orbit {
  position: absolute; z-index: 0; pointer-events: none;
  top: -130px; right: -150px; width: 380px; height: 380px;
  transform: rotate(calc(var(--i, 0) * 62deg));
  transition: transform 1.1s var(--ease);
}
.orbit i { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .22); }
.orbit i:first-child { inset: 0; }
.orbit i:nth-child(2) { inset: 70px; border-style: dashed; border-color: rgba(255, 255, 255, .18); }
.orbit b {
  position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: var(--white);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .18);
}

.track {
  position: relative; z-index: 1;
  display: flex;
  height: 100%;
  transform: translate3d(calc(var(--i, 0) * -100%), 0, 0);
  transition: transform var(--slide-ms) var(--ease);
  will-change: transform;
}
.track.is-dragging, .track.is-dragging .ghost { transition: none; }

.slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  overflow: hidden;
  overflow: clip;
  height: 100%;
  color: var(--white);
}

/* giant outlined word per menu, moves faster than the slide (parallax) */
.ghost {
  position: absolute; z-index: 0; pointer-events: none;
  top: 50%; right: -.22em;
  writing-mode: vertical-rl;
  font-size: 148px; font-weight: 800; line-height: .8; letter-spacing: -.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .26);
  transform: translate(calc(var(--o, 0) * var(--parallax)), -50%);
  transition: transform var(--slide-ms) var(--ease);
}

.slide-body {
  position: relative; z-index: 1;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  padding:
    calc(clamp(28px, 6svh, 56px) + env(safe-area-inset-top))
    var(--pad-x)
    104px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* content scrolls away under a fade so the bottom stays clean */
  -webkit-mask-image: linear-gradient(#000 calc(100% - 112px), transparent calc(100% - 64px));
          mask-image: linear-gradient(#000 calc(100% - 112px), transparent calc(100% - 64px));
}
.slide-body::-webkit-scrollbar { display: none; }

/* menus with lists start higher and tighter */
.slide--dense .slide-body { padding-top: calc(clamp(24px, 4svh, 40px) + env(safe-area-inset-top)); }
.slide--dense .quote { width: 34px; height: 26px; margin-bottom: 18px; }
.slide--dense .dots { margin: 12px 0 20px; }
.slide--dense .meter { margin-bottom: 26px; }

/* ── TYPE ─────────────────────────────── */
.quote { width: 46px; height: 35px; fill: var(--white); stroke: none; margin-bottom: 26px; }

.headline {
  font-size: var(--text-head);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  max-width: 11ch;
}

.dots { display: flex; gap: 5px; margin: 16px 0 28px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--white); }

/* counter on top: (01) ─────── 06, the line fills with progress */
.meter { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 40px; }
.meter-num {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--white);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.meter-line { position: relative; flex: 1; height: 1.5px; background: var(--line); }
.meter-line::before {
  content: ""; position: absolute; inset: 0 auto 0 0;
  width: var(--p); background: var(--white);
  transform-origin: left; transform: scaleX(0);
  transition: transform .9s var(--ease) .15s;
}
.meter-total { font-size: 12px; font-weight: 700; color: var(--soft); }

.label { font-size: 12px; font-weight: 800; letter-spacing: .16em; margin-bottom: 16px; }
.label span, .label b { color: var(--soft); font-weight: 800; }

.body { font-size: 15px; font-weight: 500; line-height: 1.55; color: rgba(255, 255, 255, .92); max-width: 32ch; margin-bottom: 24px; }
.note { margin-top: 22px; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--soft); max-width: 30ch; }
.note b { color: var(--white); font-weight: 800; }

/* ── HOME: headline bigger, details anchored low ── */
.slide--home .slide-body { padding-bottom: 36px; -webkit-mask-image: none; mask-image: none; }
.slide--home .meter { margin-bottom: 26px; }
.slide--home .quote { width: 40px; height: 30px; margin-bottom: 18px; }
.slide--home .headline { font-size: clamp(34px, 10vw, 42px); max-width: 10ch; line-height: 1.04; }
.slide--home .dots { margin: 12px 0 0; }
.slide--home .foot { margin-top: auto; width: 100%; padding-top: 20px; }
.slide--home .label { margin-bottom: 12px; }
.slide--home .body { margin-bottom: 18px; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding-top: 14px; margin-bottom: 18px;
  border-top: 1.5px solid var(--line);
}
.stats dt { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.stats dd { margin-top: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }

/* social links as pills (Iconsax has no LinkedIn/Medium marks) */
.pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
.pills a {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 40px; padding: 0 8px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .6);
  font-size: 12.5px; font-weight: 700; color: var(--white); white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.pills .i { font-size: 15px; }
.pills a:hover { background: var(--white); color: var(--blue); }

/* ── LISTS, CHIPS, CARDS ──────────────── */
.list { width: 100%; margin-bottom: 26px; }
.list li { border-top: 1.5px solid rgba(255, 255, 255, .26); }
.list li:last-child { border-bottom: 1.5px solid rgba(255, 255, 255, .26); }
.list li, .list a { display: flex; flex-direction: column; gap: 2px; padding: 11px 0; }
.list--links li { padding: 0; }
.list b { font-size: 15px; font-weight: 700; line-height: 1.3; }
.list span { font-size: 13px; font-weight: 500; color: var(--soft); }
.list a { transition: transform .3s var(--ease); }
.list a:hover { transform: translateX(6px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips li {
  padding: 9px 14px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .55);
  font-size: 13px; font-weight: 700;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.chips li:hover { background: var(--white); color: var(--blue); }

.book-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 12px; margin-bottom: 26px;
  background: var(--white); border-radius: 22px;
  box-shadow: 0 18px 30px -18px var(--shadow-blue);
  transition: transform .35s var(--ease);
}
.book-card:hover { transform: translateY(-3px) rotate(-.6deg); }
.book-card img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; flex: none; }
.book-card span { display: flex; flex-direction: column; gap: 3px; }
.book-card b { font-size: 14px; font-weight: 800; line-height: 1.25; color: var(--blue-deep); }
.book-card small { font-size: 12px; font-weight: 500; line-height: 1.4; color: var(--blue-deep); opacity: .8; }
.book-card em { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-style: normal; font-size: 12px; font-weight: 800; color: var(--blue); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px;
  background: var(--white); color: var(--blue);
  font-size: 14px; font-weight: 800;
  box-shadow: 0 12px 22px -14px var(--shadow-blue);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn .i { font-size: 19px; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 26px -14px var(--shadow-blue); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--ghost { background: transparent; color: var(--white); border: 1.5px solid var(--white); box-shadow: none; }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); box-shadow: none; }
.stack { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 22px; }

.link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--white); }
.link .i { font-size: 16px; }

/* reels rail */
.hscroll {
  display: flex; gap: 10px;
  width: calc(100% + var(--pad-x) * 2);
  margin: 0 calc(var(--pad-x) * -1) 22px;
  padding: 0 var(--pad-x);
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pad-x);
  scrollbar-width: none; touch-action: pan-x;
}
.hscroll::-webkit-scrollbar { display: none; }
.reel { flex: 0 0 116px; scroll-snap-align: start; text-align: left; }
.reel-media {
  position: relative; display: block;
  aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden;
  background: rgba(255, 255, 255, .16);
  box-shadow: 0 14px 24px -14px var(--shadow-blue);
  transition: transform .35s var(--ease);
}
.reel:nth-child(even) .reel-media { transform: translateY(14px); }
.reel:hover .reel-media { transform: translateY(-4px); }
.reel-media img, .reel-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-media video { opacity: 0; transition: opacity .4s; }
.reel-media video.is-on { opacity: 1; }
.reel-play {
  position: absolute; right: 8px; bottom: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--white); color: var(--blue);
  display: grid; place-items: center;
}
.reel-play .i { font-size: 15px; }
.reel-name { display: block; margin-top: 8px; font-size: 12px; font-weight: 700; line-height: 1.25; }
.reel:nth-child(even) .reel-name { transform: translateY(14px); }
.reels { padding-bottom: 14px; }

/* credit, bottom-right of the panel (reference: "Chal Bombay by DIVINE") */
.credit {
  position: absolute; z-index: 2; right: var(--pad-x); bottom: 22px;
  text-align: right; font-size: 13px; font-weight: 800; line-height: 1.2;
  pointer-events: none;
}
.credit small { display: block; font-size: 10px; font-weight: 600; color: var(--soft); }

/* ── ENTRANCE of the active slide ───────── */
.slide :is(.meter, .quote, .headline, .dots, .label, .body, .list, .chips, .hscroll, .btn, .stack, .stats, .pills, .link, .book-card, .note) {
  opacity: 0; transform: translateX(28px);
  transition: opacity .5s var(--ease), transform .7s var(--ease);
}
.slide.is-active :is(.meter, .quote, .headline, .dots, .label, .body, .list, .chips, .hscroll, .btn, .stack, .stats, .pills, .link, .book-card, .note) {
  opacity: 1; transform: none;
}
.slide.is-active .meter    { transition-delay: .04s; }
.slide.is-active .quote    { transition-delay: .08s; }
.slide.is-active .headline { transition-delay: .12s; }
.slide.is-active .dots     { transition-delay: .18s; }
.slide.is-active .label    { transition-delay: .22s; }
.slide.is-active :is(.body, .list, .chips, .hscroll, .book-card) { transition-delay: .26s; }
.slide.is-active :is(.stats, .btn, .stack) { transition-delay: .31s; }
.slide.is-active :is(.pills, .link, .note) { transition-delay: .36s; }
.slide.is-active .meter-line::before { transform: scaleX(1); }
.slide.is-active .dots i { animation: blip 1.4s var(--ease) .5s 1 both; }
.slide.is-active .dots i:nth-child(2) { animation-delay: .62s; }
.slide.is-active .dots i:nth-child(3) { animation-delay: .74s; }
@keyframes blip { 0%, 100% { transform: none; } 40% { transform: translateY(-6px); } }

/* ── DOCK (stays still) ─────────────────── */
.dock {
  flex: none;
  height: calc(var(--dock-h) + env(safe-area-inset-bottom));
  padding: 0 18px env(safe-area-inset-bottom) 18px;
  display: flex; align-items: center; gap: 14px;
  background: var(--white);
}
.rail { flex: 1; min-width: 0; display: flex; justify-content: space-between; }
.rail button {
  flex: none; width: 46px; height: 46px; border-radius: 16px;
  display: grid; place-items: center; font-size: 24px;
  color: var(--navy); opacity: .5;
  transition: background .3s var(--ease), opacity .3s, transform .3s var(--ease), color .3s;
}
.rail button:hover { opacity: .85; }
.rail button:active { transform: scale(.92); }
.rail button[aria-current="true"] { background: var(--dock-pill); color: var(--blue); opacity: 1; }

.fab {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  background: var(--blue); color: var(--white);
  display: grid; place-items: center; font-size: 26px;
  box-shadow: 0 10px 20px -8px rgba(0, 160, 229, .7);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.fab:hover { transform: translateY(-2px) rotate(-6deg); }
.fab[aria-current="true"] { box-shadow: 0 0 0 4px var(--white), 0 0 0 6px var(--blue); }

:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 3px; border-radius: 12px; }
.panel :focus-visible { outline-color: var(--white); }

/* ── REELS PLAYER ───────────────────────── */
.player {
  position: absolute; inset: 0; z-index: 10;
  background: #000;
  display: grid; place-items: center;
  animation: rise .45s var(--ease);
}
.player[hidden] { display: none; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-meta {
  position: absolute; left: 22px; top: calc(22px + env(safe-area-inset-top));
  color: var(--white); font-size: 15px; font-weight: 800;
}
.player-meta small { display: block; font-size: 11px; font-weight: 600; opacity: .7; }
.player-btn {
  position: absolute; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); color: var(--white);
  display: grid; place-items: center; font-size: 24px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.player-close { right: 18px; top: calc(18px + env(safe-area-inset-top)); }
.player-prev { left: 12px; top: 50%; translate: 0 -50%; }
.player-next { right: 12px; top: 50%; translate: 0 -50%; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
  :root { --slide-ms: 0ms; --parallax: 0px; }
  .orbit { transition: none; }
  .slide :is(.meter, .quote, .headline, .dots, .label, .body, .list, .chips, .hscroll, .btn, .stack, .stats, .pills, .link, .book-card, .note) { transition: none; transform: none; opacity: 1; }
  .slide .meter-line::before { transition: none; transform: scaleX(1); }
  .slide.is-active .dots i { animation: none; }
  .player { animation: none; }
}
