/* ============================================================
   Skyforix — theme layer on top of Tailwind
   ============================================================ */

:root {
  --sky: #0ea5e9;
  --indigo: #6366f1;
  --bg: #05070d;
  --card: #0b1220;
  --line: rgba(255, 255, 255, 0.08);
}

html { scroll-padding-top: 110px; }
body { background-color: var(--bg); }

/* ---------- Glass surfaces ---------- */
.glass-panel {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.72), rgba(6, 11, 25, 0.55));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glass-soft {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---------- Ambient grid ---------- */
.grid-overlay {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- Gradient text ---------- */
.text-gradient {
  background: linear-gradient(120deg, #e2e8f0 0%, #7dd3fc 45%, #a5b4fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-accent {
  background: linear-gradient(120deg, #38bdf8, #818cf8 60%, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Gradient border cards ---------- */
.border-glow {
  position: relative;
  isolation: isolate;
}
.border-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.5), transparent 40%, rgba(129, 140, 248, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}
.border-glow:hover::before { opacity: 1; }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Header shrink state ---------- */
#site-header.is-scrolled #nav-shell {
  background: rgba(2, 6, 18, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
}

/* ---------- Prose (blog / detail bodies) ---------- */
.prose-sky {
  color: #cbd5e1;
  font-weight: 300;
  line-height: 1.85;
  font-size: 1.0625rem;
}
.prose-sky h2 {
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 2.6rem 0 1rem;
  letter-spacing: -0.01em;
}
.prose-sky h3 {
  font-family: 'Space Grotesk', sans-serif;
  color: #f1f5f9;
  font-weight: 600;
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}
.prose-sky p { margin-bottom: 1.35rem; }
.prose-sky a { color: #38bdf8; text-decoration: underline; text-underline-offset: 3px; }
.prose-sky a:hover { color: #7dd3fc; }
.prose-sky strong { color: #fff; font-weight: 600; }
.prose-sky ul, .prose-sky ol { margin: 0 0 1.35rem 1.25rem; }
.prose-sky ul { list-style: disc; }
.prose-sky ol { list-style: decimal; }
.prose-sky li { margin-bottom: 0.6rem; padding-left: 0.35rem; }
.prose-sky li::marker { color: #38bdf8; }
.prose-sky blockquote {
  border-left: 3px solid #0ea5e9;
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 2rem 0;
  color: #e2e8f0;
  font-style: italic;
}
.prose-sky code {
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
  padding: 0.15rem 0.45rem;
  border-radius: 0.375rem;
  font-size: 0.875em;
}
.prose-sky pre {
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.prose-sky img { border-radius: 1.25rem; margin: 2rem 0; }

/* ---------- Forms ---------- */
.field {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.85rem;
  padding: 0.85rem 1.1rem;
  color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-size: 0.95rem;
}
.field::placeholder { color: #64748b; }
.field:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}
.field-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 600;
  border-radius: 0.85rem;
  padding: 0.9rem 1.6rem;
  transition: all 0.22s ease;
  font-size: 0.95rem;
}
.btn-primary {
  background: var(--sky);
  color: #fff;
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.28);
}
.btn-primary:hover { background: #38bdf8; transform: translateY(-2px); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.12); color: #e2e8f0; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(56, 189, 248, 0.4); transform: translateY(-2px); }

/* ---------- Marquee ---------- */
.marquee-track { display: flex; width: max-content; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #05070d; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 6px; border: 2px solid #05070d; }
::-webkit-scrollbar-thumb:hover { background: #334155; }

/* ---------- Line clamp helpers ---------- */
.clamp-2, .clamp-3, .clamp-4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }
.clamp-4 { -webkit-line-clamp: 4; }

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  #site-header, footer, #back-to-top, #search-overlay { display: none !important; }
  body { background: #fff; color: #000; }
}
