/* ============================================
   Gagan Software — Standalone Build
   Pure CSS. No frameworks. ~11 KB.
   ============================================ */

:root {
  --bg: #090A0F;
  --bg-alt: #0B0D13;
  --card: #11141D;
  --card-sub: #0D1017;
  --terminal: #050608;
  --footer: #040507;
  --text: #F3F4F6;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --accent: #0284C7;
  --accent-hover: #0369A1;
  --accent-hi: #38BDF8;
  --amber: #FBBF24;
  --green: #34D399;
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(56, 189, 248, 0.35);
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* subtle film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--accent-hi); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: rgba(255,255,255,0.15); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--border-hi); color: var(--accent-hi); }
.btn-outline { border-color: var(--border-hi); color: var(--accent-hi); background: transparent; }
.btn-outline:hover { background: rgba(56,189,248,0.08); }
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; padding: 14px 24px; }

.link { color: var(--accent-hi); }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(9, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--text); }
.brand-name .accent { color: var(--accent-hi); }
.brand-badge {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--accent-hi); background: #1E293B;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
}
.nav { display: flex; gap: 32px; }
.nav a { font-size: 14px; color: var(--text-muted); transition: color 0.2s; }
.nav a:hover { color: var(--accent-hi); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 8px; cursor: pointer;
}
.mobile-nav { display: none; flex-direction: column; gap: 16px; padding: 16px 24px 20px; border-top: 1px solid var(--border); }
.mobile-nav a { font-size: 14px; color: var(--text-muted); }
.mobile-nav.open { display: flex; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 160px 0 96px;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero-glow {
  position: absolute; top: -160px; left: 50%;
  width: 720px; height: 480px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(2,132,199,0.18), transparent 70%);
  filter: blur(40px); pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-hi); background: rgba(30,41,59,0.6);
  border-radius: 999px; padding: 7px 16px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent-hi);
  margin-bottom: 24px;
}
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700; line-height: 1.05; color: var(--text);
}
.mask-line { display: block; overflow: hidden; padding-bottom: 4px; }
.mask-line > span {
  display: block;
  transform: translateY(110%);
  animation: mask-up 0.85s var(--ease) forwards;
}
.mask-line:nth-child(1) > span { animation-delay: 0.15s; }
.mask-line:nth-child(2) > span { animation-delay: 0.27s; }
.mask-line:nth-child(3) > span { animation-delay: 0.39s; }
@keyframes mask-up { to { transform: translateY(0); } }

.hero-sub { margin-top: 24px; max-width: 560px; color: var(--text-muted); }
.hero-ctas { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-explore {
  margin-top: 40px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--text-dim); transition: color 0.2s;
}
.hero-explore:hover { color: var(--accent-hi); }
.bounce { display: inline-block; animation: bounce 1.6s infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.reveal-fade { opacity: 0; animation: fade-up 0.7s var(--ease) 0.1s forwards; }
.reveal-fade-d2 { opacity: 0; animation: fade-up 0.7s var(--ease) 0.55s forwards; }
.reveal-fade-d3 { opacity: 0; animation: fade-up 0.7s var(--ease) 0.7s forwards; }
.reveal-fade-d4 { opacity: 0; animation: fade-up 0.6s var(--ease) 1s forwards; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* terminal */
.terminal {
  border: 1px solid var(--border); border-radius: 12px; background: var(--terminal);
  box-shadow: 0 24px 60px -20px rgba(2,132,199,0.25);
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border); padding: 12px 16px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: rgba(239,68,68,0.7); }
.dot.amber { background: rgba(251,191,36,0.7); }
.dot.green { background: rgba(52,211,153,0.7); }
.terminal-title { margin-left: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em; color: var(--text-dim); }
.terminal-body { min-height: 220px; padding: 20px; font-family: var(--font-mono); font-size: 13px; line-height: 2; word-break: break-word; }
.terminal-body p { opacity: 0; animation: term-in 0.3s forwards; }
@keyframes term-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.t-cmd { color: #CBD5E1; }
.t-ok { color: var(--green); }
.t-warn { color: var(--amber); }
.cursor { display: inline-block; width: 8px; height: 16px; background: var(--accent-hi); animation: pulse 1s infinite; vertical-align: middle; }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.stat { border: 1px solid var(--border); border-radius: 10px; background: var(--card-sub); padding: 12px; text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: 20px; color: var(--accent-hi); }
.stat span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-dim); }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: #0C0E15; padding: 24px 0;
}
.marquee-track {
  display: inline-flex; gap: 48px; width: max-content;
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--text-muted);
  animation: marquee 28s linear infinite;
}
.marquee-track i { color: var(--accent); font-style: normal; margin-left: 48px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.overline {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent-hi);
}
.h2 { margin-top: 16px; font-size: clamp(28px, 4vw, 40px); font-weight: 700; color: var(--text); max-width: 640px; }
.lead { margin-top: 16px; color: var(--text-muted); max-width: 560px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Services ---------- */
.services-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 28px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hi);
  box-shadow: 0 12px 30px -10px rgba(2,132,199,0.15);
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.card-icon {
  display: inline-flex; padding: 10px; border-radius: 10px;
  border: 1px solid rgba(56,189,248,0.25); background: rgba(56,189,248,0.1); color: var(--accent-hi);
}
.chip {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-hi); background: #1E293B; border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 12px;
}
.card h3 { margin-top: 24px; font-size: 20px; color: var(--text); }
.card p { margin-top: 12px; flex: 1; font-size: 14px; color: var(--text-muted); }
.tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--text-dim); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px;
  transition: color 0.2s, border-color 0.2s;
}
.card:hover .tags span { color: var(--text-muted); border-color: rgba(56,189,248,0.25); }

/* ---------- Heritage ---------- */
.heritage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.heritage-left { position: sticky; top: 112px; align-self: start; }
.timeline { margin-top: 40px; }
.timeline-item {
  position: relative; border-left: 1px solid var(--border);
  padding: 0 0 32px 24px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -5px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--accent-hi); background: var(--bg-alt);
}
.timeline-year { font-family: var(--font-mono); font-size: 14px; font-weight: 600; letter-spacing: 0.15em; color: var(--accent-hi); }
.timeline-item p { margin-top: 6px; font-size: 14px; color: var(--text-muted); }
.heritage-right { display: flex; flex-direction: column; gap: 24px; }
.chapter {
  display: flex; gap: 20px; align-items: baseline;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 32px;
  transition: border-color 0.3s;
}
.chapter:hover { border-color: var(--border-hi); }
.chapter-num {
  font-family: var(--font-head); font-size: 40px; font-weight: 700;
  -webkit-text-stroke: 1px rgba(255,255,255,0.18); color: transparent;
}
.chapter h3 { font-size: 20px; color: var(--text); }
.chapter p { margin-top: 12px; font-size: 14px; color: var(--text-muted); }
.promise { border: 1px solid rgba(56,189,248,0.25); background: rgba(56,189,248,0.05); border-radius: 12px; padding: 32px; }
.promise p:last-child { margin-top: 12px; color: #CBD5E1; }

/* ---------- Contact ---------- */
.contact-grid { margin-top: 48px; max-width: 640px; }
.contact-channels { display: flex; flex-direction: column; gap: 16px; }
.channel {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 20px;
  transition: border-color 0.3s;
}
.channel:hover { border-color: var(--border-hi); }
.channel-info { flex: 1; min-width: 0; }
.channel-label { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.channel-info strong { font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.copy-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-muted); font-family: var(--font-mono); font-size: 11px;
  padding: 8px 12px; cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.copy-btn:hover { color: var(--accent-hi); border-color: var(--border-hi); }
.copy-btn.copied { color: var(--green); border-color: rgba(52,211,153,0.4); }
.contact-note { padding-top: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em; line-height: 1.8; color: var(--text-dim); }

/* ---------- Footer ---------- */
.footer { background: var(--footer); border-top: 1px solid var(--border); padding: 64px 0 32px; }
.footer-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-mark {
  font-family: var(--font-head); font-size: clamp(48px, 8vw, 88px);
  font-weight: 700; line-height: 1; letter-spacing: -0.02em;
  -webkit-text-stroke: 1px rgba(255,255,255,0.14); color: transparent;
  user-select: none;
}
.footer-meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.15em; line-height: 2.2; color: var(--text-dim); }
.footer-meta a { color: var(--text-muted); }
.footer-meta a:hover { color: var(--accent-hi); }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #475569;
}
.to-top {
  background: none; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-muted); font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase; padding: 10px 16px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.to-top:hover { color: var(--accent-hi); border-color: var(--border-hi); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .heritage-grid, .contact-grid { grid-template-columns: 1fr; }
  .heritage-left { position: static; }
  .nav { display: none; }
  .menu-toggle { display: block; }
}
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .header-inner .btn-primary span { display: none; }
  .section { padding: 64px 0; }
  .hero { padding: 128px 0 64px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .mask-line > span, .reveal-fade, .reveal-fade-d2, .reveal-fade-d3,
  .reveal-fade-d4, .bounce, .pulse-dot { animation: none !important; }
  .mask-line > span { transform: none; }
  .reveal, .reveal-fade, .reveal-fade-d2, .reveal-fade-d3, .reveal-fade-d4 { opacity: 1; transform: none; }
}
