:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --border: rgba(0,0,0,0.08);
  --accent: #00b87a;
  --accent2: #0070f3;
  --accent3: #ff4d6d;
  --text: #1a1a2e;
  --muted: #6b6b8a;
  --card: rgba(255,255,255,0.9);
}

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

html { scroll-behavior: smooth; }

.container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding-left: 4rem;
  padding-right: 4rem;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }

/* Grid background */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(0,184,122,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,184,122,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
}
nav .container {
  display: flex; align-items: center; justify-content: space-between;
}

.logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: #1a1a2e;
  text-decoration: none;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex; gap: 2.5rem; list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-cta {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--accent); color: var(--bg); }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 8rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero .container {
  position: relative;
  z-index: 1;
}

.hero-tag {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  display: flex; align-items: center; gap: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}
.hero-tag::before {
  content: '';
  display: block; width: 30px; height: 1px;
  background: var(--accent);
}

h1 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  max-width: 900px;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}
h1 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}

.hero-sub {
  margin-top: 2.5rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 500px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

.hero-actions {
  margin-top: 3rem;
  display: flex; gap: 1rem; align-items: center;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border: none; cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0,184,122,0.3);
}

.btn-ghost {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--text); }
.btn-ghost::after { content: '\2192'; transition: transform 0.2s; }
.btn-ghost:hover::after { transform: translateX(4px); }

/* Hero glow orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.orb-1 { width: 600px; height: 600px; background: rgba(0,184,122,0.1); right: -100px; top: 10%; }
.orb-2 { width: 400px; height: 400px; background: rgba(0,112,243,0.08); right: 20%; bottom: 0; }

/* Stats bar */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp 0.8s 1s forwards;
}
.stats .container {
  display: flex; gap: 0;
}
.stat {
  flex: 1;
  padding: 2rem;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.stat:last-child { border-right: none; }
.stat::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: translateX(-100%);
  transition: transform 0.4s;
}
.stat:hover::before { transform: translateX(0); }
.stat-num {
  font-family: 'Unbounded', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Section */
section { padding: 7rem 0; position: relative; z-index: 1; }

.section-tag {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.section-tag::before {
  content: '//';
  font-family: 'Space Mono', monospace;
  color: var(--muted);
}

h2 {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 700px;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 4rem;
  border: 1px solid var(--border);
}

.service-card {
  background: var(--bg);
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  cursor: pointer;
}
.service-card:hover { background: var(--surface); }

.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.4s;
  transform-origin: left;
}
.service-card:hover::after { transform: scaleX(1); }

.service-icon {
  width: 48px; height: 48px;
  margin-bottom: 2rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  font-size: 1.3rem;
}

.service-num {
  position: absolute;
  top: 2rem; right: 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
}

.service-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.service-desc {
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--muted);
}

.service-tags {
  margin-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.tag {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(0,184,122,0.25);
  padding: 0.2rem 0.6rem;
  background: rgba(0,184,122,0.05);
}

/* Process */
.process-section { background: var(--surface); }

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 4rem;
  position: relative;
}
.process-grid::before {
  content: '';
  position: absolute;
  top: 32px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), var(--border), transparent);
  z-index: 0;
}

.process-step {
  padding: 2rem;
  position: relative;
  z-index: 1;
}
.step-num {
  width: 64px; height: 64px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  transition: border-color 0.3s, background 0.3s;
}
.process-step:hover .step-num {
  border-color: var(--accent);
  background: rgba(0,184,122,0.08);
}
.step-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.step-desc {
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--muted);
}

/* AI Section */
.ai-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.ai-visual {
  position: relative;
  height: 400px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

.ai-nodes {
  position: absolute; inset: 0;
}

.node {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.node::before {
  content: '';
  position: absolute; inset: -6px;
  border: 1px solid rgba(0,184,122,0.3);
  border-radius: 50%;
  animation: ripple 2s infinite;
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
@keyframes ripple { 0%{transform:scale(1);opacity:1} 100%{transform:scale(2.5);opacity:0} }

.ai-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,184,122,0.5), transparent);
  transform-origin: left;
  animation: drawLine 3s infinite;
}
@keyframes drawLine {
  0%{transform:scaleX(0);opacity:0}
  20%{transform:scaleX(1);opacity:1}
  80%{transform:scaleX(1);opacity:1}
  100%{transform:scaleX(0);opacity:0}
}

.ai-label {
  position: absolute;
  bottom: 1.5rem; left: 1.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.ai-features {
  margin-top: 2.5rem;
  display: flex; flex-direction: column; gap: 1.5rem;
}
.ai-feat {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}
.ai-feat:hover { border-color: rgba(0,184,122,0.3); }
.ai-feat-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.ai-feat-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.ai-feat-desc {
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--muted);
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1px;
  background: var(--border);
  margin-top: 4rem;
  border: 1px solid var(--border);
}

.portfolio-item {
  background: var(--bg);
  padding: 3rem;
  position: relative;
  overflow: hidden;
  min-height: 240px;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: background 0.3s;
  cursor: pointer;
}
.portfolio-item:hover { background: var(--surface); }

.portfolio-item.large { grid-row: span 2; }

.portfolio-mock {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  opacity: 0.3;
  font-family: 'Space Mono', monospace;
}

/* Mock screen */
.mock-screen {
  width: 80%;
  height: 55%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.mock-bar {
  height: 20px;
  background: rgba(0,0,0,0.03);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 5px;
  padding: 0 8px;
}
.mock-dot { width: 5px; height: 5px; border-radius: 50%; }
.mock-content { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.mock-line { height: 4px; background: rgba(0,0,0,0.08); border-radius: 2px; }

.portfolio-cat {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  position: relative; z-index: 1;
}
.portfolio-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  position: relative; z-index: 1;
}
.portfolio-tech {
  margin-top: 0.75rem;
  font-size: 0.65rem;
  color: var(--muted);
  position: relative; z-index: 1;
}

/* CTA */
.cta-section {
  background: var(--surface);
  text-align: center;
  padding: 8rem 4rem;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,184,122,0.06) 0%, transparent 70%);
}
.cta-section h2 { margin: 0 auto; text-align: center; }

.cta-sub {
  margin: 1.5rem auto 3rem;
  max-width: 500px;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--muted);
}

.cta-form {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.cta-fields {
  display: flex;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.cta-fields input {
  flex: 1;
  background: var(--bg);
  border: none; outline: none;
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  padding: 1rem 1.5rem;
  transition: border-color 0.3s;
}
.cta-fields input:focus { background: var(--surface); }
.cta-fields input::placeholder { color: var(--muted); }
.cta-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.cta-submit:hover { opacity: 0.9; transform: translateY(-1px); }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}
footer .container {
  display: flex; align-items: center; justify-content: space-between;
}
.footer-logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
}
.footer-logo span { color: var(--accent); }
.footer-copy {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.footer-links {
  display: flex; gap: 2rem; list-style: none;
}
.footer-links a {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

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

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s, transform 0.7s;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  overflow-y: auto;
  padding: 1rem;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 90%; max-width: 520px;
  padding: 3rem;
  position: relative;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.3s;
  box-shadow: 0 25px 60px rgba(0,0,0,0.12);
  margin: auto;
  flex-shrink: 0;
}
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute; top: 1.2rem; right: 1.2rem;
  background: none; border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

.modal-tag {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.modal h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.modal-form { display: flex; flex-direction: column; gap: 1rem; }

.modal-form input,
.modal-form textarea,
.modal-form select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  padding: 0.9rem 1.2rem;
  outline: none;
  transition: border-color 0.3s;
  resize: vertical;
}
.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus { border-color: var(--accent); }

.modal-form input::placeholder,
.modal-form textarea::placeholder { color: var(--muted); }

.modal-form button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.modal-form button[type="submit"]:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.modal-success {
  text-align: center;
  padding: 2rem 0;
  display: none;
}
.modal-success.show { display: block; }
.modal-success .check {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(0,184,122,0.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
}
.modal-success p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Service card detail modal */
.modal-service-detail {
  display: flex; flex-direction: column; gap: 1rem;
}
.modal-service-detail p {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--muted);
}
.modal-service-detail .tag-list {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Consent checkbox */
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.7rem;
  line-height: 1.6;
  color: var(--muted);
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent-label a {
  color: var(--accent);
  text-decoration: none;
}
.consent-label a:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 900px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
  nav { padding: 1rem 0; }
  .nav-links { display: none; }
  .hero, section { padding: 6rem 0 3rem; }
  .stats .container { flex-wrap: wrap; }
  .stat { flex: 1 1 50%; }
  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .ai-section { grid-template-columns: 1fr; gap: 3rem; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-item.large { grid-row: span 1; }
  footer .container { flex-direction: column; gap: 1.5rem; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .cta-section { padding: 5rem 0; }
  .cta-fields { flex-direction: column; }
  .modal { padding: 2rem 1.5rem; }
}
