/* ══════════════════════════════════════════════════════════════
   Our Work — products & platforms showcase (pages/work.php)
   ══════════════════════════════════════════════════════════════ */
body { background: #070b14; }

/* Avoner (brand font) is all-caps: keep it for headings, use system fonts for reading text */
.work-hero__sub, .work-project__desc, .work-feature p, .work-cta p,
.work-filter a, .work-hero__stats span, .work-highlight span, .work-cta__ghost,
.mock__body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
.work-feature p, .work-project__desc { text-transform: none; }

.work-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .75rem; letter-spacing: .18em; text-transform: uppercase;
  color: #00AEEF; margin-bottom: 18px;
}
.work-label__dot {
  width: 8px; height: 8px; border-radius: 50%; background: #00AEEF;
  animation: workPing 1.8s ease-out infinite;
}
@keyframes workPing {
  0% { box-shadow: 0 0 0 0 rgba(0,174,239,.55); }
  80%, 100% { box-shadow: 0 0 0 9px rgba(0,174,239,0); }
}
.work-gradient {
  background: linear-gradient(120deg, #00AEEF, #a78bfa 45%, #34d399 80%, #00AEEF);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: workShine 7s linear infinite;
}
@keyframes workShine { to { background-position: 220% center; } }

/* ── Hero ─────────────────────────────────────────────────────── */
.work-hero {
  position: relative; overflow: hidden;
  background: #090e1a;
  padding: calc(var(--header-h, 74px) + 90px) 0 70px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.work-hero__glow {
  position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none;
  animation: workFloat 16s ease-in-out infinite;
}
.work-hero__glow--1 { width: 520px; height: 520px; top: -18%; left: -10%; background: radial-gradient(circle, rgba(0,174,239,.16), transparent 70%); }
.work-hero__glow--2 { width: 480px; height: 480px; bottom: -25%; right: -8%; background: radial-gradient(circle, rgba(167,139,250,.14), transparent 70%); animation-delay: -7s; }
@keyframes workFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(30px,-20px) scale(1.06); }
}
.work-hero__inner { position: relative; z-index: 2; }
.work-hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 4.2rem); line-height: 1.05; color: #fff;
  margin: 0 0 20px; letter-spacing: -.01em;
}
.work-hero__sub { color: rgba(255,255,255,.58); font-size: 1.08rem; line-height: 1.7; max-width: 640px; margin: 0 auto 36px; }
.work-hero__stats {
  display: inline-grid; grid-template-columns: repeat(4, auto); gap: 0;
  border: 1px solid rgba(255,255,255,.08); border-radius: 16px;
  background: rgba(255,255,255,.025); backdrop-filter: blur(6px);
  margin-bottom: 36px; overflow: hidden;
}
.work-hero__stats > div { padding: 16px 28px; border-right: 1px solid rgba(255,255,255,.07); }
.work-hero__stats > div:last-child { border-right: 0; }
.work-hero__stats strong { display: block; color: #fff; font-size: 1.35rem; }
.work-hero__stats span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); }

.work-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.work-filter a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 100px; font-size: .85rem;
  color: rgba(255,255,255,.72); text-decoration: none;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03);
  transition: border-color .25s, color .25s, transform .25s, background .25s;
}
.work-filter a span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.work-filter a:hover { color: #fff; border-color: var(--accent); transform: translateY(-2px); background: rgba(255,255,255,.06); }

/* ── Project sections ─────────────────────────────────────────── */
.work-project {
  position: relative; overflow: hidden;
  padding: 110px 0 100px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  scroll-margin-top: 70px;
}
.work-project:nth-child(even) { background: #090e1a; }
.work-project__glow {
  position: absolute; width: 640px; height: 640px; border-radius: 50%;
  top: 0; right: -220px; pointer-events: none; filter: blur(100px); opacity: .18;
  background: radial-gradient(circle, var(--accent), transparent 65%);
}
.work-project--flip .work-project__glow { right: auto; left: -220px; }
.work-project .container { position: relative; z-index: 1; }

.work-project__top {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center;
  margin-bottom: 56px;
}
.work-project__info, .work-project__visual { min-width: 0; }
.work-project--flip .work-project__info { order: 2; }
.work-project--flip .work-project__visual { order: 1; }

.work-project__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.work-project__num {
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color: var(--accent); font-size: .9rem; letter-spacing: .1em;
}
.work-chip {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 100px;
  color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.12);
}
.work-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 100px;
}
.work-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: workBlink 1.6s ease-in-out infinite; }
.work-status--live      { color: #34d399; background: rgba(52,211,153,.1); }
.work-status--available { color: #38bdf8; background: rgba(56,189,248,.1); }
.work-status--dev       { color: #fbbf24; background: rgba(251,191,36,.1); }
@keyframes workBlink { 50% { opacity: .3; } }

.work-project h2 { font-size: clamp(2rem, 4vw, 3.1rem); color: #fff; line-height: 1.05; margin: 0 0 8px; }
.work-project__tagline { color: var(--accent); font-size: 1.02rem; letter-spacing: .04em; margin-bottom: 18px; }
.work-project__desc { color: rgba(255,255,255,.6); font-size: 1.02rem; line-height: 1.75; margin: 0 0 28px; max-width: 560px; }

.work-highlights { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.work-highlight {
  min-width: 110px; padding: 14px 18px; border-radius: 14px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
  position: relative; overflow: hidden;
}
.work-highlight::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent);
}
.work-highlight strong { display: block; color: #fff; font-size: 1.25rem; }
.work-highlight span { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); }

.work-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.work-tech span {
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-size: .74rem; padding: 5px 11px; border-radius: 8px;
  color: rgba(255,255,255,.6); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
}

/* ── Feature grid ─────────────────────────────────────────────── */
.work-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.work-feature {
  position: relative; padding: 24px 22px; border-radius: 16px;
  background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.07);
  transition: transform .3s, border-color .3s, background .3s, opacity .65s;
  overflow: hidden;
}
.work-feature::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.work-feature:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: rgba(255,255,255,.04); }
.work-feature:hover::after { opacity: 1; }
.work-feature__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.25rem; margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.work-feature h3 { color: #fff; font-size: 1rem; margin: 0 0 8px; letter-spacing: .02em; }
.work-feature p { color: rgba(255,255,255,.52); font-size: .88rem; line-height: 1.6; margin: 0; }

/* ── Mock app window ──────────────────────────────────────────── */
.work-project__visual { perspective: 1200px; }
.mock {
  position: relative; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, #0f1626, #0b111d);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02), 0 0 60px -20px var(--accent);
  transform: rotateY(-6deg) rotateX(3deg);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
  animation: workMockFloat 7s ease-in-out infinite;
}
.work-project--flip .mock { transform: rotateY(6deg) rotateX(3deg); }
.work-project__visual:hover .mock { transform: rotateY(0) rotateX(0); }
@keyframes workMockFloat { 50% { translate: 0 -10px; } }
.mock::before { /* animated accent border sweep */
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, var(--accent) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: workSpin 6s linear infinite;
}
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes workSpin { to { --ang: 360deg; } }
.mock__bar {
  display: flex; align-items: center; gap: 7px; padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02);
}
.mock__bar i { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; opacity: .75; }
.mock__bar i:nth-child(2) { background: #f59e0b; }
.mock__bar i:nth-child(3) { background: #10b981; }
.mock__bar span { margin-left: 10px; font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: .72rem; color: rgba(255,255,255,.35); }
.mock__body { padding: 24px; min-height: 300px; font-size: .85rem; color: rgba(255,255,255,.75); }
.mock__body small { color: rgba(255,255,255,.4); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }

/* invoice */
.inv__head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.inv__head b { display: block; color: #fff; font-size: 1.15rem; }
.inv__qr { display: grid; grid-template-columns: repeat(5, 10px); gap: 3px; padding: 8px; background: #fff; border-radius: 8px; }
.inv__qr i { width: 10px; height: 10px; background: #0b111d; border-radius: 1px; }
.inv__row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed rgba(255,255,255,.08); font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: .8rem; }
.inv__row--total { color: #fff; font-weight: 700; border-bottom: 0; font-size: .95rem; }
.inv__steps { display: flex; gap: 8px; margin-top: 20px; }
.inv__steps span { flex: 1; text-align: center; padding: 9px 6px; border-radius: 9px; font-size: .74rem; background: rgba(16,185,129,.1); color: #34d399; border: 1px solid rgba(16,185,129,.25); }
.inv__steps .pulse { animation: workGlow 2.2s ease-in-out infinite; }
@keyframes workGlow { 50% { box-shadow: 0 0 22px rgba(16,185,129,.45); background: rgba(16,185,129,.2); } }

/* store */
.st__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.st__kpis div { padding: 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.st__kpis b { display: block; color: #fff; font-size: 1.15rem; margin-top: 4px; }
.st__chart { display: flex; align-items: flex-end; gap: 7px; height: 130px; padding: 0 2px; border-bottom: 1px solid rgba(255,255,255,.08); }
.st__chart i { flex: 1; height: var(--h); border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--accent), rgba(0,174,239,.15)); transform-origin: bottom; animation: workGrow 2.8s cubic-bezier(.2,.7,.2,1) var(--d) infinite alternate; }
@keyframes workGrow { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.st__toast { margin-top: 16px; padding: 10px 14px; border-radius: 10px; background: rgba(0,174,239,.1); border: 1px solid rgba(0,174,239,.25); color: #7dd3fc; font-size: .8rem; animation: workToast 5s ease-in-out infinite; }
@keyframes workToast { 0%, 12% { opacity: 0; transform: translateY(8px); } 22%, 80% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; } }

/* ai */
.ai__msg { padding: 12px 15px; border-radius: 14px; margin-bottom: 12px; line-height: 1.55; max-width: 92%; }
.ai__msg--q { margin-left: auto; background: rgba(167,139,250,.16); color: #e9e3ff; border-bottom-right-radius: 4px; }
.ai__msg--a { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-bottom-left-radius: 4px; position: relative; min-height: 46px; }
.ai__msg--a em { display: block; margin-top: 6px; font-style: normal; color: #c4b5fd; font-size: .74rem; }
.ai__typing { position: absolute; left: 15px; top: 17px; display: flex; gap: 4px; animation: workHideTyping 6s infinite; }
.ai__typing i { width: 6px; height: 6px; border-radius: 50%; background: #a78bfa; animation: workDot 1s infinite; }
.ai__typing i:nth-child(2) { animation-delay: .15s; } .ai__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes workDot { 50% { transform: translateY(-4px); opacity: .4; } }
.ai__text { animation: workShowText 6s infinite; }
@keyframes workHideTyping { 0%, 30% { opacity: 1; } 34%, 100% { opacity: 0; } }
@keyframes workShowText { 0%, 32% { opacity: 0; } 38%, 94% { opacity: 1; } 100% { opacity: 0; } }
.ai__bars { margin-top: 18px; display: grid; gap: 10px; }
.ai__bars div { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; font-size: .74rem; color: rgba(255,255,255,.5); }
.ai__bars i { height: 8px; border-radius: 6px; background: linear-gradient(90deg, #a78bfa, #00AEEF); width: var(--w); animation: workWidth 3s ease-in-out infinite alternate; transform-origin: left; }
@keyframes workWidth { from { transform: scaleX(.55); } to { transform: scaleX(1); } }

/* cms */
.cm { display: grid; grid-template-columns: 46px 1fr; gap: 16px; }
.cm__side { display: grid; gap: 10px; align-content: start; }
.cm__side i { height: 30px; border-radius: 8px; background: rgba(255,255,255,.05); }
.cm__side i.on { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.cm__field { margin-bottom: 16px; }
.cm__input { margin-top: 6px; padding: 11px 13px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: rgba(255,255,255,.03); color: #fff; font-size: .9rem; }
.cm__type { display: inline-block; overflow: hidden; white-space: nowrap; border-right: 2px solid var(--accent); width: 0; vertical-align: bottom; animation: workType 6s steps(27) infinite, workCaret .8s step-end infinite; }
@keyframes workType { 0% { width: 0; } 40%, 85% { width: 27ch; } 100% { width: 0; } }
@keyframes workCaret { 50% { border-color: transparent; } }
.cm__blocks { margin-top: 6px; display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.cm__blocks i { height: 54px; border-radius: 9px; background: rgba(255,255,255,.05); border: 1px dashed rgba(255,255,255,.12); }
.cm__blocks i:first-child { grid-row: span 2; height: auto; background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(255,255,255,.03)); }
.cm__save { display: inline-block; padding: 9px 18px; border-radius: 9px; background: var(--accent); color: #111; font-weight: 700; font-size: .8rem; animation: workGlowAmber 2.5s ease-in-out infinite; }
@keyframes workGlowAmber { 50% { box-shadow: 0 0 22px rgba(245,158,11,.5); } }

/* warehouse */
.wh__row { display: grid; grid-template-columns: 86px 1fr 40px; align-items: center; gap: 12px; margin-bottom: 15px; font-size: .78rem; }
.wh__row b { color: #fff; text-align: right; }
.wh__bar { height: 10px; border-radius: 8px; background: rgba(255,255,255,.06); overflow: hidden; }
.wh__bar i { display: block; height: 100%; width: var(--w); border-radius: 8px; background: linear-gradient(90deg, #0ea5e9, #38bdf8); transform-origin: left; animation: workFill 2.6s cubic-bezier(.2,.7,.2,1) var(--d) infinite alternate; }
.wh__bar i.low { background: linear-gradient(90deg, #ef4444, #f97316); }
@keyframes workFill { from { transform: scaleX(.2); } to { transform: scaleX(1); } }
.wh__flow { display: flex; align-items: center; gap: 6px; margin-top: 26px; }
.wh__flow span { padding: 8px 10px; border-radius: 8px; font-size: .72rem; background: rgba(56,189,248,.1); color: #7dd3fc; border: 1px solid rgba(56,189,248,.25); white-space: nowrap; }
.wh__flow em { flex: 1; height: 2px; background: linear-gradient(90deg, rgba(56,189,248,.1), #38bdf8, rgba(56,189,248,.1)); background-size: 200% 100%; animation: workFlow 1.6s linear infinite; }
@keyframes workFlow { to { background-position: -200% 0; } }

/* news */
.nw__ticker { display: flex; align-items: center; border-radius: 8px; overflow: hidden; background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.25); margin-bottom: 16px; }
.nw__ticker b { background: #ef4444; color: #fff; padding: 8px 12px; font-size: .7rem; letter-spacing: .1em; flex-shrink: 0; }
.nw__ticker div { overflow: hidden; white-space: nowrap; display: flex; flex: 1; min-width: 0; }
.nw__ticker span { display: inline-block; padding-left: 12px; font-size: .78rem; animation: workMarquee 14s linear infinite; }
@keyframes workMarquee { to { transform: translateX(-100%); } }
.nw__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; margin-bottom: 16px; }
.nw__lead { height: 140px; border-radius: 10px; background: linear-gradient(135deg, rgba(239,68,68,.35), rgba(255,255,255,.04)), repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 10px, transparent 10px 20px); animation: workShimmer 3s ease-in-out infinite; }
.nw__side { display: grid; gap: 10px; }
.nw__side i { border-radius: 8px; background: rgba(255,255,255,.05); }
.nw__lines { display: grid; gap: 9px; }
.nw__lines i { height: 8px; border-radius: 6px; background: rgba(255,255,255,.07); }
@keyframes workShimmer { 50% { filter: brightness(1.35); } }

/* ── CTA ──────────────────────────────────────────────────────── */
.work-cta { position: relative; overflow: hidden; padding: 120px 0; text-align: center; background: #070b14; }
.work-cta__inner { position: relative; z-index: 2; }
.work-cta h2 { font-size: clamp(2rem, 4vw, 3rem); color: #fff; margin: 0 0 16px; }
.work-cta p { color: rgba(255,255,255,.55); max-width: 560px; margin: 0 auto 32px; line-height: 1.7; }
.work-cta__actions { display: flex; gap: 22px; justify-content: center; align-items: center; flex-wrap: wrap; }
.work-cta .btn--lg, .work-hero .btn--lg { padding: 15px 34px; font-size: 1rem; }
.work-cta__ghost { color: rgba(255,255,255,.65); text-decoration: none; transition: color .2s; }
.work-cta__ghost:hover { color: #fff; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .work-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .work-project__top { grid-template-columns: 1fr; gap: 40px; }
  .work-project--flip .work-project__info,
  .work-project--flip .work-project__visual { order: 0; }
  .mock, .work-project--flip .mock { transform: none; }
}
@media (max-width: 640px) {
  .work-hero { padding: calc(var(--header-h, 64px) + 64px) 0 56px; }
  .work-hero__stats { grid-template-columns: repeat(2, 1fr); width: 100%; }
  .work-hero__stats > div { padding: 14px 10px; border-bottom: 1px solid rgba(255,255,255,.07); }
  .work-hero__stats > div:nth-child(2) { border-right: 0; }
  .work-hero__stats > div:nth-child(n+3) { border-bottom: 0; }
  .work-project { padding: 72px 0 64px; }
  .work-features { grid-template-columns: 1fr; gap: 10px; }
  .work-feature { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; padding: 16px; align-items: start; }
  .work-feature__icon { width: 40px; height: 40px; font-size: 1.1rem; margin: 0; grid-row: span 2; }
  .work-feature h3 { margin: 2px 0 4px; font-size: .95rem; }
  .work-feature p { font-size: .84rem; }
  .mock__body { padding: 18px; min-height: 0; }
  .wh__row { grid-template-columns: 70px 1fr 36px; }
  .wh__flow span { padding: 7px 6px; font-size: .64rem; }
}
@media (prefers-reduced-motion: reduce) {
  .work-hero *, .work-project *, .work-cta * { animation: none !important; }
  .cm__type { width: 27ch; }
  .ai__typing { display: none; } .ai__text { opacity: 1; }
}
