/* =========================================================
   SK Teknix LLC — design system layer on top of Tailwind (CDN)
   Palette: slate black #0A0F1D, electric blue #2563EB, emerald #10B981
   ========================================================= */

:root {
  --ink: #0A0F1D;
  --ink-2: #0E1426;
  --ink-3: #141C33;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #CBD5E1;
  --muted: #94A3B8;
  --white: #F8FAFC;
  --accent: #2563EB;
  --accent-soft: #3B82F6;
  --growth: #10B981;
  --danger: #F43F5E;
  --radius: 14px;
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

html { scroll-padding-top: calc(var(--header-h) + 16px); }
body { background: var(--ink); color: var(--text); overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
::selection { background: rgba(37, 99, 235, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 6px; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 60;
  padding: 8px 14px; border-radius: 8px; background: var(--accent); color: #fff;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Header & navigation ---------- */
.site-header {
  background: rgba(10, 15, 29, .7);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(10, 15, 29, .9); }

.logo-mark { width: 40px; height: 40px; flex: none; transition: transform .5s var(--ease), filter .5s var(--ease); }
.logo:hover .logo-mark { transform: translateY(-2px) rotate(-4deg); filter: drop-shadow(0 6px 12px rgba(16, 185, 129, .45)); }
.logo-x { background: linear-gradient(135deg, #3B82F6, #10B981); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-link {
  padding: 8px 12px; border-radius: 8px;
  font-size: .9rem; font-weight: 500; color: var(--muted);
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--white); background: rgba(148, 163, 184, .08); }
.nav-link.is-active { color: var(--white); background: rgba(37, 99, 235, .18); }

.mobile-menu { border-top: 1px solid var(--line); background: rgba(10, 15, 29, .97); }
.mobile-menu .nav-link { display: block; padding: 12px 14px; font-size: 1rem; }

.menu-toggle {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-toggle span { width: 18px; height: 2px; border-radius: 2px; background: var(--white); transition: transform .25s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.icon-btn {
  position: relative; width: 40px; height: 40px; flex: none; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--white);
  transition: border-color .2s, background .2s;
}
.icon-btn:hover { border-color: var(--line-strong); background: rgba(148, 163, 184, .08); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.25rem; border-radius: 10px;
  font-weight: 600; font-size: .95rem; line-height: 1.2; white-space: nowrap;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 28px -12px rgba(37, 99, 235, .9); }
.btn-primary:hover:not(:disabled) { background: var(--accent-soft); }
.btn-growth { background: var(--growth); color: #04130d; box-shadow: 0 10px 28px -12px rgba(16, 185, 129, .8); }
.btn-growth:hover:not(:disabled) { background: #34D399; }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--white); background: rgba(148, 163, 184, .04); }
.btn-ghost:hover { border-color: rgba(148, 163, 184, .5); background: rgba(148, 163, 184, .1); }

/* ---------- Surfaces ---------- */
.card {
  background: linear-gradient(180deg, rgba(20, 28, 51, .72), rgba(14, 20, 38, .72));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.card-hover { transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.card-hover:hover { transform: translateY(-4px); border-color: rgba(59, 130, 246, .45); box-shadow: 0 24px 50px -28px rgba(37, 99, 235, .6); }
.card-hover.is-growth:hover { border-color: rgba(16, 185, 129, .45); box-shadow: 0 24px 50px -28px rgba(16, 185, 129, .55); }

/* Cursor-following glow; JS sets --mx / --my */
.spotlight { position: relative; overflow: hidden; isolation: isolate; }
.spotlight::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(59, 130, 246, .13), transparent 42%);
  opacity: 0; transition: opacity .3s;
}
.spotlight.is-growth::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(16, 185, 129, .12), transparent 42%); }
.spotlight:hover::before { opacity: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-soft);
}
.eyebrow::before { content: ''; width: 20px; height: 1px; background: currentColor; }
.eyebrow.is-growth { color: var(--growth); }

.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 500; line-height: 1.4; white-space: nowrap;
  color: var(--text); border: 1px solid var(--line); background: rgba(148, 163, 184, .06);
}
.chip-accent { color: #93C5FD; border-color: rgba(59, 130, 246, .35); background: rgba(37, 99, 235, .12); }
.chip-growth { color: #6EE7B7; border-color: rgba(16, 185, 129, .35); background: rgba(16, 185, 129, .12); }
.chip-violet { color: #C4B5FD; border-color: rgba(139, 92, 246, .35); background: rgba(139, 92, 246, .12); }
.chip-warn { color: #FCD34D; border-color: rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .1); }
.chip-danger { color: #FDA4AF; border-color: rgba(244, 63, 94, .35); background: rgba(244, 63, 94, .1); }
.chip-muted { color: var(--muted); }

.filter-chip {
  padding: .45rem .95rem; border-radius: 999px; font-size: .85rem; font-weight: 500;
  color: var(--text); border: 1px solid var(--line-strong); background: rgba(148, 163, 184, .04);
  transition: background .2s, border-color .2s, color .2s;
}
.filter-chip:hover { border-color: rgba(148, 163, 184, .5); color: var(--white); }
.filter-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.text-gradient {
  background: linear-gradient(90deg, #fff 0%, #93C5FD 45%, #6EE7B7 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.icon-tile { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.icon-tile svg { width: 24px; height: 24px; }

/* ---------- Tech backdrops ---------- */
.tech-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
}
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; pointer-events: none; animation: drift 18s ease-in-out infinite alternate; }
.glow-blue { background: radial-gradient(circle, rgba(37, 99, 235, .9), transparent 70%); }
.glow-green { background: radial-gradient(circle, rgba(16, 185, 129, .65), transparent 70%); animation-delay: -7s; }
@keyframes drift { to { transform: translate3d(40px, -30px, 0) scale(1.12); } }

/* Hero orbit visual */
.orbit-wrap { position: relative; aspect-ratio: 1; width: 100%; max-width: 460px; margin-inline: auto; }
.orbit {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, .22); transform: translate(-50%, -50%);
  animation: spin var(--speed, 30s) linear infinite;
}
.orbit::after {
  content: ''; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: var(--dot, var(--accent-soft)); box-shadow: 0 0 16px 2px var(--dot, var(--accent-soft));
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.orbit-core {
  position: absolute; top: 50%; left: 50%; width: 36%; aspect-ratio: 1; transform: translate(-50%, -50%);
  display: grid; place-items: center;
  filter: drop-shadow(0 0 28px rgba(37, 99, 235, .55)) drop-shadow(0 0 60px rgba(16, 185, 129, .25));
  animation: core-pulse 6s ease-in-out infinite;
}
@keyframes core-pulse { 50% { transform: translate(-50%, -50%) scale(1.04); } }
.orbit-label { position: absolute; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- Timeline ---------- */
.timeline { position: relative; }
.timeline::before, .timeline-progress { content: ''; position: absolute; left: 15px; top: 0; width: 2px; border-radius: 2px; }
.timeline::before { bottom: 0; background: var(--line); }
.timeline-progress { height: 0; background: linear-gradient(var(--accent), var(--growth)); box-shadow: 0 0 12px rgba(37, 99, 235, .6); }
.timeline-item { position: relative; padding-left: 48px; }
.timeline-dot {
  position: absolute; left: 8px; top: 22px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--accent-soft); box-shadow: 0 0 0 5px var(--ink);
}
.timeline-item.is-done .timeline-dot { background: var(--accent-soft); }
.timeline-item.is-planned .timeline-dot { border-style: dashed; border-color: var(--muted); }
@media (min-width: 768px) {
  .timeline::before, .timeline-progress { left: 50%; margin-left: -1px; }
  .timeline-item { width: 50%; padding: 0 48px 0 0; text-align: right; }
  .timeline-item:nth-child(even) { margin-left: 50%; padding: 0 0 0 48px; text-align: left; }
  .timeline-item .timeline-dot { left: auto; right: -8px; }
  .timeline-item:nth-child(even) .timeline-dot { right: auto; left: -8px; }
}

/* ---------- Forms ---------- */
.field label, .field .label { display: block; margin-bottom: .4rem; font-size: .85rem; font-weight: 500; color: var(--white); }
.field .optional { color: var(--muted); font-weight: 400; }
.field label:has(> .checkbox) { color: var(--muted); font-weight: 400; }
.input {
  width: 100%; min-width: 0; padding: .7rem .9rem; border-radius: 10px;
  background: rgba(10, 15, 29, .6); border: 1px solid var(--line-strong);
  color: var(--white); font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: #64748B; }
.input:focus { outline: none; border-color: var(--accent-soft); box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
textarea.input { resize: vertical; min-height: 140px; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 2.5rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 16px;
}
select.input option { background: var(--ink-2); color: var(--white); }
.field.has-error .input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(244, 63, 94, .16); }
.field.is-valid .input { border-color: rgba(16, 185, 129, .55); }
.field-error { min-height: 1.15rem; margin-top: .35rem; font-size: .8rem; color: #FB7185; }
.char-count { font-size: .75rem; color: #64748B; font-variant-numeric: tabular-nums; }
.char-count.is-near { color: #FCD34D; }
.checkbox { width: 1.05rem; height: 1.05rem; margin-top: .15rem; flex: none; accent-color: var(--accent); }

/* ---------- Toasts ---------- */
#toast-root {
  position: fixed; z-index: 70; left: 16px; right: 16px; bottom: 16px;
  display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: .7rem; width: 100%; max-width: 400px;
  padding: .85rem 1rem; border-radius: 12px; background: #111a30; border: 1px solid var(--line-strong);
  color: var(--white); font-size: .9rem; line-height: 1.45; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: none; }
.toast-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.toast-icon svg { width: 13px; height: 13px; stroke-width: 3; }
.toast-success { border-color: rgba(16, 185, 129, .45); }
.toast-success .toast-icon { background: var(--growth); color: #04130d; }
.toast-error { border-color: rgba(244, 63, 94, .5); }
.toast-error .toast-icon { background: var(--danger); color: #fff; }
.toast-info .toast-icon { background: var(--accent); color: #fff; }

/* ---------- Avatars ---------- */
.avatar {
  --h: 220;
  width: 72px; height: 72px; flex: none; border-radius: 20px; display: grid; place-items: center;
  font-family: "Space Grotesk", Inter, sans-serif; font-size: 1.5rem; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 75% 50%), hsl(calc(var(--h) + 45) 70% 28%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}

/* ---------- Scroll reveal (only hidden when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

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