/* ============================================================
   Elhan Technologies — style.css
   Tailwind CDN is loaded in header.php; this file adds:
   - CSS custom properties (design tokens)
   - Custom utility classes & components
   - Animations & keyframes
   - Prose (blog) styles
   ============================================================ */

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --clr-bg:           hsl(222,24%,8%);
  --clr-surface:      hsl(222,22%,11%);
  --clr-surface-2:    hsl(220,20%,14%);
  --clr-border:       hsl(217,18%,20%);
  --clr-text:         hsl(210,40%,90%);
  --clr-text-muted:   hsl(215,20%,58%);
  --clr-primary:      hsl(213,94%,55%);
  --clr-primary-dark: hsl(213,94%,45%);
  --clr-success:      hsl(142,60%,45%);
  --clr-warning:      hsl(38,92%,50%);
  --radius-lg:        1rem;
  --radius-xl:        1.25rem;
  --radius-2xl:       1.5rem;
}

/* ── Base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: 'Montserrat', 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: hsl(217,18%,24%) transparent;
}
*::-webkit-scrollbar          { width: 6px; height: 6px; }
*::-webkit-scrollbar-track    { background: transparent; }
*::-webkit-scrollbar-thumb    { background: hsl(217,18%,28%); border-radius: 99px; }

/* ── Typography ──────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  color: var(--clr-text);
  line-height: 1.25;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}

/* ── Gradient Text ───────────────────────────────────────────── */
.gradient-text {
  background-image: linear-gradient(135deg, hsl(213,94%,60%) 0%, hsl(250,80%,65%) 50%, hsl(280,70%,65%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass Card ──────────────────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.035);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Hero / Section Gradient ─────────────────────────────────── */
.hero-gradient {
  background: linear-gradient(180deg, hsl(222,28%,10%) 0%, var(--clr-bg) 100%);
}

/* ── Glow Button ─────────────────────────────────────────────── */
.glow-primary {
  box-shadow: 0 0 20px rgba(59,130,246,0.35);
  transition: box-shadow .25s, transform .2s, opacity .2s;
}
.glow-primary:hover {
  box-shadow: 0 0 32px rgba(59,130,246,0.55);
  transform: translateY(-1px);
}

/* ── Card Hover ──────────────────────────────────────────────── */
.card-hover {
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  border-color: rgba(59,130,246,0.35) !important;
}

/* ── Header / Nav ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17,22,32,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--clr-border);
  transition: background .3s;
}

.nav-link {
  color: hsl(215,20%,65%);
  font-size: .875rem;
  font-weight: 500;
  padding: .375rem .625rem;
  border-radius: .5rem;
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--clr-text); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--clr-primary); }

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + .5rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: hsl(222,24%,10%);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  padding: .5rem;
  z-index: 100;
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .625rem .75rem;
  border-radius: .5rem;
  font-size: .8125rem;
  color: hsl(215,20%,65%);
  transition: background .15s, color .15s;
}
.nav-dropdown a:hover { background: rgba(59,130,246,0.1); color: var(--clr-primary); }

/* ── Logo Ticker ─────────────────────────────────────────────── */
.ticker-track {
  display: flex;
  gap: 3rem;
  animation: ticker-scroll 28s linear infinite;
  width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Counter Animation ───────────────────────────────────────── */
.counter-item { animation: fadeInUp .6s ease both; }

@keyframes fadeInUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── Fade-in on scroll ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── WhatsApp FAB ────────────────────────────────────────────── */
.whatsapp-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 60;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,0.45);
  transition: transform .25s, box-shadow .25s;
}
.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37,211,102,0.65);
}

/* ── Forms ───────────────────────────────────────────────────── */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--clr-primary) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

/* ── Prose (blog posts) ──────────────────────────────────────── */
.prose-dark { line-height: 1.75; color: hsl(215,20%,70%); }
.prose-dark h1,.prose-dark h2,.prose-dark h3 { color: hsl(210,40%,92%); font-weight:700; margin:1.5em 0 .5em; }
.prose-dark h2 { font-size: 1.375rem; }
.prose-dark h3 { font-size: 1.125rem; }
.prose-dark p  { margin-bottom:1em; }
.prose-dark a  { color: var(--clr-primary); text-decoration:underline; }
.prose-dark ul { list-style:disc; padding-left:1.5rem; margin-bottom:1em; }
.prose-dark ol { list-style:decimal; padding-left:1.5rem; margin-bottom:1em; }
.prose-dark li { margin-bottom:.375rem; }
.prose-dark code { background:hsl(220,20%,16%); padding:.15em .4em; border-radius:.35rem; font-size:.875em; color:hsl(213,94%,65%); }
.prose-dark pre { background:hsl(220,20%,12%); padding:1.25rem; border-radius:.75rem; overflow-x:auto; margin-bottom:1em; }
.prose-dark blockquote { border-left:3px solid var(--clr-primary); padding-left:1rem; margin:1.5em 0; color:hsl(215,20%,58%); font-style:italic; }
.prose-dark img { border-radius:.75rem; max-width:100%; }
.prose-dark hr { border:none; border-top:1px solid var(--clr-border); margin:2em 0; }
.prose-dark strong { color:hsl(210,40%,88%); font-weight:600; }

/* ── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 640px) {
  .ticker-track { gap: 2rem; }
}

/* ── Page Transitions ────────────────────────────────────────── */
.page-fade-in {
  animation: pageFadeIn .4s ease both;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
