:root {
  --bg: #000000;
  --bg-soft: #0d0d0d;
  --card: #111111;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.9);
  --accent: #fecc00;
  --border: rgba(255, 255, 255, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

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

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

.section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-soft);
}

h1, h2, h3 {
  font-family: "Space Grotesk", Inter, sans-serif;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  max-width: 14ch;
}

h1.hero-title {
  max-width: min(100%, 22ch);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-bottom: 2rem;
}

p {
  color: var(--text-muted);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  transition: background-color 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.logo-img {
  height: 40px;
  width: auto;
  max-width: min(200px, 42vw);
  object-fit: contain;
  display: block;
}

.logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.nav-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  background-repeat: repeat;
  background-position: 0 0;
  animation: drift 18s linear infinite;
}

/* Stronger, slightly denser grid on tablet / phone — faint lines vanish on small high-DPI screens */
@media (max-width: 1024px) {
  .hero-grid {
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
  }
}

@keyframes drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-40px);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 5rem;
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.hero-sub {
  margin-top: 1.2rem;
  max-width: 65ch;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
}

.hero-ctas {
  display: flex;
  gap: 0.8rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-typewriter {
  white-space: pre-wrap;
}

.hero-caret {
  display: inline-block;
  margin-left: 1px;
  color: var(--accent);
  font-weight: 300;
  animation: caretBlink 0.85s step-end infinite;
}

.hero-title.is-done .hero-caret {
  opacity: 0;
  animation: none;
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

.hero-ctas--delayed {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.hero-ctas--delayed:not(.is-visible) {
  pointer-events: none;
}

.hero-ctas--delayed.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-grid {
    animation: none;
  }

  .hero-caret {
    animation: none;
    opacity: 1;
  }

  .hero-ctas--delayed {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-ctas--delayed:not(.is-visible) {
    pointer-events: auto;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.2rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
}

.btn-primary:hover {
  background: #ffe069;
}

.btn-outline {
  border-color: var(--accent);
  color: var(--text);
}

.btn-outline:hover {
  background: rgba(254, 204, 0, 0.12);
}

.services-grid,
.work-grid,
.why-grid,
.testimonial-grid {
  display: grid;
  gap: 1rem;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.2rem;
}

.service-card {
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.icon-wrap {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  color: var(--accent);
  margin-bottom: 0.8rem;
  border: 1px solid rgba(254, 204, 0, 0.4);
  font-size: 1rem;
}

.service-card h3 {
  font-size: 1.06rem;
  margin-bottom: 0.45rem;
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 0.9rem;
}

.industry-item {
  border: 1px solid var(--border);
  padding: 1.2rem;
  background: #101010;
}

.industry-icon {
  font-size: 1.4rem;
  color: var(--accent);
}

.industry-item p {
  margin-top: 0.65rem;
  color: var(--text);
  font-weight: 600;
}

.industry-item small {
  color: var(--text-muted);
}

.process-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  position: relative;
}

.process-track::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(254, 204, 0, 0.7);
  z-index: 0;
}

.process-step {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding-top: 0.2rem;
}

.step-no {
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
}

.process-step h3 {
  margin-top: 0.4rem;
  margin-bottom: 0.35rem;
}

.work-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 1rem;
  overflow: hidden;
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.work-card-link:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.work-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.work-card-link h3 {
  font-size: 1.06rem;
  margin-bottom: 0.45rem;
}

.tag {
  display: inline-block;
  margin-top: 0.9rem;
  border: 1px solid rgba(254, 204, 0, 0.6);
  color: var(--accent);
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  width: fit-content;
}

.note {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

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

.why-card {
  background: #0f0f0f;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1.1rem 1rem;
}

.why-card h3 {
  margin-bottom: 0.45rem;
}

.testimonial-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-card {
  font-style: italic;
  color: rgba(255, 255, 255, 0.92);
}

.quote-card cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  color: rgba(255, 255, 255, 0.75);
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1rem;
}

.contact-info {
  background: #0f0f0f;
  border: 1px solid var(--border);
  padding: 1.1rem;
}

.contact-info p + p {
  margin-top: 0.65rem;
}

.contact-info a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-info a:hover {
  color: #ffe069;
}

.contact-hint {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
}

.socials {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.8rem;
}

.socials a {
  color: var(--accent);
}

.contact-form {
  display: grid;
  gap: 0.65rem;
  background: #0f0f0f;
  border: 1px solid var(--border);
  padding: 1.1rem;
}

input,
textarea {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #060606;
  color: var(--text);
  padding: 0.7rem 0.75rem;
  font: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.2rem 0;
}

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

.footer-brand {
  color: var(--text);
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

body.project-page .navbar {
  background: rgba(0, 0, 0, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.project-main {
  padding: 6.5rem 0 4rem;
}

.project-article {
  max-width: 720px;
}

.project-cover {
  margin: 0 0 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #171717;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-back {
  margin-bottom: 1.5rem;
}

.project-back a {
  color: var(--accent);
  font-weight: 600;
}

.project-back a:hover {
  text-decoration: underline;
}

.project-tag {
  display: inline-block;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(254, 204, 0, 0.6);
  color: var(--accent);
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
}

.project-article > h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  max-width: none;
  margin-bottom: 1rem;
}

.project-lead {
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.project-section {
  margin-bottom: 2rem;
}

.project-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.project-section ul {
  margin: 0.75rem 0 0 1.2rem;
  color: var(--text-muted);
}

.project-section li + li {
  margin-top: 0.4rem;
}

.project-cta {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 960px) {
  .services-grid,
  .work-grid,
  .industries-grid,
  .testimonial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.3rem;
  }

  .process-track::before {
    display: none;
  }

  .contact-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .section {
    padding: 4.5rem 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    right: 4%;
    top: 68px;
    background: #050505;
    border: 1px solid var(--border);
    display: grid;
    gap: 0.6rem;
    padding: 0.8rem;
    min-width: 180px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .services-grid,
  .work-grid,
  .why-grid,
  .industries-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}
