/* =============================================
   AMPTech Labs — stylesheet
   ============================================= */

:root {
  --bg:        #141423;
  --teal:      #054557;
  --lime:      #cbfb50;
  --fg:        #e8e8f0;
  --fg-muted:  #8888aa;
  --border:    rgba(203, 251, 80, 0.12);
  --border-teal: rgba(5, 69, 87, 0.6);
  --card-bg:   rgba(255, 255, 255, 0.03);
  --card-hover: rgba(203, 251, 80, 0.05);
  --font-sans: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --nav-h:     68px;
  --max-w:     1180px;
  --radius:    4px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.mono       { font-family: var(--font-mono); }
.accent     { color: var(--lime); }
.small      { font-size: 0.8rem; }
.tiny       { font-size: 0.65rem; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Scrollbar ────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 3px; }

/* ── Buttons ──────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--lime);
  color: var(--bg);
}
.btn-primary:hover {
  background: #d9ff60;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(203, 251, 80, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
  transform: translateY(-2px);
}

/* ── Section commons ──────────────────────── */
section {
  padding: 6rem 0;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  color: var(--lime);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ── NAV ──────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(20, 20, 35, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); }

.lang-toggle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--lime);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all var(--transition);
}
.lang-toggle:hover {
  background: var(--lime);
  color: var(--bg);
  border-color: var(--lime);
}

/* ── HERO ─────────────────────────────────── */
#hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  position: relative;
}

.hero-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(5, 69, 87, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 69, 87, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}

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

.hero-eyebrow {
  font-size: 0.75rem;
  color: var(--lime);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-title .accent {
  position: relative;
  display: inline-block;
}

.hero-title .accent::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--lime);
  opacity: 0.4;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 420px;
}

#nodeCanvas {
  width: 100%;
  height: 100%;
}

/* ── PILLARS ──────────────────────────────── */
#pillars {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(5, 69, 87, 0.08);
}

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

.pillar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pillar-icon {
  font-size: 0.75rem;
  color: var(--lime);
  letter-spacing: 0.05em;
}

.pillar h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.pillar p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ── SERVICES ─────────────────────────────── */
#services {
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-card {
  background: var(--bg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background var(--transition);
  position: relative;
}

.service-card:hover {
  background: var(--card-hover);
}

.service-card--highlight {
  border-left: 2px solid var(--lime);
}

.card-number {
  font-size: 0.7rem;
  color: var(--lime);
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.7;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.card-tags li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--teal);
  background: rgba(5, 69, 87, 0.3);
  border: 1px solid rgba(5, 69, 87, 0.5);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  color: #5bb8cc;
}

/* ── CASES ────────────────────────────────── */
#cases {
  background: rgba(5, 69, 87, 0.05);
}

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

.case-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: border-color var(--transition), transform var(--transition);
}

.case-card:hover {
  border-color: rgba(203, 251, 80, 0.3);
  transform: translateY(-3px);
}

.case-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.case-sector {
  font-size: 0.7rem;
  color: var(--lime);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #5bb8cc;
  background: rgba(5, 69, 87, 0.3);
  border: 1px solid rgba(5, 69, 87, 0.5);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.case-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}

.case-card p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.7;
  flex: 1;
}

.case-results {
  display: flex;
  gap: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.result-label {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

/* ── ABOUT ────────────────────────────────── */
#about {
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-text p {
  color: var(--fg-muted);
  line-height: 1.8;
  font-size: 0.975rem;
}

/* About diagram */
.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-diagram {
  position: relative;
  width: 280px;
  height: 280px;
}

.diag-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  background: var(--teal);
  border: 2px solid var(--lime);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  z-index: 2;
}

.diag-center span:first-child {
  font-size: 0.75rem;
  color: var(--lime);
  font-weight: 700;
}

.diag-center span.small {
  color: var(--fg-muted);
  font-size: 0.6rem;
}

.diag-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(203, 251, 80, 0.2);
  animation: spin 20s linear infinite;
}

.diag-sat {
  position: absolute;
  width: 64px;
  height: 64px;
  background: rgba(5, 69, 87, 0.6);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diag-sat span { color: #5bb8cc; }

.diag-s1 { top: -32px; left: calc(50% - 32px); }
.diag-s2 { right: -32px; top: calc(50% - 32px); }
.diag-s3 { bottom: -32px; left: calc(50% - 32px); }
.diag-s4 { left: -32px; top: calc(50% - 32px); }

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* counter-spin satellites so text stays upright */
.diag-sat {
  animation: counter-spin 20s linear infinite;
}

@keyframes counter-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* ── CONTACT ──────────────────────────────── */
#contact {
  background: rgba(5, 69, 87, 0.07);
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 680px;
}

.contact-sub {
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(203, 251, 80, 0.5);
  background: rgba(203, 251, 80, 0.03);
}

.form-success {
  display: none;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.form-success.visible { display: block; }

/* ── FOOTER ───────────────────────────────── */
#footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-logo-img { height: 40px; width: auto; align-self: flex-start; }

.footer-tagline {
  font-size: 0.75rem;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}

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

.footer-links a {
  font-size: 0.875rem;
  color: var(--fg-muted);
  transition: color var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  color: var(--fg-muted);
}

/* ── Scroll reveal ────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 900px) {
  #hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 4rem);
    padding-bottom: 4rem;
    gap: 3rem;
  }

  .hero-visual { height: 280px; }

  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-visual { display: none; }

  .form-row {
    grid-template-columns: 1fr;
  }
}

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

  .hero-title { font-size: 2.5rem; }

  .hero-cta { flex-direction: column; }
  .hero-cta .btn { text-align: center; justify-content: center; }

  .case-results { gap: 1.25rem; }

  .footer-inner { flex-direction: column; }
  .footer-links { flex-direction: column; gap: 1rem; }
}
