﻿/* ========================================
   DeviantStack - Project showcase pages
   Glassmorphism components + CSS mock UIs
   ======================================== */

:root {
  /* chart marks - validated for light surfaces */
  --ch1: #009684;
  --ch2: #b97c10;
  --ch3: #6558f5;
  --ch4: #c2552a;
  /* chart marks - validated for dark glass surfaces */
  --chd1: #0ea08d;
  --chd2: #c77f1d;
  --chd3: #7a72fa;
  --chd4: #cf6a35;
  /* status (reserved - never used as series colors) */
  --ok: #2e7d32;
  --warn: #b45309;
  --bad: #b91c1c;
  --ok-d: #4ade80;
  --warn-d: #fbbf24;
  --bad-d: #f87171;
}

/* ===== Page nav ===== */
.pnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0.85rem 0;
  background: rgba(251, 247, 240, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(233, 224, 210, 0.6);
}
.pnav .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pnav-back { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .92rem; }
.pnav-back:hover { color: var(--ink); }

/* ===== Hero ===== */
.phero {
  padding: 9rem 0 7rem;
  color: #fff;
  background:
    radial-gradient(700px 360px at 85% 10%, rgba(255, 255, 255, 0.16), transparent 60%),
    radial-gradient(560px 320px at 8% 90%, rgba(0, 0, 0, 0.18), transparent 60%),
    linear-gradient(135deg, var(--p1), var(--p2));
}
.phero-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.pchip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .9rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: #fff; background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}
.phero h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); font-weight: 800; letter-spacing: -0.02em; }
.phero-sub { font-size: 1.12rem; max-width: 620px; line-height: 1.7; color: rgba(255, 255, 255, 0.85); margin-top: 1rem; }
.phero-meta { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2rem; }
.phero-meta div span { display: block; }
.phero-meta .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: rgba(255, 255, 255, 0.6); font-weight: 700; }
.phero-meta .v { font-weight: 600; margin-top: .15rem; }

/* ===== Mock stage ===== */
.mock-stage { margin-top: -4rem; padding-bottom: 5rem; }
.browser {
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 40px 90px rgba(28, 43, 45, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.browser-bar {
  display: flex; align-items: center; gap: .9rem;
  padding: .7rem 1.1rem;
  background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(28, 43, 45, 0.08);
}
.browser-bar .dots { display: flex; gap: .38rem; }
.browser-bar .dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.browser-bar .dots i:nth-child(1) { background: #f87171; }
.browser-bar .dots i:nth-child(2) { background: #fbbf24; }
.browser-bar .dots i:nth-child(3) { background: #4ade80; }
.browser-url {
  flex: 1; max-width: 420px; margin: 0 auto;
  background: rgba(28, 43, 45, 0.06); border-radius: 999px;
  padding: .3rem 1rem; font-size: .78rem; color: var(--ink-soft); text-align: center;
}
.browser.dark .browser-bar { background: rgba(22, 30, 38, 0.85); border-bottom-color: rgba(255, 255, 255, 0.07); }
.browser.dark .browser-url { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.55); }

/* ===== Glass panels ===== */
.glass {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(18px);
  border-radius: 16px;
}
.glass-d {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  border-radius: 16px;
  color: #e8edf2;
}

/* ===== App mock scaffolding ===== */
.app { display: grid; grid-template-columns: 210px 1fr; min-height: 520px; font-size: .85rem; }
.app-light { background: linear-gradient(160deg, #f2f7f6, #ece9f8); color: var(--ink); }
.app-dark { background: linear-gradient(160deg, #131c24, #1b2430 55%, #22203a); color: #e8edf2; }
.app .side { padding: 1.2rem .9rem; display: flex; flex-direction: column; gap: .2rem; }
.app-dark .side { border-right: 1px solid rgba(255, 255, 255, 0.07); }
.app-light .side { border-right: 1px solid rgba(28, 43, 45, 0.07); }
.side-brand { font-family: "Sora"; font-weight: 800; font-size: 1rem; padding: .4rem .7rem 1rem; display: flex; align-items: center; gap: .5rem; }
.side a { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 10px; text-decoration: none; color: inherit; opacity: .66; font-weight: 500; }
.side a.on { opacity: 1; font-weight: 700; }
.app-dark .side a.on { background: rgba(255, 255, 255, 0.09); }
.app-light .side a.on { background: rgba(28, 43, 45, 0.07); }
.app .main { padding: 1.3rem 1.4rem; overflow: hidden; }
.app-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.app-title h2 { font-size: 1.15rem; font-weight: 700; margin: 0; font-family: "Sora"; }
.app-title .sub { font-size: .78rem; opacity: .6; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin-bottom: .9rem; }
.kpi { padding: .9rem 1rem; }
.kpi .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; opacity: .62; font-weight: 700; }
.kpi .v { font-family: "Sora"; font-size: 1.55rem; font-weight: 800; line-height: 1.2; margin-top: .15rem; }
.kpi .d { font-size: .74rem; font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; margin-top: .2rem; }
.kpi .d.up { color: var(--ok); } .kpi .d.down { color: var(--bad); }
.app-dark .kpi .d.up { color: var(--ok-d); } .app-dark .kpi .d.down { color: var(--bad-d); }

/* Panels grid */
.panels { display: grid; gap: .8rem; }
.panel { padding: 1rem 1.1rem; }
.panel h3 { font-size: .86rem; font-weight: 700; margin: 0 0 .8rem; font-family: "Sora"; }
.panel h3 small { font-weight: 500; opacity: .55; font-size: .74rem; margin-left: .4rem; }

/* ===== Bar chart (single series, thin marks, tooltip on hover) ===== */
.bars { display: flex; align-items: flex-end; gap: 7px; height: 110px; }
.bars i {
  flex: 1; max-width: 26px; min-width: 10px;
  height: var(--h);
  background: var(--bar, var(--ch1));
  border-radius: 4px 4px 0 0;
  position: relative; cursor: default;
  transition: filter .15s ease;
}
.bars i:hover { filter: brightness(1.18); }
.bars i:hover::after {
  content: attr(data-v);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: #1c2b2d; color: #fff; font-size: .68rem; font-weight: 600;
  padding: .2rem .5rem; border-radius: 6px; white-space: nowrap; z-index: 5;
}
.bars i.hi { background: var(--bar-hi, var(--ch2)); }
.bars i.hi::before {
  content: attr(data-v);
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  font-size: .68rem; font-weight: 700; white-space: nowrap; opacity: .85;
}
.bars i.hi:hover::before { content: none; }
.axis { display: flex; gap: 7px; margin-top: .4rem; }
.axis span { flex: 1; max-width: 26px; min-width: 10px; text-align: center; font-size: .64rem; opacity: .55; }

/* Horizontal bars (funnel / ranking) */
.hbars { display: flex; flex-direction: column; gap: .55rem; }
.hbar { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: .7rem; font-size: .78rem; }
.hbar .lbl { opacity: .75; font-weight: 600; text-align: right; }
.hbar .trk { height: 14px; border-radius: 4px; background: rgba(127, 127, 127, 0.14); overflow: hidden; }
.hbar .trk b { display: block; height: 100%; width: var(--w); background: var(--bar, var(--ch1)); border-radius: 4px; }
.hbar .val { font-weight: 700; font-size: .76rem; }

/* Sparkline */
.spark { display: block; width: 100%; height: 34px; margin-top: .3rem; }
.spark polyline { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Status pills (icon + label, never color alone) ===== */
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px; }
.pill.ok   { color: var(--ok);   background: rgba(46, 125, 50, .12); }
.pill.warn { color: var(--warn); background: rgba(180, 83, 9, .12); }
.pill.bad  { color: var(--bad);  background: rgba(185, 28, 28, .12); }
.app-dark .pill.ok   { color: var(--ok-d);   background: rgba(74, 222, 128, .13); }
.app-dark .pill.warn { color: var(--warn-d); background: rgba(251, 191, 36, .13); }
.app-dark .pill.bad  { color: var(--bad-d);  background: rgba(248, 113, 113, .13); }

/* ===== Mock tables ===== */
.mtable { width: 100%; border-collapse: collapse; font-size: .78rem; }
.mtable th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; opacity: .55; padding: .35rem .5rem; font-weight: 700; }
.mtable td { padding: .5rem; }
.app-dark .mtable tr + tr td { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.app-light .mtable tr + tr td { border-top: 1px solid rgba(28, 43, 45, 0.07); }
.mtable .who { display: flex; align-items: center; gap: .55rem; font-weight: 600; }
.mtable tr.sel { background: rgba(47, 143, 131, .1); border-radius: 8px; }
.mtable tr[style*="cursor:pointer"]:hover { background: rgba(127, 127, 127, .06); }
.mdot { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .7rem; background: linear-gradient(135deg, var(--c1, var(--ch1)), var(--c2, var(--ch3))); flex: none; }

/* Console / log */
.console { font-family: Consolas, "SF Mono", monospace; font-size: .72rem; line-height: 1.8; padding: .9rem 1rem; border-radius: 12px; background: rgba(0, 0, 0, 0.35); color: #b7c6d3; overflow: hidden; }
.console .t { color: #5f7385; margin-right: .6rem; }
.console .good { color: var(--ok-d); }
.console .warn2 { color: var(--warn-d); }

/* ===== Storefront / website mocks ===== */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .8rem; }
.shop-card { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 8px 22px rgba(28, 43, 45, 0.07); }
.shop-img { height: 110px; background: linear-gradient(135deg, var(--i1), var(--i2)); display: grid; place-items: center; color: rgba(255, 255, 255, 0.9); font-size: 1.7rem; }
.shop-card .b { padding: .6rem .7rem .75rem; font-size: .74rem; }
.shop-card .b strong { display: block; font-size: .78rem; }
.shop-card .b span { opacity: .6; }
.shop-card .b .pr { font-weight: 800; color: var(--ink); opacity: 1; float: right; }

/* Booking / list rows */
.slot-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.slot { padding: .4rem .85rem; border-radius: 10px; font-size: .76rem; font-weight: 600; border: 1.5px solid rgba(28, 43, 45, 0.14); }
.slot.sel { background: var(--p1); color: #fff; border-color: var(--p1); }
.slot.off { opacity: .35; text-decoration: line-through; }

/* ===== Below-the-fold content ===== */
.pbody { padding: 1rem 0 5rem; }
.pbody .service-card h3 { font-size: 1.05rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; margin: 0; }
.chips li { background: var(--bg-alt); border-radius: 999px; padding: .35rem .95rem; font-size: .82rem; font-weight: 600; color: var(--ink-soft); }

/* CTA */
.pcta {
  background: linear-gradient(135deg, #223a3c, #1c2b2d);
  border-radius: 28px; padding: 3rem; color: #fff; text-align: center;
}
.pcta h2 { font-weight: 800; font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.pcta p { color: rgba(255, 255, 255, 0.7); max-width: 520px; margin: .8rem auto 1.6rem; }

/* ===== Stat strip + "why it holds up" block ===== */
.stat-strip { text-align: center; padding: 2rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 0 0 3rem; }
.stat-strip .stat-num { font-size: 2rem; }
.stat-strip .stat-label { font-size: .82rem; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.why-item { display: flex; gap: .9rem; }
.why-item i { font-size: 1.3rem; color: var(--accent); flex: none; margin-top: .1rem; }
.why-item h4 { font-size: .98rem; font-weight: 700; margin: 0 0 .3rem; }
.why-item p { font-size: .86rem; color: var(--ink-soft); margin: 0; line-height: 1.6; }
@media (max-width: 767px) { .why-grid { grid-template-columns: 1fr; } }

/* Footer strip */
.pfoot { padding: 2rem 0 2.5rem; text-align: center; color: var(--ink-soft); font-size: .85rem; }
.pfoot a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* Prev / next */
.pnext { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; flex-wrap: wrap; }

/* ===== Interactive demo bits ===== */
button.slot, button.slot.sel { cursor: pointer; font-family: inherit; transition: transform .15s ease, box-shadow .15s ease; }
button.slot:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(28, 43, 45, 0.12); }
button.slot:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.addbtn { display: block; width: 100%; text-align: center; margin-top: .5rem; border-radius: 9px; padding: .32rem .5rem; font-size: .72rem; }
.mock-in {
  width: 100%; padding: .5rem .75rem; border-radius: 10px; font-size: .78rem;
  border: 1px solid rgba(28, 43, 45, 0.15); background: #fff; margin-bottom: .55rem;
  font-family: inherit; color: var(--ink);
}
.mock-in:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.mock-lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; opacity: .6; font-weight: 700; display: block; margin-bottom: .25rem; }
.qty { display: inline-flex; align-items: center; gap: .45rem; }
.qty button {
  width: 20px; height: 20px; border-radius: 7px; border: 1px solid rgba(28, 43, 45, 0.18);
  background: transparent; font-size: .75rem; line-height: 1; cursor: pointer; color: inherit;
  display: grid; place-items: center; padding: 0;
}
.qty button:hover { background: rgba(28, 43, 45, 0.07); }
.rmv { border: none; background: transparent; color: inherit; opacity: .45; cursor: pointer; font-size: .8rem; padding: .1rem; }
.rmv:hover { opacity: 1; color: var(--bad); }
.demo-note { font-size: .7rem; opacity: .55; }
.btn-run {
  float: right; border: none; cursor: pointer; font-family: inherit;
  background: rgba(122, 114, 250, 0.2); color: #b9b4ff;
  border-radius: 999px; padding: .25rem .8rem; font-size: .72rem; font-weight: 700;
}
.btn-run:hover { background: rgba(122, 114, 250, 0.35); }
.btn-run:disabled { opacity: .5; cursor: default; }
.console { max-height: 200px; overflow: hidden; }
.blink { animation: blink 1.1s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ===== Shared motion (site-motion.js) ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* bars/hbars grow in once their panel is revealed, and smoothly re-grow on live updates */
.bars i { transition: height 1s cubic-bezier(.16, 1, .3, 1), filter .15s ease; height: 0; }
.visible .bars i { height: var(--h); }
.hbar .trk b { transition: width 1s cubic-bezier(.16, 1, .3, 1); width: 0; }
.visible .hbar .trk b { width: var(--w); }

/* view/tab entrance pop */
@keyframes viewPop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-pop { animation: viewPop .32s cubic-bezier(.16, 1, .3, 1); }

/* toasts */
.ds-toast-wrap { position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 999; display: flex; flex-direction: column; gap: .5rem; max-width: 320px; }
.ds-toast {
  display: flex; align-items: center; gap: .55rem;
  background: #1c2b2d; color: #fff; font-size: .82rem; font-weight: 600;
  padding: .7rem 1rem; border-radius: 12px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .25s ease, transform .25s ease;
}
.ds-toast.in { opacity: 1; transform: none; }
.ds-toast--ok i { color: #4ade80; }
.ds-toast--warn i { color: #fbbf24; }
.ds-toast--bad i { color: #f87171; }

/* micro-interactions */
.slot:active, .btn-run:active, .btn:active { transform: scale(.96); }
.shop-card { transition: transform .22s ease, box-shadow .22s ease; }
.shop-card:hover { transform: translateY(-5px); box-shadow: 0 16px 32px rgba(28, 43, 45, 0.14); }
.kpi, .panel { transition: transform .2s ease, box-shadow .2s ease; }
.kpi:hover { transform: translateY(-3px); }

/* modal overlay (call workflow, credential reveal, etc.) */
.ds-modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 14, 20, 0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.ds-modal {
  position: relative;
  width: 100%; max-width: 460px; border-radius: 20px; padding: 1.6rem;
  background: #1b2430; color: #e8edf2; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: viewPop .25s cubic-bezier(.16, 1, .3, 1);
}
.ds-modal h3 { font-family: "Sora"; font-size: 1.1rem; margin: 0 0 .2rem; }
.ds-modal .ds-modal-meta { font-size: .78rem; opacity: .6; margin-bottom: 1rem; }
.ds-modal-timer { font-family: "Sora"; font-size: 2rem; font-weight: 800; text-align: center; margin: .6rem 0 1rem; color: #7ee0d2; }
.ds-modal textarea.mock-in { min-height: 70px; resize: vertical; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); color: #e8edf2; }
.ds-modal-outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .8rem; }
.ds-modal-outcomes button { border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); color: #e8edf2; border-radius: 10px; padding: .55rem; font-size: .8rem; font-weight: 600; cursor: pointer; transition: background .15s ease; }
.ds-modal-outcomes button:hover { background: rgba(255, 255, 255, 0.14); }
.ds-modal-close { position: absolute; top: 1.1rem; right: 1.2rem; background: none; border: none; color: rgba(255, 255, 255, 0.5); font-size: 1.1rem; cursor: pointer; }
.ds-modal-close:hover { color: #fff; }

/* live pulse (homepage "Live demo" tag + any .pulse element) */
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224, 122, 63, .45); } 50% { box-shadow: 0 0 0 6px rgba(224, 122, 63, 0); } }
.work-tag--live { animation: livePulse 2.2s ease-in-out infinite; }

/* ===== Full-screen demo pages ===== */
.demo-topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .6rem 1.2rem;
  background: rgba(18, 26, 34, 0.94); backdrop-filter: blur(12px);
  color: #e8edf2; font-size: .85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.demo-topbar .navbar-brand { color: #fff; font-size: 1rem; margin: 0; }
.demo-topbar .brand-mark { width: 30px; height: 30px; border-radius: 9px; font-size: .9rem; }
.demo-topbar .spacer { flex: 1; }
.demo-topbar .tb-note { opacity: .65; font-size: .78rem; }
.demo-topbar a.tb-link { color: #f4a340; text-decoration: none; font-weight: 600; font-size: .82rem; }
.demo-topbar a.tb-link:hover { text-decoration: underline; }
.demo-full { min-height: calc(100vh - 55px); }
.demo-full.app { border-radius: 0; }
@media (max-width: 575px) { .demo-topbar .tb-note { display: none; } }

@media (max-width: 767px) {
  .app { grid-template-columns: 1fr; }
  .app .side { flex-direction: row; flex-wrap: wrap; border-right: none !important; padding-bottom: .4rem; }
  .side-brand { padding-bottom: .4rem; width: 100%; }
  .phero { padding: 7.5rem 0 6rem; }
  .mock-stage { margin-top: -3rem; }
  .hbar { grid-template-columns: 72px 1fr 40px; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
