/* ════════════════════════════════════════════════════════════
   ZETRAX.app — Global Design System v3.0
   zetrax-global.css  ·  Import on every page
   ════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── TOKENS ─── */
:root {
  --font:       'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Neutrals */
  --white:       #ffffff;
  --bg:          #fefefe;
  --text:        #111827;
  --text-muted:  #6b7280;
  --text-light:  #9ca3af;
  --border:      rgba(255,192,203,0.3);
  --border-md:   rgba(255,192,203,0.5);

  /* Pink palette */
  --pink-50:     #fdf2f8;
  --pink-100:    #fce7f3;
  --pink-200:    #fbcfe8;
  --pink-300:    #f9a8d4;
  --pink-400:    #f472b6;
  --pink-500:    #ec4899;
  --pink-600:    #db2777;
  --pink-700:    #be185d;
  --pink-800:    #9d174d;

  /* Green (status) */
  --green-500:   #10b981;
  --green-100:   #d1fae5;
  --green-800:   #065f46;

  /* Yellow */
  --yellow-100:  #fef3c7;
  --yellow-600:  #d97706;

  /* Gradients */
  --grad-pink:   linear-gradient(135deg, #ec4899 0%, #be185d 100%);
  --grad-pink-r: linear-gradient(135deg, #be185d 0%, #ec4899 100%);
  --grad-bg:     radial-gradient(ellipse 80% 50% at 70% -10%, rgba(255,192,203,0.35) 0%, rgba(255,255,255,0) 70%),
                 radial-gradient(ellipse 60% 40% at 10% 90%, rgba(255,192,203,0.2) 0%, rgba(255,255,255,0) 70%);

  /* Glass */
  --glass-bg:    rgba(255,255,255,0.72);
  --glass-blur:  blur(16px) saturate(1.5);
  --glass-border:1px solid rgba(255,192,203,0.3);
  --glass-shadow:0 10px 40px -10px rgba(236,72,153,0.1),
                 0 2px 10px rgba(0,0,0,0.04);

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 16px rgba(236,72,153,0.10);
  --shadow-lg:   0 12px 40px rgba(236,72,153,0.14);
  --shadow-xl:   0 24px 60px rgba(236,72,153,0.18);

  /* Radius */
  --r-xs:  6px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-2xl: 32px;
  --r-full: 9999px;

  /* Layout */
  --header-h:  72px;
  --container: 1200px;

  /* Timing */
  --t:    0.3s ease-out;
  --t-sm: 0.15s ease-out;
  --t-lg: 0.5s ease-out;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--white);
  background-image: var(--grad-bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; }

/* ─── LAYOUT ─── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── TYPOGRAPHY ─── */
.gradient-text {
  background: var(--grad-pink);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideRight { from { transform: translateX(-10px); opacity:0; } to { transform: translateX(0); opacity:1; } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes countUp { from { opacity:0; transform:scale(0.9); } to { opacity:1; transform:scale(1); } }

.anim-up { animation: fadeUpIn 0.65s ease-out both; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.12s; }
.d3 { animation-delay: 0.20s; }
.d4 { animation-delay: 0.30s; }
.d5 { animation-delay: 0.40s; }

/* ─── GLASS CARD ─── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--r-xl);
}
.glass-sm { border-radius: var(--r-lg); }
.glass:hover {
  box-shadow: var(--glass-shadow), 0 0 0 1px rgba(236,72,153,0.12);
  transform: translateY(-2px);
  transition: box-shadow var(--t), transform var(--t);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--r-full);
  padding: 10px 22px;
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t);
  cursor: pointer;
  white-space: nowrap;
  border: none;
  outline: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--t-sm);
  border-radius: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad-pink);
  color: white;
  box-shadow: 0 4px 16px rgba(236,72,153,0.3);
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(236,72,153,0.45); }

.btn-outline {
  background: transparent;
  color: var(--pink-600);
  border: 1.5px solid var(--pink-300);
}
.btn-outline:hover { background: var(--pink-50); border-color: var(--pink-500); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid transparent;
}
.btn-ghost:hover { color: var(--text); background: var(--pink-50); border-color: var(--pink-100); }

.btn-dark {
  background: var(--text);
  color: white;
  box-shadow: 0 4px 16px rgba(17,24,39,0.2);
}
.btn-dark:hover { box-shadow: 0 8px 24px rgba(17,24,39,0.3); background: #1f2937; }

.btn-sm  { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg  { padding: 14px 32px; font-size: 1rem; }
.btn-xl  { padding: 16px 40px; font-size: 1.05rem; }

/* ─── BADGE / PILL ─── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 4px 10px;
  border-radius: var(--r-full);
}
.badge-pink  { background: var(--pink-100); color: var(--pink-700); border: 1px solid var(--pink-200); }
.badge-green { background: var(--green-100); color: var(--green-800); }
.badge-yellow{ background: var(--yellow-100); color: var(--yellow-600); }
.badge-dark  { background: var(--text); color: white; }

/* ─── INPUT / FORM ─── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.form-input, .form-textarea, .form-select {
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(255,255,255,0.8);
  border: 1.5px solid rgba(255,192,203,0.4);
  border-radius: var(--r-md);
  padding: 12px 16px;
  transition: border-color var(--t-sm), box-shadow var(--t-sm);
  outline: none;
  width: 100%;
}
.form-textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-light); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--pink-400);
  box-shadow: 0 0 0 3px rgba(236,72,153,0.12);
}

/* ─── SECTION ─── */
.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }
.section-lg { padding: 120px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header.left { text-align: left; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--pink-600);
  background: var(--pink-50);
  border: 1px solid rgba(236,72,153,0.2);
  border-radius: var(--r-full);
  padding: 5px 14px;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 12px;
}
.section-sub { font-size: 1rem; color: var(--text-muted); line-height: 1.7; max-width: 600px; margin: 0 auto; }

/* ─── PAGE HERO ─── */
.page-hero {
  padding: calc(var(--header-h) + 80px) 0 72px;
  text-align: center;
  position: relative;
  z-index: 2;
}
.page-hero-inner { max-width: 780px; margin: 0 auto; }
.page-h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.06;
  color: var(--text);
  margin-bottom: 20px;
}
.page-sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

/* ─── DIVIDER ─── */
.divider {
  width: 48px; height: 3px;
  background: var(--grad-pink);
  border-radius: var(--r-full);
  margin: 16px auto 0;
}
.divider.left { margin: 16px 0 0; }

/* ─── HEADER ─── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid rgba(255,192,203,0.18);
  transition: box-shadow var(--t), background var(--t);
}
.header.scrolled {
  background: rgba(255,255,255,0.96);
  box-shadow: 0 2px 24px rgba(236,72,153,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  gap: 32px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-star {
  width: 34px; height: 34px;
  filter: drop-shadow(0 2px 6px rgba(236,72,153,0.3));
  transition: transform var(--t), filter var(--t);
}
.logo:hover .logo-star { transform: rotate(14deg) scale(1.1); filter: drop-shadow(0 4px 12px rgba(236,72,153,0.5)); }
.logo-text { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.04em; color: var(--text); }
.logo-dot { color: var(--pink-500); }

/* Nav */
.nav { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; }
.nav-link {
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted);
  padding: 7px 15px;
  border-radius: var(--r-full);
  transition: color var(--t-sm), background var(--t-sm);
}
.nav-link:hover { color: var(--text); background: var(--pink-50); }
.nav-link.active { color: var(--pink-600); background: var(--pink-50); font-weight: 600; }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  transition: background var(--t-sm);
}
.hamburger:hover { background: var(--pink-50); }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text-muted); border-radius: 2px; transition: transform var(--t), opacity var(--t); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav { display: none; padding: 16px 24px 24px; background: rgba(255,255,255,0.97); border-top: 1px solid var(--pink-100); }
.mobile-nav.open { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-link { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); padding: 10px 4px; border-bottom: 1px solid var(--pink-50); transition: color var(--t-sm); }
.mobile-nav-link:hover { color: var(--pink-500); }
.mobile-nav .btn { margin-top: 12px; width: 100%; justify-content: center; }

/* ─── FOOTER ─── */
.footer { background: var(--white); border-top: 1px solid var(--pink-100); padding-top: 64px; position: relative; z-index: 2; }
.footer-inner {
  display: grid;
  grid-template-columns: 240px repeat(4, 1fr);
  gap: 40px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 56px;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-tagline { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }
.footer-social { display: flex; gap: 8px; margin-top: 4px; }
.social-btn {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--pink-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all var(--t-sm);
}
.social-btn:hover { border-color: var(--pink-300); color: var(--pink-500); background: var(--pink-50); transform: translateY(-2px); }
.footer-col-title { font-size: 0.75rem; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.875rem; color: var(--text-muted); transition: color var(--t-sm); }
.footer-col a:hover { color: var(--pink-500); }
.footer-bottom-outer { border-top: 1px solid var(--pink-50); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--container); margin: 0 auto;
  padding: 20px 24px;
  font-size: 0.8rem; color: var(--text-light);
}
.heart { color: var(--pink-500); animation: heartbeat 2s ease-in-out infinite; }
@keyframes heartbeat { 0%,100%{transform:scale(1);} 50%{transform:scale(1.25);} }

/* ─── CODE BLOCKS ─── */
.code-block {
  background: #0d1117;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.code-dots { display: flex; gap: 7px; }
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.code-lang { font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.1em; }
.code-copy-btn { font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.06); border: none; border-radius: 5px; padding: 4px 10px; cursor: pointer; transition: background var(--t-sm), color var(--t-sm); }
.code-copy-btn:hover { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); }
.code-body {
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  line-height: 1.9;
  color: #e6edf3;
  overflow-x: auto;
  white-space: pre;
}
.code-body .kw  { color: #ff79c6; }
.code-body .fn  { color: #79c0ff; }
.code-body .str { color: #a5d6ff; }
.code-body .cm  { color: #8b949e; font-style: italic; }
.code-body .num { color: #f78166; }
.code-body .var { color: #ffa657; }

/* ─── TOAST ─── */
#toast-container { position: fixed; bottom: 28px; right: 28px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--text);
  color: white;
  padding: 13px 20px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  display: flex; align-items: center; gap: 10px;
  animation: slideRight 0.3s ease-out;
  max-width: 340px;
}
.toast.success { background: linear-gradient(135deg, #10b981, #059669); }
.toast.error   { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ─── SCROLL REVEAL ─── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 200px repeat(3, 1fr); gap: 32px; }
  .footer-brand { grid-column: 1 / 3; }
}
@media (max-width: 768px) {
  .nav, .header-actions { display: none; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / 3; }
  .section, .section-sm, .section-lg { padding: 56px 0; }
  .page-hero { padding: calc(var(--header-h) + 48px) 0 56px; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: 1; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero-actions { flex-direction: column; align-items: center; }
}
