/* ============================================================
   Diazovate Showcase - Design System
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   Custom Properties
   ============================================================ */

:root {
  /* Colors */
  --bg-primary:        #0b0c0e;
  --bg-card:           #15171b;
  --bg-card-hover:     #1c1f24;
  --text-main:         #f0f0f0;
  --text-muted:        #8a8f98;
  --accent:            #5e6ad2;
  --accent-hover:      #727de8;
  --border:            #2c2e33;
  --border-light:      #3d4046;
  --blue:              #3b82f6;
  --green:             #22c55e;
  --red:               #ef4444;

  /* Typography */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Spacing */
  --container-max:     1100px;
  --section-pad:       120px;
  --section-pad-sm:    80px;
  --section-pad-xs:    60px;

  /* Radii */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;

  /* Shadows */
  --shadow-card:  0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.3);
  --shadow-hover: 0 2px 8px rgba(0,0,0,0.5), 0 8px 32px rgba(0,0,0,0.4);
  --shadow-btn:   0 1px 3px rgba(0,0,0,0.4);
  --shadow-btn-hover: 0 4px 12px rgba(94,106,210,0.35);
}

/* ============================================================
   Reset & Base
   ============================================================ */

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-primary);
  min-height: 100vh;
}

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

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

ul, ol {
  list-style: none;
}

/* ============================================================
   Layout
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

section {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

/* ============================================================
   Navigation
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
  background: rgba(11, 12, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.nav-logo:hover {
  color: var(--accent-hover);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-hover);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text-main);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding-top: 160px;
  padding-bottom: var(--section-pad);
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-heading {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #b4b4b4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  max-width: 640px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   Section Header
   ============================================================ */

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

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.section-heading {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 14px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.65;
}

/* ============================================================
   Feature Cards
   ============================================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-card);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(94, 106, 210, 0.12);
  border: 1px solid rgba(94, 106, 210, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 18px;
}

.feature-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Metric Cards
   ============================================================ */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease;
}

.metric-card:hover {
  border-color: var(--border-light);
}

.metric-value {
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-main);
  margin-bottom: 10px;
  display: block;
}

.metric-suffix {
  font-size: 28px;
  font-weight: 600;
  color: var(--accent);
}

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

/* ============================================================
   Tech Stack Pills
   ============================================================ */

.tech-group {
  margin-bottom: 28px;
}

.tech-group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: block;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pill:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-light);
  color: var(--text-main);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ============================================================
   Screenshot Frames
   ============================================================ */

.screenshot-frame {
  background: #1a1b1e;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  transform: perspective(1200px) rotateX(2deg) rotateY(-1deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.screenshot-frame:hover {
  transform: perspective(1200px) rotateX(0deg) rotateY(0deg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.6), 0 16px 64px rgba(0,0,0,0.5);
}

.screenshot-chrome {
  background: #1e2025;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.chrome-dots {
  display: flex;
  gap: 6px;
}

.chrome-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chrome-dot.red   { background: #ff5f57; }
.chrome-dot.yellow { background: #febc2e; }
.chrome-dot.green  { background: #28c840; }

.chrome-bar {
  flex: 1;
  height: 24px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.screenshot-content {
  background: var(--bg-primary);
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-placeholder {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  opacity: 0.4;
}

/* ============================================================
   Project Cards (Index)
   ============================================================ */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.project-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(94,106,210,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.project-card-image-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.5;
  letter-spacing: 0.04em;
}

.project-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.3;
}

.project-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  transition: color 0.15s ease, gap 0.15s ease;
}

.project-card:hover .project-card-link {
  color: var(--accent-hover);
  gap: 10px;
}

/* ============================================================
   CTA Section
   ============================================================ */

.cta-section {
  padding: var(--section-pad) 0;
  text-align: center;
}

.cta-inner {
  max-width: 560px;
  margin: 0 auto;
}

.cta-heading {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 16px;
}

.cta-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.cta-microcopy {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.65;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

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

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--text-main);
}

/* ============================================================
   Case Study Specific
   ============================================================ */

.case-hero {
  padding-top: 120px;
  padding-bottom: 80px;
}

.case-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.case-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(94, 106, 210, 0.12);
  color: var(--accent);
  border: 1px solid rgba(94, 106, 210, 0.2);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s ease;
  margin-bottom: 40px;
}

.back-link:hover {
  color: var(--text-main);
}

/* ============================================================
   Scroll Reveal Animations
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.stagger-children .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger-children .reveal:nth-child(2) { transition-delay: 100ms; }
.stagger-children .reveal:nth-child(3) { transition-delay: 200ms; }
.stagger-children .reveal:nth-child(4) { transition-delay: 300ms; }
.stagger-children .reveal:nth-child(5) { transition-delay: 400ms; }
.stagger-children .reveal:nth-child(6) { transition-delay: 500ms; }

/* ============================================================
   Divider
   ============================================================ */

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border) 20%, var(--border) 80%, transparent);
  margin: 0;
}

/* ============================================================
   Prose (case study body text)
   ============================================================ */

.prose {
  max-width: 680px;
}

.prose p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.prose p strong {
  color: var(--text-main);
  font-weight: 600;
}

.prose h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-top: 40px;
  margin-bottom: 12px;
}

.prose ul {
  margin-bottom: 20px;
  padding-left: 0;
}

.prose ul li {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   Code Block
   ============================================================ */

.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
  overflow-x: auto;
}

.code-block pre {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
}

.code-block .token-key     { color: var(--accent); }
.code-block .token-string  { color: var(--green); }
.code-block .token-comment { color: #4a5060; font-style: italic; }

/* ============================================================
   Responsive Breakpoints
   ============================================================ */

@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .hero {
    padding-top: 100px;
    padding-bottom: var(--section-pad-sm);
  }

  .hero-sub {
    font-size: 16px;
  }

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

  .feature-grid,
  .metric-grid,
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .screenshot-frame {
    transform: none;
  }

  .nav-links {
    gap: 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  .hero {
    padding-top: 80px;
  }

  .feature-grid,
  .metric-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-heading {
    font-size: 32px;
  }

  .hero-sub {
    font-size: 15px;
  }

  .nav-links .btn {
    display: none;
  }

  .nav-links {
    gap: 16px;
  }

  .cta-heading {
    font-size: 24px;
  }

  .metric-value {
    font-size: 44px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
