/* ==========================================================================
   Widgey, widgeydashboard.com
   Design language is lifted directly from the app: near-black violet ground,
   surfaces one step lighter, a single neon accent per element, and the corner
   bracket motif that frames every widget card in the product itself.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg:          #08080f;
  --bg-2:        #0b0b14;
  --surface:     #12121b;
  --surface-2:   #181823;
  --border:      #242432;
  --border-soft: #1c1c27;

  --text:   #f2f2f5;
  --muted:  #9a9aa8;
  --faint:  #6a6a7a;

  --cyan:   #3da5ff;
  --purple: #a855f7;
  --green:  #39e28b;
  --orange: #ff9f45;
  --red:    #ff6b6b;
  --gold:   #ffc85c;

  --radius:    14px;
  --radius-sm: 10px;
  --maxw:      1200px;

  --shadow:    0 18px 50px -12px rgba(0, 0, 0, .7);
  --glow-cyan: 0 0 0 1px rgba(61, 165, 255, .25), 0 0 40px -8px rgba(61, 165, 255, .45);

  --ease: cubic-bezier(.22, .68, .32, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient field: a faint hex weave plus two coloured pools, matching the
   backdrop the dashboard itself sits on. Fixed so it never scroll-jitters. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 620px at 12% -8%,  rgba(61, 165, 255, .13), transparent 62%),
    radial-gradient(820px 560px at 92% 4%,   rgba(168, 85, 247, .13),  transparent 60%),
    radial-gradient(700px 700px at 50% 108%, rgba(61, 165, 255, .07),  transparent 65%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cpath d='M28 0l24 14v28L28 56 4 42V14z' fill='none' stroke='%23ffffff' stroke-opacity='.022'/%3E%3Cpath d='M28 48l24 14v28L28 104 4 90V62z' fill='none' stroke='%23ffffff' stroke-opacity='.022'/%3E%3C/svg%3E");
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
section { padding-block: 108px; position: relative; }
.section-tight { padding-block: 72px; }

/* ---------- type ---------- */
h1, h2, h3, h4 { line-height: 1.14; font-weight: 700; letter-spacing: -.022em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.35rem); }
h2 { font-size: clamp(2rem, 3.9vw, 2.9rem); }
h3 { font-size: 1.28rem; letter-spacing: -.012em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.section-head { max-width: 66ch; margin-bottom: 54px; }
.section-head p { margin-top: 16px; }
.center { text-align: center; margin-inline: auto; }
.center .eyebrow { justify-content: center; }

.grad {
  background: linear-gradient(112deg, #fff 8%, var(--cyan) 52%, var(--purple) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #2d7ee0);
  color: #04040a;
  box-shadow: 0 10px 34px -10px rgba(61, 165, 255, .75);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 42px -10px rgba(61, 165, 255, .9); }
.btn-ghost {
  background: rgba(255, 255, 255, .035);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .07); border-color: #34344a; transform: translateY(-2px); }
.btn-lg { padding: 16px 34px; font-size: 1.02rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 15, .72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border-soft); background: rgba(8, 8, 15, .9); }
.nav-inner { display: flex; align-items: center; gap: 30px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; gap: 30px; margin-left: auto; }
.nav-links a { font-size: .93rem; color: var(--muted); transition: color .18s var(--ease); position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -23px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
}
.nav .btn { padding: 9px 18px; font-size: .89rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
.nav-toggle span + span { margin-top: 5px; }

/* ---------- hero ---------- */
.hero { padding-block: 92px 64px; text-align: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lede { margin-inline: auto; font-size: 1.19rem; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.hero-note { margin-top: 18px; font-size: .88rem; color: var(--faint); }
.hero-note b { color: var(--muted); font-weight: 600; }

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 15px 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 26px;
}
.badge-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* Hero shot: bracketed frame echoing the widget cards in-app. */
.shot {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.shot img { width: 100%; height: auto; }
.shot-hero { margin-top: 62px; }
.shot-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: var(--radius);
  box-shadow: inset 0 0 90px -30px rgba(61, 165, 255, .3);
}
.bracket { position: absolute; width: 22px; height: 22px; pointer-events: none; z-index: 2; opacity: .8; }
.bracket-tl { top: 9px; left: 9px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); border-top-left-radius: 5px; }
.bracket-br { bottom: 9px; right: 9px; border-bottom: 2px solid var(--purple); border-right: 2px solid var(--purple); border-bottom-right-radius: 5px; }

/* ---------- stat strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: var(--bg-2); padding: 30px 24px; text-align: center; }
.stat b { display: block; font-size: 1.95rem; font-weight: 700; letter-spacing: -.03em; }
.stat span { font-size: .84rem; color: var(--faint); }
.stat:nth-child(1) b { color: var(--cyan); }
.stat:nth-child(2) b { color: var(--purple); }
.stat:nth-child(3) b { color: var(--green); }
.stat:nth-child(4) b { color: var(--orange); }

/* ---------- alternating feature rows ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.24fr;
  gap: 68px;
  align-items: center;
}
.feature + .feature { margin-top: 116px; }
.feature.flip .feature-copy { order: 2; }
.feature h2 { margin-bottom: 18px; }
.feature p { color: var(--muted); }
.feature-list { margin-top: 26px; display: grid; gap: 13px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .96rem; color: var(--muted); }
.feature-list .tick {
  flex: none;
  width: 19px; height: 19px;
  margin-top: 3px;
  border-radius: 5px;
  background: rgba(57, 226, 139, .12);
  border: 1px solid rgba(57, 226, 139, .34);
  display: grid;
  place-items: center;
}
.feature-list .tick svg { width: 11px; height: 11px; stroke: var(--green); }
.feature-list b { color: var(--text); font-weight: 600; }

/* ---------- cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: #33334a; background: var(--surface-2); }
.card h3 { margin-bottom: 11px; }
.card p { color: var(--muted); font-size: .95rem; }
.card-ico {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 19px;
  background: rgba(61, 165, 255, .1);
  border: 1px solid rgba(61, 165, 255, .26);
}
.card-ico svg { width: 20px; height: 20px; stroke: var(--cyan); }
.card.p  .card-ico { background: rgba(168, 85, 247, .1); border-color: rgba(168, 85, 247, .26); }
.card.p  .card-ico svg { stroke: var(--purple); }
.card.g  .card-ico { background: rgba(57, 226, 139, .1); border-color: rgba(57, 226, 139, .26); }
.card.g  .card-ico svg { stroke: var(--green); }
.card.o  .card-ico { background: rgba(255, 159, 69, .1); border-color: rgba(255, 159, 69, .26); }
.card.o  .card-ico svg { stroke: var(--orange); }
.card.r  .card-ico { background: rgba(255, 107, 107, .1); border-color: rgba(255, 107, 107, .26); }
.card.r  .card-ico svg { stroke: var(--red); }
.card.gd .card-ico { background: rgba(255, 200, 92, .1); border-color: rgba(255, 200, 92, .26); }
.card.gd .card-ico svg { stroke: var(--gold); }

/* ---------- widget gallery ---------- */
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.wcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.wcard:hover { transform: translateY(-4px); border-color: rgba(61, 165, 255, .5); box-shadow: var(--glow-cyan); }
/* Square pane, matching the app's own card geometry. Previews are letterboxed,
   never cropped, so a tall gauge and a wide bar both stay legible. */
.wcard .thumb {
  aspect-ratio: 1;
  background: #0b0b14;
  display: grid;
  place-items: center;
  padding: 9px;
  border-bottom: 1px solid var(--border-soft);
}
.wcard .thumb img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; }
.wcard .meta { padding: 11px 13px 13px; }
.wcard .meta b { display: block; font-size: .87rem; font-weight: 600; }
.wcard .meta span { font-size: .76rem; color: var(--faint); }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-q {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 25px 46px 25px 0;
  font-size: 1.04rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color .18s var(--ease);
}
.faq-q:hover { color: var(--cyan); }
.faq-q::after {
  content: '';
  position: absolute;
  right: 6px; top: 50%;
  width: 9px; height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  transform: rotate(45deg);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.faq-item.open .faq-q::after { transform: rotate(-135deg); border-color: var(--cyan); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .34s var(--ease); }
.faq-a-inner { padding-bottom: 26px; color: var(--muted); }
.faq-a-inner p + p { margin-top: 13px; }
.faq-a-inner code { font-size: .87em; }
.faq-cat { margin-top: 62px; }
.faq-cat:first-of-type { margin-top: 0; }
.faq-cat > h3 {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}

/* ---------- docs / guide ---------- */
.doc-layout { display: grid; grid-template-columns: 232px 1fr; gap: 60px; align-items: start; }
.toc { position: sticky; top: 96px; }
.toc h4 { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 15px; }
.toc a {
  display: block;
  padding: 7px 0 7px 14px;
  font-size: .89rem;
  color: var(--muted);
  border-left: 2px solid var(--border);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.toc a:hover, .toc a.active { color: var(--text); border-left-color: var(--cyan); }

.doc h2 { margin-bottom: 16px; scroll-margin-top: 92px; }
.doc h3 { margin: 40px 0 12px; }
.doc p { color: var(--muted); margin-bottom: 15px; }
.doc > section { padding-block: 0; margin-bottom: 66px; }
.doc ul.bul { margin: 0 0 18px; display: grid; gap: 9px; }
.doc ul.bul li { padding-left: 20px; position: relative; color: var(--muted); font-size: .96rem; }
.doc ul.bul li::before {
  content: '';
  position: absolute;
  left: 3px; top: .68em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cyan);
}
.doc ol.steps { counter-reset: s; display: grid; gap: 16px; margin-bottom: 20px; }
.doc ol.steps li { counter-increment: s; padding-left: 44px; position: relative; color: var(--muted); }
.doc ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0; top: -1px;
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(61, 165, 255, .1);
  border: 1px solid rgba(61, 165, 255, .28);
}
.doc strong { color: var(--text); }
.doc a.ilink { color: var(--cyan); border-bottom: 1px solid rgba(61,165,255,.35); }
.doc a.ilink:hover { border-bottom-color: var(--cyan); }

/* code */
code {
  font-family: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border-soft);
  padding: .12em .42em;
  border-radius: 5px;
  font-size: .86em;
  color: #b9d9ff;
}
pre {
  background: #0a0a12;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  overflow-x: auto;
  margin: 0 0 22px;
  font-size: .865rem;
  line-height: 1.72;
}
pre code { background: none; border: 0; padding: 0; color: #d5d5e2; font-size: inherit; }
.tok-key  { color: #7fc4ff; }
.tok-str  { color: #8ee6a8; }
.tok-num  { color: #ffb37a; }
.tok-com  { color: #5c5c70; font-style: italic; }
.tok-tag  { color: #ff8fa3; }
.tok-atr  { color: #d9a6ff; }
.tok-fn   { color: #ffd98a; }
.tok-kw   { color: #c58fff; }

.code-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: .79rem;
  color: var(--faint);
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}
.code-head + pre { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.code-head .dots { display: flex; gap: 5px; }
.code-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: #2c2c3c; }

/* tables */
.tbl-wrap { overflow-x: auto; margin-bottom: 22px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .89rem; min-width: 560px; }
th, td { padding: 11px 15px; text-align: left; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
th { background: var(--surface); font-weight: 600; font-size: .79rem; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

/* callouts */
.note {
  border-left: 3px solid var(--cyan);
  background: rgba(61, 165, 255, .05);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 22px;
  font-size: .93rem;
  color: var(--muted);
}
.note b { color: var(--text); }
.note.warn { border-left-color: var(--orange); background: rgba(255, 159, 69, .05); }
.note.good { border-left-color: var(--green); background: rgba(57, 226, 139, .05); }

/* ---------- CTA band ---------- */
.cta {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(61, 165, 255, .14), transparent 70%),
    var(--surface);
  padding: 68px 40px;
  text-align: center;
  overflow: hidden;
}
.cta h2 { margin-bottom: 16px; }
.cta p { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.cta .hero-cta { margin-top: 32px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border-soft); padding-block: 54px 40px; margin-top: 40px; }
.footer-top { display: flex; justify-content: space-between; gap: 44px; flex-wrap: wrap; margin-bottom: 40px; }
.footer-brand { max-width: 300px; }
.footer-brand p { color: var(--faint); font-size: .89rem; margin-top: 13px; }
.footer-cols { display: flex; gap: 68px; flex-wrap: wrap; }
.footer-col h5 { font-size: .74rem; letter-spacing: .15em; text-transform: uppercase; color: var(--faint); margin-bottom: 15px; font-weight: 700; }
.footer-col a { display: block; font-size: .9rem; color: var(--muted); padding: 5px 0; transition: color .18s var(--ease); }
.footer-col a:hover { color: var(--cyan); }
.footer-bot { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--border-soft); font-size: .84rem; color: var(--faint); }

/* ---------- scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  section { padding-block: 76px; }
  .feature { grid-template-columns: 1fr; gap: 34px; }
  .feature.flip .feature-copy { order: 0; }
  .feature + .feature { margin-top: 76px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .doc-layout { grid-template-columns: 1fr; gap: 34px; }
  .toc { position: static; border-bottom: 1px solid var(--border-soft); padding-bottom: 20px; }
  .toc a { display: inline-block; border-left: 0; border-bottom: 2px solid var(--border); padding: 5px 13px 5px 0; margin-right: 11px; }
  .toc a:hover, .toc a.active { border-left: 0; border-bottom-color: var(--cyan); }
}
@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 10, 18, .97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: block; }
  .nav .btn { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-block: 58px 44px; }
  .cta { padding: 48px 24px; }
  .footer-cols { gap: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- the personal note ----------
   Narrower measure than the marketing sections and no card chrome, so it reads
   as someone talking rather than another feature block. */
.why {
  max-width: 62ch;
  margin-inline: auto;
  border-left: 2px solid var(--border);
  padding-left: 28px;
}
.why h2 { margin-bottom: 22px; }
.why p { color: var(--muted); margin-bottom: 16px; }
.why p:last-child { margin-bottom: 0; }
.why-sig {
  font-size: .9rem;
  color: var(--faint) !important;
  padding-top: 8px;
}
@media (max-width: 720px) {
  .why { padding-left: 18px; }
}
