:root {
  --bg: #f2f6f8;
  --bg-elev: #ffffff;
  --text: #0f1b2b;
  --muted: #4f5f75;
  --line: #d4dee6;
  --brand: #0d8f6f;
  --brand-strong: #0a6f57;
  --accent: #145da0;
  --shadow: 0 10px 40px rgba(9, 26, 43, 0.08);
}

:root[data-theme="dark"] {
  --bg: #0b131d;
  --bg-elev: #111d2b;
  --text: #e8eef5;
  --muted: #9ab0c5;
  --line: #223549;
  --brand: #34d1a1;
  --brand-strong: #21a67f;
  --accent: #5fa8ff;
  --shadow: 0 12px 42px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, rgba(13, 143, 111, 0.09), transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(20, 93, 160, 0.12), transparent 38%), var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.25s ease, color 0.25s ease;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.12;
  z-index: -1;
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 0;
}

.topbar-row {
  display: contents;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  grid-column: 1 / -1;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.site-nav a:hover {
  color: var(--brand-strong);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.site-footer {
  padding: 0 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--brand-strong);
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

main section {
  padding: 2.4rem 0;
}

.hero {
  padding-top: 3.2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.15;
  margin: 0 0 0.7rem;
}

h1 {
  font-size: clamp(2rem, 7vw, 3.2rem);
  margin-top: 0.45rem;
}

.headline {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 600;
}

.subline {
  margin-top: 0.55rem;
  color: var(--muted);
  max-width: 62ch;
}

.hero-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.hero-actions a {
  color: var(--brand-strong);
  font-weight: 600;
  text-decoration: none;
}

.hero-actions a:hover {
  text-decoration: underline;
}

.hero-cta {
  margin-top: 1.25rem;
}

.hero-cta a {
  color: var(--brand-strong);
  font-weight: 700;
  text-decoration: none;
}

.pipeline-list {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.pipeline-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
}

.pipeline-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  min-width: 5.5rem;
}

.layer-tag {
  margin: 0;
  padding: 0.55rem 1rem 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.project-card--featured {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

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

.card {
  background: color-mix(in srgb, var(--bg-elev) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.service-card,
.project-body {
  padding: 1.1rem;
}

.service-card .price {
  margin: 0 0 0.45rem;
  color: var(--brand-strong);
  font-weight: 700;
}

.project-card {
  overflow: hidden;
}

.project-card img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.project-body p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.project-body a {
  color: var(--brand-strong);
  font-weight: 600;
  text-decoration: none;
  margin-right: 1rem;
}

.private-work .service-card a {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--brand-strong);
  font-weight: 600;
  text-decoration: none;
}

.skills-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skills-list li {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
}

.cta {
  margin-bottom: 3rem;
}

.cta p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.cta-button {
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.55s ease forwards;
}

.reveal:nth-of-type(2) {
  animation-delay: 0.12s;
}

.reveal:nth-of-type(3) {
  animation-delay: 0.2s;
}

.reveal:nth-of-type(4) {
  animation-delay: 0.28s;
}

.reveal:nth-of-type(5) {
  animation-delay: 0.34s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-nav {
    grid-column: 2;
    grid-row: 1;
    justify-content: center;
  }

  .topbar-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .services-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card--featured {
    grid-column: 1 / -1;
  }

  .service-card,
  .project-body {
    padding: 1.25rem;
  }

  main section {
    padding: 3rem 0;
  }
}
