/* CyberSafe Pakistan — Design System */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --radius: 0.625rem;
  --background: oklch(0.16 0.02 180);
  --foreground: oklch(0.97 0.01 180);
  --card: oklch(0.20 0.025 180);
  --card-foreground: oklch(0.97 0.01 180);
  --primary: oklch(0.78 0.20 160);
  --primary-foreground: oklch(0.14 0.02 180);
  --secondary: oklch(0.78 0.18 200);
  --muted: oklch(0.25 0.02 180);
  --muted-foreground: oklch(0.72 0.03 180);
  --border: oklch(0.32 0.04 180 / 60%);
  --input: oklch(0.28 0.03 180);

  --gradient-hero: linear-gradient(135deg, oklch(0.78 0.20 160) 0%, oklch(0.78 0.18 200) 100%);
  --gradient-radial: radial-gradient(ellipse at top, oklch(0.78 0.20 160 / 25%) 0%, transparent 60%);
  --shadow-glow: 0 0 40px oklch(0.78 0.20 160 / 35%);
  --shadow-elegant: 0 20px 60px -20px oklch(0.78 0.20 160 / 40%);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  color: var(--foreground);
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

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

/* ── Utilities ── */
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted-foreground); }
.text-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bg-card { background-color: var(--card); }
.border-top { border-top: 1px solid var(--border); }
.grid-pattern {
  background-image:
    linear-gradient(oklch(0.78 0.20 160 / 8%) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.78 0.20 160 / 8%) 1px, transparent 1px);
  background-size: 48px 48px;
}
.section { padding: 6rem 0; }
.section.card-bg { background-color: oklch(0.18 0.022 180 / 50%); }
.label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--primary);
  font-family: 'Inter', sans-serif;
}
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: calc(var(--radius) + 2px);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid transparent;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.btn-lg { padding: 0.875rem 1.875rem; font-size: 1rem; }
.btn-primary {
  background: var(--gradient-hero);
  color: var(--primary-foreground);
  box-shadow: 0 0 20px oklch(0.78 0.20 160 / 20%);
}
.btn-primary:hover { opacity: 0.88; box-shadow: var(--shadow-glow); }
.btn-outline {
  background: transparent;
  border-color: oklch(0.78 0.20 160 / 40%);
  color: var(--foreground);
}
.btn-outline:hover { background: oklch(0.78 0.20 160 / 10%); border-color: var(--primary); }

/* ── Nav ── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: oklch(0.16 0.02 180 / 75%);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.nav-brand svg { color: var(--primary); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--foreground); }
.nav-links a.active { color: var(--primary); }
.nav-mobile-btn {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: 0.25rem;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: oklch(0.16 0.02 180 / 98%);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
  z-index: 99;
  backdrop-filter: blur(12px);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.mobile-menu a {
  display: block;
  padding: 0.5rem 0;
  font-size: 1rem;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--primary); }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 64px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.4;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, oklch(0.16 0.02 180 / 60%), oklch(0.16 0.02 180 / 85%), var(--background));
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.4;
}
.hero-bg-radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, oklch(0.78 0.20 160 / 25%) 0%, transparent 60%);
}
.hero-content { padding: 6rem 0; max-width: 780px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 99px;
  border: 1px solid oklch(0.78 0.20 160 / 30%);
  background: oklch(0.78 0.20 160 / 10%);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 1.5rem;
}
.hero-badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero-desc {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted-foreground);
  max-width: 600px;
  line-height: 1.7;
}
.hero-ctas { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-stats {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 560px;
}
.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover {
  border-color: oklch(0.78 0.20 160 / 40%);
  box-shadow: var(--shadow-glow);
}
.card-p { padding: 1.5rem; }
.card-p-lg { padding: 2rem; }

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: center; }
.grid-2-auto { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ── Section headers ── */
.section-header { max-width: 640px; margin-bottom: 4rem; }
.section-header h2 {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.025em;
}

/* ── Mission ── */
.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.mission-text h2 {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.025em;
}
.mission-text p { margin-top: 1.5rem; color: var(--muted-foreground); font-size: 1.1rem; line-height: 1.75; }

/* ── Program items ── */
.program-num {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.program-num span.n { color: var(--primary); }
.program-num::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── CTF ── */
.ctf-img-wrap {
  position: relative;
  border-radius: calc(var(--radius) + 12px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elegant);
}
.ctf-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.ctf-img-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, var(--background), transparent);
  padding: 1.5rem;
}
.ctf-terminal { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--primary); }
.ctf-terminal .dim { opacity: 0.7; }
.bullet-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.bullet-list li { display: flex; align-items: flex-start; gap: 0.75rem; color: oklch(0.9 0.01 180); }
.bullet-dot { flex-shrink: 0; margin-top: 0.5rem; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px oklch(0.78 0.20 160 / 60%); }

/* ── Next Event ── */
.event-card {
  border: 1px solid oklch(0.78 0.20 160 / 30%);
  border-radius: calc(var(--radius) + 12px);
  background: linear-gradient(135deg, var(--card), var(--background));
  padding: 2.5rem 4rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-elegant);
}
.event-card-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem; align-items: center; }
.event-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; }
.event-meta-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--muted-foreground); }
.event-meta-item svg { color: var(--primary); }

/* ── Contact ── */
.contact-center { max-width: 680px; margin: 0 auto; text-align: center; }
.contact-ctas { margin-top: 2.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
@media(min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; }
}
.footer-brand { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.footer-links { display: flex; align-items: center; gap: 1.25rem; }
.footer-links a { color: var(--muted-foreground); font-size: 0.875rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--foreground); }
.icon-link svg { width: 16px; height: 16px; }

/* ── Incubator Page ── */
.incubator-hero {
  position: relative;
  padding: 8rem 0 5rem;
  overflow: hidden;
}
.incubator-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.incubator-radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, oklch(0.78 0.18 200 / 20%) 0%, transparent 60%);
}

.phase-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.phase-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-hero);
  opacity: 0;
  transition: opacity 0.3s;
}
.phase-card:hover::before { opacity: 1; }
.phase-card:hover { border-color: oklch(0.78 0.20 160 / 40%); box-shadow: var(--shadow-glow); }
.phase-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--primary);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.phase-icon {
  width: 48px; height: 48px;
  border-radius: calc(var(--radius) + 4px);
  background: oklch(0.78 0.20 160 / 10%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.phase-icon svg { width: 24px; height: 24px; color: var(--primary); }
.phase-card h3 { font-size: 1.2rem; font-family: 'Syne', sans-serif; margin-bottom: 0.5rem; }
.phase-card p { font-size: 0.9rem; color: var(--muted-foreground); line-height: 1.65; }
.phase-tag {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  background: oklch(0.78 0.20 160 / 12%);
  border: 1px solid oklch(0.78 0.20 160 / 25%);
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
}

.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.focus-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  transition: all 0.3s;
}
.focus-card:hover { border-color: oklch(0.78 0.20 160 / 40%); transform: translateY(-2px); }
.focus-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.focus-card h4 { font-size: 1rem; font-family: 'Syne', sans-serif; margin-bottom: 0.4rem; }
.focus-card p { font-size: 0.83rem; color: var(--muted-foreground); line-height: 1.6; }

.benefit-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.benefit-row:last-child { border-bottom: none; }
.benefit-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: calc(var(--radius) + 2px);
  background: oklch(0.78 0.20 160 / 10%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.benefit-icon svg { width: 18px; height: 18px; color: var(--primary); }
.benefit-text h4 { font-size: 1rem; font-family: 'Syne', sans-serif; margin-bottom: 0.25rem; }
.benefit-text p { font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }

.criteria-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.criteria-check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: oklch(0.78 0.20 160 / 15%);
  border: 1.5px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.criteria-check svg { width: 12px; height: 12px; color: var(--primary); }

.timeline-wrap { position: relative; padding-left: 2rem; }
.timeline-line {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), oklch(0.78 0.18 200), transparent);
  opacity: 0.4;
}
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -1.625rem;
  top: 0.25rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px oklch(0.78 0.20 160 / 50%);
}
.timeline-month {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--primary);
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}
.timeline-item h4 { font-size: 1rem; font-family: 'Syne', sans-serif; margin-bottom: 0.25rem; }
.timeline-item p { font-size: 0.85rem; color: var(--muted-foreground); }

.apply-card {
  background: linear-gradient(135deg, oklch(0.22 0.03 180), oklch(0.18 0.02 180));
  border: 1px solid oklch(0.78 0.20 160 / 35%);
  border-radius: calc(var(--radius) + 16px);
  padding: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-elegant);
}
.apply-card .grid-pattern {
  position: absolute; inset: 0; opacity: 0.25;
}
.apply-card-inner { position: relative; z-index: 1; }
.apply-card h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); margin-top: 0.75rem; }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tag {
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  background: oklch(0.78 0.20 160 / 10%);
  border: 1px solid oklch(0.78 0.20 160 / 25%);
  font-size: 0.75rem;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
}

/* ── SVG Icons inline ── */
svg.icon { display: inline-block; width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.icon-lg { width: 1.5em; height: 1.5em; }
svg.icon-xl { width: 2em; height: 2em; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .focus-grid { grid-template-columns: repeat(2, 1fr); }
  .event-card { padding: 2rem; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-btn { display: block; }
  .grid-2, .grid-2-auto, .grid-3, .mission-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .focus-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .event-card-grid { grid-template-columns: 1fr; }
  .event-card { padding: 1.75rem; }
  .apply-card { padding: 2rem 1.5rem; }
  .section { padding: 4rem 0; }
}
@media (max-width: 480px) {
  .grid-4, .focus-grid { grid-template-columns: 1fr; }
}

/* ── Page visibility ── */
.page { display: none; }
.page.active { display: block; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s ease both; }
.fade-up-2 { animation: fadeUp 0.6s 0.1s ease both; }
.fade-up-3 { animation: fadeUp 0.6s 0.2s ease both; }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px oklch(0.78 0.20 160 / 30%); }
  50% { box-shadow: 0 0 40px oklch(0.78 0.20 160 / 60%); }
}
.pulse-glow { animation: pulseGlow 3s ease-in-out infinite; }
