/* Byte Bastler — shared styles for industry demo websites.
   Each demo sets its own theme tokens in a <style> block. */

:root {
  --bar-h: 44px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --radius: 20px;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: var(--display-w, 600); line-height: 1.08; letter-spacing: var(--display-ls, -0.02em); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- Byte Bastler demo bar ---- */
.demo-bar {
  position: fixed; inset: 0 0 auto; z-index: 60; height: var(--bar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter);
  background: #060a1c; color: #c9d4ff; font: 500 13px/1 "DM Sans", system-ui, sans-serif;
  border-bottom: 1px solid rgba(150, 178, 255, .16);
}
.demo-bar .bb { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; white-space: nowrap; }
.demo-bar .bb svg { width: 20px; height: 20px; }
.demo-bar .note { opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-bar .sp { flex: 1; }
.demo-bar a.lnk { color: #c9d4ff; padding: 7px 10px; border-radius: 8px; white-space: nowrap; }
.demo-bar a.lnk:hover { background: rgba(255,255,255,.08); color: #fff; }
.demo-bar a.get { background: #2450f0; color: #fff; padding: 8px 12px; border-radius: 9px; font-weight: 700; white-space: nowrap; }
.demo-bar a.get:hover { background: #1a3cc0; }
@media (max-width: 760px) { .demo-bar .note, .demo-bar .lnk-hide { display: none; } }

/* ---- nav ---- */
.d-nav { position: absolute; top: var(--bar-h); left: 0; right: 0; z-index: 20; }
.d-nav .wrap { display: flex; align-items: center; gap: 28px; height: 84px; }
.d-logo { font-family: var(--display); font-weight: var(--display-w, 600); font-size: 24px; letter-spacing: var(--display-ls, -0.02em); color: var(--hero-ink); display: inline-flex; align-items: center; gap: 10px; }
.d-logo i { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }
.d-links { display: flex; gap: 26px; margin-left: auto; font-weight: 500; font-size: 15px; color: var(--hero-muted); }
.d-links a:hover { color: var(--hero-ink); }
@media (max-width: 860px) { .d-links { display: none; } .d-nav .d-btn { margin-left: auto; } }

/* ---- buttons ---- */
.d-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: var(--btn-r, 999px); font-weight: 700; font-size: 15px; line-height: 1;
  background: var(--accent); color: var(--accent-ink); border: 1px solid transparent;
  transition: transform .3s var(--ease), box-shadow .3s, background-color .3s;
  box-shadow: 0 12px 28px -12px var(--accent);
}
.d-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px var(--accent); }
.d-btn.ghost { background: transparent; color: var(--hero-ink); border-color: var(--hero-line); box-shadow: none; }
.d-btn.ghost:hover { background: var(--hero-line); }
.d-btn.lg { padding: 17px 28px; font-size: 16px; }

/* ---- hero ---- */
.d-hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--bar-h) + 110px) 0 90px; overflow: hidden; isolation: isolate;
  background: var(--hero-bg); color: var(--hero-ink);
}
.d-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.d-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 140px; z-index: 1; background: linear-gradient(transparent, var(--hero-fade, transparent)); pointer-events: none; }
.d-hero .wrap { position: relative; z-index: 2; width: 100%; }
.d-hero-copy { max-width: 560px; display: flex; flex-direction: column; gap: 22px; }
.d-eyebrow { align-self: flex-start; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2, var(--accent)); display: inline-flex; align-items: center; gap: 10px; }
.d-eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.d-hero h1 { font-size: clamp(42px, 6.4vw, 84px); }
.d-hero h1 em { font-style: var(--em-style, italic); color: var(--accent-2, var(--accent)); }
.d-hero-copy > p { font-size: clamp(16.5px, 1.5vw, 19px); color: var(--hero-muted); max-width: 500px; }
.d-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.d-meta { display: flex; flex-wrap: wrap; gap: 14px 30px; margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--hero-line); }
.d-meta div { display: flex; flex-direction: column; }
.d-meta b { font-family: var(--display); font-size: 24px; font-weight: var(--display-w, 600); }
.d-meta span { font-size: 13px; color: var(--hero-muted); }
.d-hero-copy > * { opacity: 0; transform: translateY(24px); animation: dIn .9s var(--ease) forwards; }
.d-hero-copy > *:nth-child(2) { animation-delay: .1s; } .d-hero-copy > *:nth-child(3) { animation-delay: .22s; }
.d-hero-copy > *:nth-child(4) { animation-delay: .34s; } .d-hero-copy > *:nth-child(5) { animation-delay: .46s; }
@keyframes dIn { to { opacity: 1; transform: none; } }
@media (max-width: 979px) {
  .d-hero { align-items: flex-start; padding-bottom: 420px; }
  .d-hero canvas { top: auto; bottom: 0; height: 440px; }
}
@media (max-width: 639px) { .d-hero { padding-bottom: 360px; } .d-hero canvas { height: 380px; } .d-actions .d-btn { flex: 1 1 100%; } }
@media (max-width: 480px) { .d-nav .d-btn { display: none; } .d-logo { font-size: 21px; } }

/* ---- sections ---- */
.d-sec { padding: clamp(72px, 10vw, 128px) 0; }
.d-sec.alt { background: var(--bg2); }
.d-head { display: flex; flex-direction: column; gap: 14px; max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.d-head h2 { font-size: clamp(32px, 4.4vw, 54px); }
.d-head p { color: var(--muted); font-size: 17.5px; }
.d-head .d-eyebrow { color: var(--accent); }

.d-cards { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 20px; }
@media (max-width: 980px) { .d-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .d-cards { grid-template-columns: 1fr; } }
.d-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .4s;
}
.d-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px var(--shadow, rgba(0,0,0,.35)); }
.d-art {
  position: relative; height: 170px; border-radius: calc(var(--radius) - 6px); margin-bottom: 8px; overflow: hidden;
  background: linear-gradient(140deg, var(--a1), var(--a2));
}
.d-art::before, .d-art::after { content: ""; position: absolute; border-radius: 50%; }
.d-art::before { width: 150px; height: 150px; right: -30px; top: -40px; background: rgba(255,255,255,.18); }
.d-art::after { width: 90px; height: 90px; left: 24px; bottom: -30px; background: rgba(0,0,0,.12); }
.d-art span { position: absolute; left: 18px; top: 16px; z-index: 1; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.22); padding: 6px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.d-art b { position: absolute; right: 18px; bottom: 12px; z-index: 1; font-family: var(--display); font-size: 64px; line-height: 1; color: rgba(255,255,255,.9); }
.d-card h3 { font-size: 22px; }
.d-card p { color: var(--muted); font-size: 15px; }
.d-card .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; }
.d-card .price { font-family: var(--display); font-size: 20px; font-weight: var(--display-w, 600); color: var(--ink); }
.d-card .row a { font-weight: 700; font-size: 14px; color: var(--accent); }

.d-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .d-split { grid-template-columns: 1fr; } }
.d-split .d-head { margin-bottom: 0; }
.d-steps { display: grid; gap: 14px; counter-reset: s; }
.d-steps li {
  counter-increment: s; display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start;
  padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
}
.d-steps li::before {
  content: counter(s, decimal-leading-zero); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-size: 18px; font-weight: 700;
}
.d-steps h3 { font-size: 19px; margin-bottom: 4px; }
.d-steps p { color: var(--muted); font-size: 15px; }

.d-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.d-stats div { background: var(--card); padding: 28px 24px; }
.d-stats b { display: block; font-family: var(--display); font-size: clamp(30px, 3.6vw, 44px); font-weight: var(--display-w, 600); color: var(--accent); line-height: 1.1; }
.d-stats span { color: var(--muted); font-size: 14.5px; }
@media (max-width: 800px) { .d-stats { grid-template-columns: repeat(2, 1fr); } }

.d-cta { padding: clamp(64px, 9vw, 110px) 0; background: var(--cta-bg, var(--accent)); color: var(--cta-ink, var(--accent-ink)); text-align: center; position: relative; overflow: hidden; }
.d-cta::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; left: -160px; top: -260px; background: rgba(255,255,255,.12); }
.d-cta .wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.d-cta h2 { font-size: clamp(32px, 4.6vw, 58px); max-width: 820px; }
.d-cta p { opacity: .85; font-size: 18px; max-width: 560px; }
.d-cta .d-btn { background: var(--cta-btn, #fff); color: var(--cta-btn-ink, #111); box-shadow: none; }

.d-foot { padding: 40px 0; background: var(--foot-bg, var(--bg)); color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.d-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.d-foot a { color: var(--accent); font-weight: 600; }

/* reveal */
.js [data-r] { opacity: 0; transform: perspective(1000px) translateY(40px) rotateX(10deg); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.js [data-r].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .d-hero-copy > *, .js [data-r] { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
}
