/* ========================================
   Dynamicflow — Tech Stack & Services Overview
   Design System & Styles
   ======================================== */

/* ---------- CSS Variables / Design Tokens ---------- */
:root {
  /* Core palette */
  --bg-primary: #06080f;
  --bg-secondary: #0c1021;
  --bg-tertiary: #111631;
  --surface: rgba(17, 22, 49, 0.65);
  --surface-hover: rgba(25, 32, 68, 0.8);
  --border: rgba(99, 117, 175, 0.12);
  --border-hover: rgba(99, 117, 175, 0.25);

  /* Text */
  --text-primary: #f0f2f8;
  --text-secondary: #8892b0;
  --text-muted: #5a6384;
  --text-accent: #64ffda;

  /* Service accent colors */
  --c-web: #3b82f6;
  --c-mobile: #10b981;
  --c-saas: #8b5cf6;
  --c-cms: #f59e0b;
  --c-ai: #06b6d4;
  --c-workflow: #ec4899;
  --c-uiux: #f43f5e;
  --c-3d: #f97316;
  --c-animation: #6366f1;
  --c-devops: #14b8a6;
  --c-marketing: #22c55e;

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1280px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-base: 0.35s var(--ease-out);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 32px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- Background Mesh ---------- */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-mesh::before,
.bg-mesh::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  animation: meshFloat 20s ease-in-out infinite alternate;
}

.bg-mesh::before {
  width: 700px;
  height: 700px;
  background: var(--c-web);
  top: -200px;
  right: -150px;
}

.bg-mesh::after {
  width: 600px;
  height: 600px;
  background: var(--c-saas);
  bottom: -200px;
  left: -100px;
  animation-delay: -10s;
}

@keyframes meshFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.15); }
}

/* ========================================
   HEADER / NAV
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
  background: rgba(6, 8, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.logo-img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: #fff;
  padding: 2px;
  box-shadow: 0 4px 20px rgba(100, 180, 50, 0.25);
}

.hero-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
  opacity: 0.85;
}

.header-badge {
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(100, 255, 218, 0.08);
  border: 1px solid rgba(100, 255, 218, 0.2);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-accent);
  letter-spacing: 0.03em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-size: 0.78rem;
  font-weight: 600;
  color: #60a5fa;
  cursor: pointer;
  transition: var(--transition-base);
  letter-spacing: 0.03em;
}

.header-btn-download:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #93c5fd;
  transform: translateY(-1px);
}

.header-btn-download svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
}

.hero-content {
  max-width: 800px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(100, 255, 218, 0.06);
  border: 1px solid rgba(100, 255, 218, 0.15);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-accent);
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}

.hero-label .dot {
  width: 7px;
  height: 7px;
  background: var(--text-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--c-web) 0%, var(--c-saas) 40%, var(--c-ai) 70%, var(--text-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 28px;
  line-height: 1.8;
}

.hero-actions {
  margin-bottom: 40px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition-base);
  background: linear-gradient(135deg, var(--c-web) 0%, var(--c-saas) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
  margin-top: 10px;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.45);
  background: linear-gradient(135deg, #4f8cf7 0%, #996df7 100%);
}

.btn-download svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.3s var(--ease-out);
}

.btn-download:hover svg {
  transform: translateY(2px);
}

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item {
  position: relative;
}

.stat-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: var(--border);
}

.stat-item:first-child::before {
  display: none;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* Hero decoration */
.hero-decoration {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 480px;
  height: 480px;
  pointer-events: none;
}

.hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: ringRotate 30s linear infinite;
}

.hero-ring:nth-child(1) {
  inset: 0;
}

.hero-ring:nth-child(2) {
  inset: 40px;
  animation-direction: reverse;
  animation-duration: 25s;
}

.hero-ring:nth-child(3) {
  inset: 80px;
  animation-duration: 20s;
}

.hero-ring .ring-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-ring:nth-child(1) .ring-dot { background: var(--c-web); box-shadow: 0 0 15px var(--c-web); }
.hero-ring:nth-child(2) .ring-dot { background: var(--c-saas); box-shadow: 0 0 15px var(--c-saas); }
.hero-ring:nth-child(3) .ring-dot { background: var(--c-ai); box-shadow: 0 0 15px var(--c-ai); }

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================
   SERVICES NAVIGATION
   ======================================== */
.services-nav {
  padding: 0 0 60px;
  position: relative;
}

.services-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
}

.nav-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.nav-card-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform 0.3s var(--ease-out);
}

.nav-card:hover .nav-card-icon {
  transform: scale(1.1);
}

.nav-card-text {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
}

/* ========================================
   SECTION COMMON
   ======================================== */
.service-section {
  padding: var(--section-padding);
  position: relative;
}

.service-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-header {
  margin-bottom: 56px;
}

.section-icon-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.section-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.section-number {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.8;
}

/* ---------- Sub-category ---------- */
.sub-category {
  margin-bottom: 40px;
}

.sub-category-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-category-title .sub-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* ---------- Tech Grid ---------- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.tech-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition-base);
}

.tech-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.tech-logo {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.tech-info {
  flex: 1;
  min-width: 0;
}

.tech-name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tech-version {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- Team Card ---------- */
.team-card {
  margin-top: 40px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.team-info-group {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.team-metric {
  text-align: center;
}

.team-metric-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.team-metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.team-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-tag {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.availability-badge.available {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.availability-badge .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   DIGITAL MARKETING
   ======================================== */
.marketing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.marketing-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--c-marketing);
}

.marketing-title {
  font-weight: 600;
  margin-bottom: 8px;
}

/* ========================================
   TEAM & RESOURCE OVERVIEW
   ======================================== */
.team-overview {
  padding: var(--section-padding);
}

.overview-table-wrap {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.overview-table thead {
  background: rgba(255, 255, 255, 0.03);
}

.overview-table th {
  padding: 18px 24px;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.overview-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.overview-table tbody tr:last-child td {
  border-bottom: none;
}

.overview-table tbody tr {
  transition: background 0.2s;
}

.overview-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.table-service-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.table-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.table-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-role-tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}

.table-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.table-status.available {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.table-status .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-note {
  text-align: center;
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ========================================
   BACK TO TOP
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-base);
  z-index: 999;
  font-size: 1.2rem;
  backdrop-filter: blur(12px);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .hero-decoration {
    display: none;
  }

  .stats-bar {
    gap: 32px;
  }

  .team-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 64px 0;
  }

  .container {
    padding: 0 20px;
  }

  .services-nav-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tech-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-bar {
    gap: 24px;
  }

  .stat-item::before {
    display: none;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .hero-label {
    font-size: 0.75rem;
  }

  .overview-table-wrap {
    overflow-x: auto;
  }

  .overview-table {
    min-width: 700px;
  }

  .header-badge {
    display: none;
  }
}

@media (max-width: 480px) {
  .services-nav-grid {
    grid-template-columns: 1fr;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  html {
    font-size: 11px;
  }

  body {
    background: #fff !important;
    color: #1a1a2e !important;
  }

  .bg-mesh,
  .hero-decoration,
  .back-to-top,
  .site-header {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: 40px 0;
  }

  .hero h1 .gradient-text {
    -webkit-text-fill-color: #1a1a2e;
    background: none;
  }

  .hero-desc,
  .section-desc,
  .stat-label,
  .team-metric-label,
  .role-tag,
  .table-role-tag,
  .footer-meta,
  .footer-note {
    color: #555 !important;
  }

  .stat-number,
  .team-metric-value,
  .section-title,
  .sub-category-title,
  .tech-name,
  .table-service-name {
    color: #1a1a2e !important;
  }

  .service-section,
  .team-overview {
    padding: 30px 0;
    page-break-inside: avoid;
  }

  .nav-card,
  .tech-card,
  .team-card,
  .overview-table-wrap {
    background: #f8f9fc !important;
    border-color: #dde1ea !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .services-nav {
    page-break-after: always;
  }

  .availability-badge,
  .table-status {
    background: #e6f9f0 !important;
    border-color: #a7e8c9 !important;
    color: #0a7c42 !important;
  }

  .hero-label {
    background: #eef7ff !important;
    border-color: #b8d8f8 !important;
    color: #1a5da0 !important;
  }

  .section-icon,
  .nav-card-icon,
  .table-icon,
  .tech-logo {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .overview-table th {
    color: #666 !important;
  }

  .overview-table td {
    border-color: #eee !important;
  }

  .section-number {
    color: #888 !important;
  }

  .tech-version {
    color: #888 !important;
  }

  a {
    color: inherit !important;
  }

  .site-footer {
    border-color: #ddd !important;
  }

  .footer-brand {
    color: #1a1a2e !important;
  }
}
