/* ===== Digitimize — shared styles ===== */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

html { scroll-behavior: smooth; }

body { overflow-x: hidden; }

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 500px at 15% -5%, rgba(220,38,38,0.16), transparent 60%),
    radial-gradient(500px 500px at 90% 10%, rgba(251,146,60,0.10), transparent 60%);
  animation: ambientDrift 18s ease-in-out infinite alternate;
}
@keyframes ambientDrift {
  0%   { background-position: 0% 0%, 0% 0%; }
  100% { background-position: 4% 3%, -3% 4%; }
}

#site-header.scrolled {
  background: rgba(8,8,12,0.75);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

:focus-visible { outline: 2px solid #fb923c; outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 11px; font-weight: 600; font-size: 14px;
  background: linear-gradient(120deg, #dc2626, #f43f5e 60%, #fb923c);
  color: #07070b;
  transition: transform .2s ease, box-shadow .25s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(220,38,38,.55); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 11px; font-weight: 500; font-size: 14px;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.02); color: #fff;
  transition: background .25s ease, border-color .2s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.3); }

/* ---------- cards ---------- */
.card {
  background: #121218; border: 1px solid rgba(255,255,255,0.08); border-radius: 18px;
  transition: border-color .25s ease, transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.card:hover { border-color: rgba(220,38,38,0.45); background: #17171f; transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5); }

/* ---------- 3D tilt (applied via JS on elements with [data-tilt]) ---------- */
[data-tilt] {
  transform-style: preserve-3d;
  transition: transform .3s ease;
  will-change: transform;
}

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

/* ---------- gradient text ---------- */
.grad-text {
  background: linear-gradient(120deg, #dc2626, #f43f5e 60%, #fb923c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- marquee ---------- */
.marquee-track { display: flex; width: max-content; gap: 64px; animation: marquee 26s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- pulse ---------- */
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #f87171;
  box-shadow: 0 0 0 0 rgba(248,113,113,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(248,113,113,.55); }
  70% { box-shadow: 0 0 0 8px rgba(248,113,113,0); }
  100% { box-shadow: 0 0 0 0 rgba(248,113,113,0); }
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(4,4,7,0.75); backdrop-filter: blur(4px);
  z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-panel {
  background: #121218; border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
  max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto;
  transform: translateY(16px) scale(.98); transition: transform .25s ease;
}
.modal-backdrop.open .modal-panel { transform: translateY(0) scale(1); }

/* ---------- prose (blog / service rich text) ---------- */
.prose-custom :is(h2,h3) { font-family:'Space Grotesk',sans-serif; margin-top:1.6em; margin-bottom:.5em; font-weight:600; }
.prose-custom p { margin-bottom: 1em; color: #b4b4bc; line-height: 1.75; }
.prose-custom ul { margin-bottom: 1em; padding-left: 1.3em; list-style: disc; color: #b4b4bc; }
.prose-custom a { color: #f43f5e; text-decoration: underline; }
.prose-custom img { border-radius: 14px; margin: 1.4em 0; }

/* ---------- code editor (CodePen-style) ---------- */
.editor-shell { background:#0d0d12; border:1px solid rgba(255,255,255,.08); border-radius: 14px; overflow:hidden; display:flex; flex-direction:column; }
.editor-tabbar { display:flex; align-items:center; gap:8px; padding:10px 14px; border-bottom:1px solid rgba(255,255,255,.08); background:#111116; }
.editor-tabbar .dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.editor-tabbar .dot-html { background:#f97316; }
.editor-tabbar .dot-css  { background:#38bdf8; }
.editor-tabbar .dot-js   { background:#facc15; }
.editor-tabbar .dot-preview { background:#4ade80; }
.editor-tabbar .name { font-family:'JetBrains Mono',monospace; font-size:11.5px; text-transform:uppercase; letter-spacing:.08em; color:#c4c4cc; }
.editor-shell textarea {
  flex: 1; width:100%; min-height: 220px; background: #0a0a0e; color:#e4e4e7; font-family:'JetBrains Mono',monospace;
  font-size: 13px; padding: 14px; border: none; resize: none; line-height: 1.65; tab-size: 2;
}
.editor-shell textarea:focus { outline: none; background:#0c0c11; }
.editor-shell textarea::placeholder { color:#4b4b55; }
#previewFrame { background:#fff; border:none; }

/* ---------- code editor: preview device toggle ---------- */
.device-btn { display:flex; align-items:center; gap:6px; padding:6px 12px; border-radius:8px; font-size:12px; color:#a1a1aa; border:1px solid transparent; cursor:pointer; background:transparent; transition:.2s; }
.device-btn:hover { color:#fff; background:rgba(255,255,255,.05); }
.device-btn.active { background:rgba(220,38,38,.14); color:#fff; border-color:rgba(220,38,38,.35); }
.preview-viewport { flex:1; overflow:auto; display:flex; align-items:flex-start; justify-content:center; background:#191920; padding:18px; }
.preview-viewport iframe { background:#fff; border:none; border-radius:8px; box-shadow:0 0 0 1px rgba(255,255,255,.08); width:100%; height:100%; max-width:100%; transition: width .25s ease; }
.preview-viewport.is-tablet iframe { width:768px; height:100%; }
.preview-viewport.is-mobile iframe { width:375px; height:100%; }

/* ---------- search results ---------- */
.search-result a.title { color: #93c5fd; font-size: 16px; }
.search-result .link { color: #86efac; font-size: 12.5px; }

/* ---------- scrollbar (subtle) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #08080c; }
::-webkit-scrollbar-thumb { background: #26262e; border-radius: 6px; }
