:root {
  --slate: #2b3a42;
  --slate-deep: #1e2a31;
  --slate-light: #3d5260;
  --green: #8cbf4a;
  --green-dim: #527a2a;
  --green-glow: rgba(140, 191, 74, 0.15);
  --cream: #f4f3ef;
  --cream-dark: #e8e7e2;
  --text: #2b3a42;
  --text-light: #5a6d78;
  --white: #ffffff;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

*:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible,
.contact-form select:focus-visible {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

/* -- NAV -- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(244, 243, 239, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(43, 58, 66, 0.06);
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 0.8rem 3rem;
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--slate);
}

.nav-logo svg, .nav-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.nav-logo span {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--green);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--slate); }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }

.nav-cta {
  background: var(--slate-deep);
  color: var(--cream) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: var(--slate);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(43, 58, 66, 0.2);
  color: var(--cream) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--slate);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* -- HERO -- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 8rem 3rem 6rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--green-glow) 0%, transparent 70%);
  pointer-events: none;
  animation: pulseGlow 8s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0.7; transform: scale(1.1); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  align-items: center;
}

.hero-content { position: relative; z-index: 2; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--green-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-tag::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
  animation: blink 3s ease-in-out infinite;
}

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

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--slate-deep);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.35s forwards;
}

.hero h1 em {
  font-style: normal;
  color: var(--green-dim);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.5s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background: var(--slate-deep);
  color: var(--cream);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.65s forwards;
}

.hero-cta:hover {
  background: var(--slate);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(43, 58, 66, 0.2);
}

.hero-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.hero-cta:hover svg { transform: translateX(3px); }

/* Hero visual - terminal/code block aesthetic */
.hero-visual {
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.5s forwards;
}

.terminal {
  background: var(--slate-deep);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(30, 42, 49, 0.25), 0 0 0 1px rgba(255,255,255,0.05) inset;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.2);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal-body {
  padding: 1.25rem 1.5rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.6);
}

.terminal-body .prompt { color: var(--green); }
.terminal-body .cmd { color: rgba(255,255,255,0.9); }
.terminal-body .comment { color: rgba(255,255,255,0.3); }
.terminal-body .output { color: rgba(255,255,255,0.5); }
.terminal-body .highlight { color: var(--green); }
.terminal-body .developing { color: #e8a735; }

.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--green);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursorBlink 1s step-end infinite;
}

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

/* -- SERVICES -- */
.services {
  padding: 8rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green-dim);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--slate-deep);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 560px;
  margin-bottom: 4rem;
  line-height: 1.7;
}

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

.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(43, 58, 66, 0.08);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--green-dim));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(43, 58, 66, 0.08);
  border-color: rgba(140, 191, 74, 0.2);
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--green-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-icon svg {
  width: 24px;
  height: 24px;
  color: var(--green-dim);
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--slate-deep);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.7;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.service-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: var(--cream);
  color: var(--text-light);
  letter-spacing: 0.02em;
}

/* -- ABOUT -- */
.about {
  padding: 6rem 3rem 8rem;
  background: var(--slate-deep);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(140, 191, 74, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.about-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.about .section-label { color: var(--green); }
.about .section-title { color: var(--cream); margin-bottom: 1.5rem; }

.about-text {
  font-size: 1rem;
  color: rgba(244, 243, 239, 0.82);
  line-height: 1.8;
}

.about-text p + p { margin-top: 1.25rem; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 1.75rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(140, 191, 74, 0.2);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(244, 243, 239, 0.65);
  font-weight: 400;
}

/* -- CASE STUDIES -- */
.case-studies {
  padding: 8rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.case-study-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(43, 58, 66, 0.08);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.case-study-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--green-dim));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.case-study-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(43, 58, 66, 0.08);
  border-color: rgba(140, 191, 74, 0.2);
}

.case-study-card:hover::before { transform: scaleX(1); }

.case-study-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--slate-deep);
  margin-bottom: 0.75rem;
}

.case-study-card p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* -- CONTACT -- */
.contact {
  padding: 8rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.contact .section-title {
  margin-bottom: 1rem;
}

.contact-desc {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 500px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.contact-form {
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate);
  margin-bottom: 0.4rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(43, 58, 66, 0.15);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--green);
}

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

.contact-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6d78' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.contact-form button {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background: var(--slate-deep);
  color: var(--cream);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form button:hover {
  background: var(--slate);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(43, 58, 66, 0.2);
}

.contact-form .form-error {
  color: #d9534f;
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.flash-success {
  background: var(--green-glow);
  border: 1px solid var(--green);
  color: var(--green-dim);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  font-size: 0.92rem;
  text-align: center;
}

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact-btn.primary {
  background: var(--slate-deep);
  color: var(--cream);
}

.contact-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(43, 58, 66, 0.2);
}

.contact-btn.secondary {
  background: var(--white);
  color: var(--slate);
  border: 1px solid rgba(43, 58, 66, 0.12);
}

.contact-btn.secondary:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.contact-btn svg {
  width: 18px;
  height: 18px;
}

/* -- FOOTER -- */
footer {
  padding: 2.5rem 3rem;
  border-top: 1px solid rgba(43, 58, 66, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

footer p {
  font-size: 0.8rem;
  color: var(--text-light);
}

footer .location {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-light);
  letter-spacing: 0.03em;
}

/* -- ANIMATIONS -- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* -- RESPONSIVE -- */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.5rem; }
  .hero { padding: 7rem 1.5rem 4rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual {
    order: 2;
  }
  .terminal {
    font-size: 0.7rem;
  }
  .terminal-body {
    padding: 0.75rem 1rem;
    line-height: 1.7;
  }
  .services { padding: 5rem 1.5rem; }
  .services-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .about { padding: 5rem 1.5rem; }
  .about-inner { grid-template-columns: 1fr; gap: 3rem; }
  .case-studies { padding: 5rem 1.5rem; }
  .case-studies-grid { grid-template-columns: 1fr; }
  .contact { padding: 5rem 1.5rem; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 600px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(244, 243, 239, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
  }

  nav.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .nav-toggle span {
    transition: all 0.3s ease;
  }

  nav.nav-open .nav-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  nav.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  nav.nav-open .nav-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero h1 { font-size: 2.2rem; }
  .about-stats { grid-template-columns: 1fr 1fr; gap: 1rem; }
}
