:root {
    --bg: #0a0b0f;
    --surface: #12141c;
    --surface-2: #1a1d28;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f0f2f8;
    --muted: #8b92a8;
    --accent: #5b8cff;
    --accent-2: #3dd6c6;
    --gradient: linear-gradient(135deg, #5b8cff 0%, #3dd6c6 100%);
    --radius: 14px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(91, 140, 255, 0.18), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(61, 214, 198, 0.08), transparent);
    pointer-events: none;
    z-index: 0;
}

.grid-bg {
    position: fixed;
    inset: 0;
    background-image:
      linear-gradient(var(--border) 1px, transparent 1px),
      linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black, transparent);
    pointer-events: none;
    z-index: 0;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 11, 15, 0.75);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: var(--text);
}

  .logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--gradient);
    display: grid;
    place-items: center;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    font-weight: 500;
  }

  nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
  }

  nav a:hover { color: var(--text); }

  .nav-cta {
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: var(--gradient);
    color: #0a0b0f !important;
    font-weight: 600;
  }

  main { position: relative; z-index: 1; }

  section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
  }

  .hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 6rem;
  }

  .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    width: fit-content;
  }

  .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    max-width: 14ch;
    margin-bottom: 1.25rem;
  }

  h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .hero p {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 52ch;
    margin-bottom: 2.5rem;
  }

  .brand-name {
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  }

  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0); }

  .btn-primary {
    background: var(--gradient);
    color: #0a0b0f;
    box-shadow: 0 8px 32px rgba(91, 140, 255, 0.3);
  }

  .btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
  }

  .stat strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    font-family: "JetBrains Mono", monospace;
  }

  .stat span { font-size: 0.85rem; color: var(--muted); }

  .section-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-2);
    margin-bottom: 0.75rem;
  }

  h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
  }

  .section-desc {
    color: var(--muted);
    max-width: 55ch;
    margin-bottom: 2.5rem;
  }

  .services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
  }

  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color 0.2s, transform 0.2s;
  }

  .card:hover {
    border-color: rgba(91, 140, 255, 0.35);
    transform: translateY(-4px);
  }

  .card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
  }

  .card p { font-size: 0.9rem; color: var(--muted); }

  .contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
  }

  .form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
  }

  .form-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
  }

  .form-card .form-sub {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
  }

  .field {
    margin-bottom: 1.1rem;
  }

  label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.4rem;
  }

  input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.15);
  }

  textarea { min-height: 120px; resize: vertical; }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  @media (max-width: 540px) {
    .form-row { grid-template-columns: 1fr; }
    nav { display: none; }
  }

  .btn-full { width: 100%; margin-top: 0.5rem; }

  .toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.25rem;
    background: var(--surface-2);
    border: 1px solid var(--accent-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.35s, opacity 0.35s;
    z-index: 200;
    max-width: 360px;
  }

  .toast.show {
    transform: translateY(0);
    opacity: 1;
  }

  .toast strong { display: block; margin-bottom: 0.25rem; }
  .toast p { font-size: 0.85rem; color: var(--muted); }

  footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
  }

  footer a { color: var(--accent); text-decoration: none; }

  .tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .tech-grid--contracts {
    margin-top: 2rem;
  }

  .tech-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    transition: border-color 0.2s, transform 0.15s;
  }

  .tech-pill-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    object-fit: contain;
  }

  .tech-pill:hover {
    border-color: rgba(91, 140, 255, 0.4);
    transform: translateY(-2px);
  }

  .tech-pill--accent {
    border-color: rgba(61, 214, 198, 0.25);
    color: var(--accent-2);
  }

  .hero .badge,
  .hero h1,
  .hero p,
  .hero-actions,
  .hero .stats {
    opacity: 0;
    transform: translateY(18px);
    animation: hero-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  .hero h1 { animation-delay: 0.08s; }
  .hero p { animation-delay: 0.16s; }
  .hero-actions { animation-delay: 0.24s; }
  .hero .stats { animation-delay: 0.32s; }

  @keyframes hero-enter {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Scroll / DOM enter-leave */
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
      opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }

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

  .reveal.is-leaving {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
  }

  @media (prefers-reduced-motion: reduce) {
    .hero .badge,
    .hero h1,
    .hero p,
    .hero-actions,
    .hero .stats,
    .reveal,
    .toast {
      animation: none !important;
      transition: none !important;
      opacity: 1 !important;
      transform: none !important;
    }
  }

  #request:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
    box-shadow: none;
  }