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

:root {
  color-scheme: dark;
  --bg-dark: #0a0a0a;
  --bg-light: #fafafa;
  --bg-card: #141414;
  --bg-card-light: #ffffff;
  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --text-dark: #171717;
  --text-dark-secondary: #525252;
  --accent: #60a5fa;
  --accent-alt: #2563eb;
  --accent-button: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #262626;
  --border-light: #e5e5e5;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Active theme (defaults to dark) */
  --bg: var(--bg-dark);
  --bg-alt: var(--bg-light);
  --bg-el: var(--bg-card);
  --bg-el-alt: var(--bg-card-light);
  --text: var(--text-primary);
  --text-muted: var(--text-secondary);
  --text-el: var(--text-dark);
  --text-el-muted: var(--text-dark-secondary);
  --brd: var(--border);
  --brd-alt: var(--border-light);
  --dot-color: rgba(255,255,255,0.03);
  --dot-color-alt: rgba(0,0,0,0.04);
  --dot-color-contact: rgba(255,255,255,0.02);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: var(--bg-light);
    --bg-alt: var(--bg-dark);
    --bg-el: var(--bg-card-light);
    --bg-el-alt: var(--bg-card);
    --text: var(--text-dark);
    --text-muted: var(--text-dark-secondary);
    --text-el: var(--text-primary);
    --text-el-muted: var(--text-secondary);
    --brd: var(--border-light);
    --brd-alt: var(--border);
    --dot-color: rgba(0,0,0,0.03);
    --dot-color-alt: rgba(255,255,255,0.03);
    --dot-color-contact: rgba(0,0,0,0.02);
    --accent: #2563eb;
    --accent-alt: #60a5fa;
  }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Content stays visible unless JavaScript successfully enables reveals. */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

.services-grid .service-card:nth-child(1) { transition-delay: 0s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.1s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.2s; }

.credentials-grid .cred-card:nth-child(1) { transition-delay: 0s; }
.credentials-grid .cred-card:nth-child(2) { transition-delay: 0.05s; }
.credentials-grid .cred-card:nth-child(3) { transition-delay: 0.1s; }
.credentials-grid .cred-card:nth-child(4) { transition-delay: 0.15s; }
.credentials-grid .cred-card:nth-child(5) { transition-delay: 0.2s; }
.credentials-grid .cred-card:nth-child(6) { transition-delay: 0.25s; }
.credentials-grid .cred-card:nth-child(7) { transition-delay: 0.3s; }

.capabilities-grid .capability-card:nth-child(1) { transition-delay: 0s; }
.capabilities-grid .capability-card:nth-child(2) { transition-delay: 0.1s; }
.capabilities-grid .capability-card:nth-child(3) { transition-delay: 0.2s; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* NAV */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--brd);
}

@media (prefers-color-scheme: light) {
  .nav {
    background: rgba(250, 250, 250, 0.85);
  }
}

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

.nav-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: color var(--transition);
}

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

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 11px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
}

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

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* HERO */
.hero {
  padding: 160px 0 100px;
  border-bottom: 1px solid var(--brd);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--dot-color) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
              radial-gradient(ellipse at 60% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 40%);
  animation: gradientShift 20s ease infinite;
  background-size: 200% 200%;
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  max-width: 800px;
}

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

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 64px;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--brd);
}

.proof-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

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

.proof-divider {
  width: 1px;
  height: 40px;
  background: var(--brd);
}

/* SECTION HEADERS */
.section-header {
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  max-width: 600px;
}

.section-header p {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 480px;
}

/* SERVICES */
.services {
  padding: 100px 0;
  background: var(--bg-alt);
  color: var(--text-el);
  position: relative;
}

.services::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--dot-color-alt) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}

.services .section-header h2 {
  max-width: 500px;
  color: var(--text-el);
}

.services .section-label,
.services .service-num { color: var(--accent-alt); }

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

.service-card {
  background: var(--bg-el-alt);
  border: 1px solid var(--brd-alt);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.12);
}

.service-card:hover::after {
  opacity: 1;
}

.service-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  color: var(--text-el);
}

.service-card > p {
  font-size: 15px;
  color: var(--text-el-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-list li {
  font-size: 14px;
  color: var(--text-el-muted);
  padding-left: 16px;
  position: relative;
}

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

/* CAPABILITIES */
.capabilities {
  padding: 100px 0;
  background: var(--bg);
  border-top: 1px solid var(--brd);
  position: relative;
}

.capabilities::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--dot-color) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
}

.capabilities .section-header {
  max-width: 700px;
}

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

.capability-card {
  background: var(--bg-el);
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.capability-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.capability-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.capability-card:hover::before {
  height: 100%;
}

.capability-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  margin-bottom: 20px;
}

.capability-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.capability-card h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  color: var(--text);
}

.capability-card > p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ABOUT */
.about {
  padding: 100px 0;
  border-top: 1px solid var(--brd);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: start;
}

.about-content h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 32px;
}

.about-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.about-content strong {
  color: var(--text);
  font-weight: 600;
}

/* SIDEBAR */
.sidebar-block {
  margin-bottom: 32px;
}

.sidebar-block h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.process-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.process-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.process-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-el);
  border: 1px solid var(--brd);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.process-list strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.process-list span {
  font-size: 14px;
  color: var(--text-muted);
}

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

.tech-tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--bg-el);
  border: 1px solid var(--brd);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* CREDENTIALS */
.credentials {
  padding: 100px 0;
  background: var(--bg-alt);
  color: var(--text-el);
  border-top: 1px solid var(--brd-alt);
  position: relative;
}

.credentials::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--dot-color-alt) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

.credentials .section-header h2 {
  max-width: 400px;
  color: var(--text-el);
}

.credentials .section-label,
.credentials .cred-issuer { color: var(--accent-alt); }

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.cred-card {
  background: var(--bg-el-alt);
  border: 1px solid var(--brd-alt);
  border-radius: var(--radius-sm);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cred-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
}

.cred-issuer {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
}

.cred-card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-el);
}

/* CONTACT */
.contact {
  padding: 100px 0;
  border-top: 1px solid var(--brd);
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--dot-color-contact) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 1;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-content h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.contact-content p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-el);
  border: 1px solid var(--brd);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  background: rgba(59, 130, 246, 0.05);
}

.contact-card svg {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.contact-card:hover svg {
  color: var(--accent);
}

.contact-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.contact-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

/* FOOTER */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--brd);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

/* TABLET */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

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

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .nav-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .menu-ready .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--brd);
    padding: 24px;
    gap: 20px;
  }

  .menu-ready .nav-links.active {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-proof {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .proof-divider {
    display: none;
  }

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

  .about-sidebar {
    grid-template-columns: 1fr;
  }

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

  .footer-inner {
    flex-direction: column;
    gap: 4px;
  }

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

  .service-card,
  .capability-card {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-ready .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .reveal-ready .reveal {
    opacity: 1;
    transform: none;
  }
}

/* SMALL MOBILE */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 100px 0 48px;
  }

  .hero h1 {
    font-size: 28px;
    letter-spacing: -0.5px;
  }

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

  .btn {
    width: 100%;
    text-align: center;
  }

  .proof-num {
    font-size: 24px;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .service-card,
  .capability-card {
    padding: 20px;
  }

  .capability-icon {
    width: 40px;
    height: 40px;
  }

  .capability-icon svg {
    width: 20px;
    height: 20px;
  }

  .cred-card {
    padding: 16px;
  }

  .contact-card {
    padding: 16px;
  }

  .tech-tag {
    font-size: 12px;
    padding: 4px 10px;
  }
}

/* LARGE SCREENS */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .hero h1 {
    font-size: 72px;
  }
}

@media (min-width: 1920px) {
  .container {
    max-width: 1440px;
  }

  .hero h1 {
    font-size: 80px;
  }

  body {
    font-size: 18px;
  }
}
