/* Live showcases on the landing page: the Counter-Strike 2 and OBS sections
   (driven by live.js) and the vertical page-switch demo. The phone is drawn
   to the proportions of the real IcePad phone screen; the tiles inside it
   come from the app's own code in ./app/. */

/* ============ Showcase panels ============ */
/* Heading, then the phone large enough to read the tiles, then the
   features in a row that lights up with the demo. */
.show {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 32px;
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 64px) clamp(36px, 5vw, 56px);
}
.show-head { max-width: 720px; text-align: center; display: grid; justify-items: center; }
.show.dark {
  color: #fff;
  background:
    radial-gradient(55% 70% at 88% 18%, rgba(255, 170, 76, .17), transparent 62%),
    radial-gradient(65% 85% at 6% 104%, rgba(98, 182, 255, .2), transparent 62%),
    linear-gradient(180deg, #0A1022, #060914);
}
.show.dark::before {
  /* Faint grid, like a radar screen. */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(80% 80% at 60% 40%, #000, transparent 75%);
}
.show.light {
  background: radial-gradient(70% 80% at 85% 10%, #EAF0FF, transparent 62%), radial-gradient(60% 70% at 0% 100%, #EEF7FF, transparent 60%), #F6F8FB;
  box-shadow: inset 0 0 0 1px #E8ECF2;
}
.show .h2 { text-align: center; }
.show.dark .h2 { color: #fff; }
.show .lead { text-align: center; margin: 20px auto 0; max-width: 620px; }
.show.dark .lead { color: #A9B3C4; }
.show .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.show.dark .eyebrow { color: #FFB46A; }
.show .eyebrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Feature row; the item that matches what the demo shows is lit. */
.feat-list { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; text-align: left; }
.feat-list li {
  position: relative; overflow: hidden; display: grid; grid-template-rows: auto auto; gap: 14px; align-content: start;
  padding: 18px 18px 22px; border-radius: 18px; transition: background .5s ease, box-shadow .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1);
}
.feat-list li.on { transform: translateY(-3px); }
.feat-list li::after {
  /* Runs along the bottom of the lit item until the demo moves on. */
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 10px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; opacity: 0;
}
.feat-list li.on::after { opacity: .6; animation: featLine var(--hold, 3s) linear forwards; }
.show.dark .feat-list li::after { background: #FFB46A; }
@keyframes featLine { to { transform: scaleX(1); } }
.show.dark .feat-list li { background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.show.light .feat-list li { background: rgba(255, 255, 255, .55); box-shadow: inset 0 0 0 1px #E8ECF2; }
.show.dark .feat-list li.on { background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.show.light .feat-list li.on { background: #fff; box-shadow: inset 0 0 0 1px #E3E8EF, 0 14px 30px -20px rgba(15, 23, 42, .35); }
.feat-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; transition: color .4s ease, background .4s ease; }
.show.dark .feat-ic { color: #C9D3E2; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.show.dark li.on .feat-ic { color: #FFB46A; background: rgba(255, 180, 106, .12); }
.show.light .feat-ic { color: #5B6472; background: #fff; box-shadow: inset 0 0 0 1px #E3E8EF; }
.show.light li.on .feat-ic { color: var(--accent); }
.feat-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.feat-list b { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.feat-list span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.5; }
.show.dark .feat-list span { color: #97A2B4; }
.show.light .feat-list span { color: #5B6472; }
.show-note { margin: 22px 0 0; font-size: 13px; line-height: 1.5; }
.show.dark .show-note { color: #7D889B; }
.show.light .show-note { color: #6B7280; }

/* ============ Stage: caption + phone ============ */
/* One full-width column: the phone (a size container) has no width of its own. */
.lv-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 26px; width: 100%; min-width: 0; margin: clamp(36px, 5vw, 56px) 0 clamp(36px, 5vw, 52px); }
.lv-stage .lv-caption { order: -1; }
.lv-stage::before {
  /* Soft light under the phone. */
  content: ""; position: absolute; left: 8%; right: 8%; top: 30%; bottom: 0; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow, rgba(98, 182, 255, .28)), transparent); filter: blur(10px);
}
.lv-caption {
  display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 16px 0 14px; border-radius: 99px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap; max-width: 100%;
}
.show.dark .lv-caption { color: #fff; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); backdrop-filter: blur(10px); }
.show.light .lv-caption { color: #0A0A0B; background: #fff; box-shadow: inset 0 0 0 1px #E3E8EF, 0 10px 26px -16px rgba(15, 23, 42, .35); }
.lv-caption i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--cap, #62b6ff); box-shadow: 0 0 10px var(--cap, #62b6ff); transition: background .3s ease, box-shadow .3s ease; }
.lv-caption span { display: inline-block; overflow: hidden; text-overflow: ellipsis; transition: opacity .22s ease, transform .22s ease, filter .22s ease; }
.lv-caption.swap span { opacity: 0; transform: translateY(6px); filter: blur(3px); }

/* ============ The phone ============ */
/* Drawn with the values the IcePad phone app uses (mobile/App.js,
   IOSDeckButton.js, ObsVisual.js). Sizes are in cqw of the screen (one
   phone point is 100/844 cqw on an 844-point-wide screen), or of the
   button's inner square for the tile contents. The app uses the system font. */
@font-face { font-family: IcePadMCI; src: url('./app/mci-subset.woff') format('woff'); font-display: block; }
@font-face { font-family: IcePadIonicons; src: url('./app/ionicons-subset.woff') format('woff'); font-display: block; }
.lp { position: relative; width: 100%; max-width: 880px; container-type: inline-size; animation: lpFloat calc(9s * var(--k, 1)) ease-in-out infinite; }
@keyframes lpFloat { 50% { transform: translateY(-8px); } }
.lp-body {
  position: relative; aspect-ratio: 1600 / 736; border-radius: 6.4cqw; padding: 1.15cqw; background: #05070C;
  box-shadow: 0 0 0 .22cqw rgba(255, 255, 255, .1), inset 0 0 0 .25cqw #1b2130, 0 4cqw 7cqw -3cqw rgba(5, 10, 30, .65), 0 1.4cqw 2.4cqw -1.4cqw rgba(5, 10, 30, .5);
}
.lp-body::after { /* glass reflection on the device, not part of the app */
  content: ""; position: absolute; inset: 1.15cqw; border-radius: 5.3cqw; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .07), transparent 32%, transparent 70%, rgba(255, 255, 255, .04));
}
.lp, .lp-pair { --sys: Manrope, system-ui, sans-serif; }
.lp-screen {
  position: relative; height: 100%; border-radius: 5.3cqw; overflow: hidden; font-family: var(--sys);
  background: linear-gradient(180deg, #01060f, #031020, #061833); /* App.js pad background */
}
.lp-grid { position: absolute; left: 7.4cqw; top: 3.3cqw; display: grid; grid-template-columns: repeat(4, 18.2cqw); gap: 2.15cqw 2.3cqw; }
.lp-slot { position: relative; width: 18.2cqw; height: 18.2cqw; container-type: inline-size; }
.lp-btn { width: 100%; height: 100%; will-change: transform; }
/* outerSquircleRing + IOSDeckButton: radius 35%, 12% gap, 1.2 pt border. */
.lp-ring {
  width: 100%; height: 100%; box-sizing: border-box; border-radius: 35%; padding: 12%;
  background: rgba(255, 255, 255, .04); border: max(1px, .66cqw) solid rgba(255, 255, 255, .16);
  box-shadow: 0 2.2cqw 4.4cqw rgba(0, 0, 0, .25);
}
.lp-inner { position: relative; width: 100%; height: 100%; border-radius: 32%; container-type: inline-size; }
.lp-inner.cs2 { background: #111820; overflow: hidden; box-shadow: 0 1.6cqw 4cqw rgba(0, 0, 0, .35); } /* innerAppSquircle */
.lp-inner.obs { background: transparent; } /* appIconContent: ObsVisual draws its own background */
/* Empty slot on the phone: a faint cyan ring and a thin "+". */
.lp-slot.empty .lp-ring { display: grid; place-items: center; padding: 0; border-color: rgba(134, 217, 241, .22); background: rgba(134, 217, 241, .03); box-shadow: none; }
.lp-slot.empty .lp-ring::before { content: "+"; color: rgba(134, 217, 241, .45); font-size: 38cqw; font-weight: 200; line-height: 1; }

/* Page dots (liquidBaseDot / liquidActiveIndicator), stacked by the dock. */
.lp-dots { position: absolute; left: 89.1cqw; top: 50%; transform: translateY(-50%); display: grid; gap: .95cqw; }
.lp-dots i { display: block; width: .77cqw; height: .77cqw; border-radius: 50%; background: rgba(255, 255, 255, .24); }
.lp-dots i.on { background: #fff; box-shadow: 0 0 .6cqw rgba(134, 217, 241, .95); }
/* Right column: dock capsule (mixer, grid) and the mic button. dockWidth 54 pt. */
.lp-side { position: absolute; right: 1.42cqw; top: 50%; transform: translateY(-50%); display: grid; justify-items: center; }
.lp-dock {
  position: relative; width: 6.4cqw; box-sizing: border-box; padding: .59cqw 0; border-radius: 3.2cqw; display: grid; justify-items: center; gap: .47cqw;
  background: rgba(9, 20, 36, .82); border: .14cqw solid rgba(100, 200, 255, .22); box-shadow: 0 .7cqw 1.4cqw rgba(0, 0, 0, .4);
}
.lp-dbtn { width: 5.45cqw; height: 5.45cqw; border-radius: 50%; display: grid; place-items: center; position: relative; }
.lp-pill { /* active tab indicator, on the grid tab */
  position: absolute; left: 50%; top: calc(.59cqw + 5.45cqw + .47cqw); width: 5.45cqw; height: 5.45cqw; margin-left: -2.725cqw; box-sizing: border-box; border-radius: 50%;
  background: rgba(134, 217, 241, .2); border: .14cqw solid rgba(134, 217, 241, .65); box-shadow: 0 0 .7cqw rgba(134, 217, 241, .5);
}
.lp-dbtn.mixer { opacity: .45; color: #86d9f1; }
.lp-dbtn .mci { font-family: IcePadMCI; font-size: 2.4cqw; line-height: 1; }
.lp-dbtn .sq { display: grid; grid-template-columns: repeat(2, .71cqw); gap: .21cqw; }
.lp-dbtn .sq i { width: .71cqw; height: .71cqw; border-radius: .21cqw; background: #fff; }
.lp-mic {
  margin-top: .95cqw; width: 6.4cqw; height: 6.4cqw; box-sizing: border-box; border-radius: 50%; display: grid; place-items: center;
  background: rgba(9, 20, 36, .82); border: .14cqw solid rgba(100, 200, 255, .22); box-shadow: 0 .47cqw .95cqw rgba(0, 0, 0, .35);
}
.lp-mic .ion { font-family: IcePadIonicons; font-size: 2.8cqw; line-height: 1; color: rgba(255, 255, 255, .78); }

/* ---- CS2 tile (App.js Cs2WidgetContent); cqw = the inner square ---- */
.c2 { position: absolute; inset: 0; overflow: hidden; border-radius: 18cqw; font-family: var(--sys); }
.c2-glow { position: absolute; inset: 0; opacity: .22; pointer-events: none; }
.c2-glow i { position: absolute; border-radius: 50%; background: var(--acc); opacity: .28; }
.c2-glow i:nth-child(1) { left: 2.5%; top: 4.5%; width: 95%; height: 95%; }
.c2-glow i:nth-child(2) { left: 15%; top: 17%; width: 70%; height: 70%; }
.c2-glow i:nth-child(3) { left: 27.5%; top: 29.5%; width: 45%; height: 45%; }
.c2-glow.pulse { animation: c2Pulse 1s ease-in-out infinite; }
@keyframes c2Pulse { 0%, 100% { opacity: .32; } 50% { opacity: .55; } }
.c2-body { position: absolute; inset: 0; padding: 10cqw 8cqw 9cqw; display: flex; flex-direction: column; justify-content: space-between; }
.c2-body.off { opacity: .6; }
.c2-head { display: flex; align-items: center; justify-content: center; gap: 2.5cqw; color: #9fb0c2; min-width: 0; }
.c2-head .mci { font-family: IcePadMCI; font-size: 9.5cqw; line-height: 1; }
.c2-head b { font-size: 7cqw; font-weight: 800; letter-spacing: .98cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c2-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqw; min-height: 0; }
.c2-hero { font-size: 27cqw; line-height: 1.1; font-weight: 900; letter-spacing: -.54cqw; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c2-hero small { font-size: 10cqw; font-weight: 800; letter-spacing: 0; color: #9fb0c2; }
.c2-score { display: flex; align-items: center; gap: 2.5cqw; font-variant-numeric: tabular-nums; }
.c2-score b { font-size: 24cqw; line-height: 1.1; font-weight: 900; }
.c2-score i { font-style: normal; font-size: 14.4cqw; font-weight: 800; color: rgba(235, 242, 250, .32); }
.c2-rounds { display: grid; gap: 2.6cqw; }
.c2-rounds > div { display: flex; gap: 2.6cqw; }
.c2-cell { display: block; width: 11.5cqw; height: 11.5cqw; box-sizing: border-box; border-radius: 3.2cqw; border: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .04); }
.c2-cell.ct { background: linear-gradient(149deg, #8ccbff, #4c9fea); border-color: rgba(255, 255, 255, .24); }
.c2-cell.t { background: linear-gradient(149deg, #ffc683, #f0913a); border-color: rgba(255, 255, 255, .24); }
.c2-cell.latest { border: 1.5px solid rgba(255, 255, 255, .78); }
.c2-bar { width: 76%; height: 2.4cqw; border-radius: 9px; overflow: hidden; background: rgba(255, 255, 255, .07); }
.c2-bar i { display: block; height: 100%; border-radius: 9px; }
.c2-lines { display: grid; gap: 1cqw; }
.c2-st, .c2-dt { display: block; text-align: center; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c2-st { font-size: 7.4cqw; line-height: 1.25; letter-spacing: .44cqw; }
.c2-dt { font-size: 6.2cqw; line-height: 1.25; letter-spacing: .31cqw; }

/* ---- OBS tile (ObsVisual.js); cqw = the inner square ---- */
.ob {
  position: absolute; inset: 0; box-sizing: border-box; border-radius: 32cqw; border: max(1px, 1.8cqw) solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 3.6cqw; font-family: var(--sys);
}
.ob-g { font-family: IcePadMCI; font-size: 36cqw; line-height: 1.1; } /* MaterialCommunityIcons at size * 0.36 */
.ob-c { margin-top: 2px; max-width: 100%; font-size: max(9px, 13cqw); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-t { font-size: max(8px, 11cqw); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Feature cards: two phone buttons on the phone's background. */
.lp-pair { display: flex; gap: 18px; padding: 18px 22px; border-radius: 22px; background: linear-gradient(180deg, #01060f, #031020, #061833); }
.lp-pair .lp-slot { width: 128px; height: 128px; }
.viz .lp-pair { background: none; padding: 0; }

/* Section links in the feature cards. */
.more { display: inline-flex; align-items: center; gap: 6px; margin: -4px 8px 0; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.more svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.more:hover svg { transform: translateY(2px); }

@media (max-width: 900px) { .feat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  /* Give the phone every pixel; captions may wrap; features become rows. */
  .show { padding-left: 10px; padding-right: 10px; border-radius: 24px; }
  .show-head { padding: 0 8px; }
  .lv-caption { white-space: normal; height: auto; min-height: 38px; padding: 9px 14px; font-size: 12.5px; line-height: 1.35; max-width: calc(100% - 16px); }
  .lv-caption span { white-space: normal; }
  .feat-list { grid-template-columns: minmax(0, 1fr); padding: 0 6px; }
  .feat-list li { grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto; gap: 14px; padding: 14px 16px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp { animation: none !important; }
  .feat-list li.on::after { animation: none; transform: scaleX(1); }
}
