/* =========================================================
   V V ENGINEERING WORKS — DESIGN SYSTEM
   Concept: "Live Blueprint" — the site reads like a technical
   drawing sheet: grid lines, registration marks, drawing
   annotations (FIG./SEC. labels), mono data callouts.
   ========================================================= */

:root {
  /* Color */
  --bg:        #0B0F14;
  --surface:   #121821;
  --surface-2: #1A2230;
  --line:      #2A3648;
  --line-soft: #1E2733;
  --text:      #E7EDF3;
  --muted:     #8492A6;
  --accent:    #F2A93B; /* signal amber */
  --accent-2:  #45C4D6; /* blueprint cyan */
  --accent-rgb: 242, 169, 59;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Drawing-style headings ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { color: var(--muted); margin-top: 14px; }

section { padding: 96px 0; border-bottom: 1px solid var(--line-soft); position: relative; }

/* corner registration marks on key sections */
.registered { position: relative; }
.registered::before,
.registered::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--line);
  top: 24px;
}
.registered::before { left: 24px; border-right: none; border-bottom: none; }
.registered::after { right: 24px; border-left: none; border-bottom: none; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.brand-mark {
  width: 34px; height: 34px;
  border: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--accent);
  transform: rotate(0deg);
}
.brand span.sub { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--muted); font-weight: 400; letter-spacing: 0.08em; }

.nav-links { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 16px; }
.icon-btn {
  width: 38px; height: 38px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; background: none;
  font-family: var(--font-mono); font-size: 14px;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

.menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-solid { background: var(--accent); color: #0B0F14; font-weight: 600; }
.btn-solid:hover { background: transparent; color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub { color: var(--muted); font-size: 18px; margin: 24px 0 36px; max-width: 520px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-diagram {
  aspect-ratio: 1/1;
  border: 1px solid var(--line);
  position: relative;
  background: var(--surface);
}
.hero-diagram svg { width: 100%; height: 100%; }

/* ---------- Stats ---------- */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-soft);
  margin-top: 80px;
}
.stat {
  padding: 32px 24px 0;
  border-left: 1px solid var(--line-soft);
}
.stat:first-child { border-left: none; padding-left: 0; }
.stat .num {
  font-family: var(--font-mono); font-size: clamp(28px, 3vw, 40px);
  color: var(--accent); font-weight: 600;
}
.stat .label { color: var(--muted); font-size: 13px; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Services / cards ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.service-card {
  background: var(--surface); padding: 32px 24px;
  transition: background 0.25s;
}
.service-card:hover { background: var(--surface-2); }
.service-card .tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent-2); }
.service-card h3 { font-size: 18px; margin: 14px 0 10px; }
.service-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Projects ---------- */
.project-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.project-card {
  border: 1px solid var(--line-soft);
  background: var(--surface);
}
.project-thumb {
  aspect-ratio: 4/3; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--line); font-family: var(--font-mono); font-size: 12px;
  overflow: hidden;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: 22px; }
.project-cat { font-family: var(--font-mono); font-size: 11px; color: var(--accent); text-transform: uppercase; }
.project-body h3 { font-size: 19px; margin: 10px 0; }
.project-body p { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.project-link { font-family: var(--font-mono); font-size: 12px; color: var(--accent-2); }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.team-card { border: 1px solid var(--line-soft); background: var(--surface); text-align: left; }
.team-photo { aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-info { padding: 18px 20px; }
.team-info h4 { font-size: 16px; }
.team-info .role { color: var(--accent-2); font-family: var(--font-mono); font-size: 12px; margin-top: 4px; }
.team-info .meta { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* ---------- Testimonials ---------- */
.testimonial-card {
  border: 1px solid var(--line-soft); background: var(--surface);
  padding: 32px; max-width: 640px;
}
.testimonial-card .stars { color: var(--accent); font-family: var(--font-mono); letter-spacing: 2px; }
.testimonial-card p.quote { font-size: 18px; margin: 18px 0; }
.testimonial-card .who { color: var(--muted); font-family: var(--font-mono); font-size: 13px; }

/* ---------- Clients ---------- */
.client-row {
  display: flex; flex-wrap: wrap; gap: 40px; align-items: center;
  color: var(--muted); font-family: var(--font-mono); font-size: 15px;
}
.client-row span { border: 1px solid var(--line-soft); padding: 14px 22px; }

/* ---------- CTA ---------- */
.cta {
  text-align: center; padding: 100px 0;
}
.cta h2 { font-size: clamp(28px, 4vw, 44px); max-width: 640px; margin: 0 auto 32px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-item { margin-bottom: 24px; }
.contact-item .k { font-family: var(--font-mono); font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.contact-item .v { font-size: 16px; margin-top: 4px; }

.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); padding: 13px 14px; font-family: var(--font-body); font-size: 14px;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--accent);
}

/* ---------- Footer ---------- */
.site-footer { padding: 60px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; letter-spacing: 0.05em; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text); font-size: 14px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line-soft); padding-top: 24px;
  display: flex; justify-content: space-between; color: var(--muted); font-size: 13px;
  font-family: var(--font-mono);
}

/* ---------- Scroll to top ---------- */
#scrollTop {
  position: fixed; bottom: 28px; right: 28px;
  width: 46px; height: 46px; border: 1px solid var(--accent);
  background: var(--bg); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  font-family: var(--font-mono);
}
#scrollTop.visible { opacity: 1; pointer-events: auto; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Detail page (team / project) ---------- */
.detail-header { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
.detail-photo { border: 1px solid var(--line-soft); aspect-ratio: 1; overflow: hidden; background: var(--surface); }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.fact .k { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.fact .v { font-size: 15px; margin-top: 4px; }

.doc-list { list-style: none; padding: 0; margin: 24px 0 0; border: 1px solid var(--line-soft); }
.doc-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.doc-item:last-child { border-bottom: none; }
.doc-item .doc-name { display: flex; align-items: center; gap: 12px; }
.doc-item .doc-name::before { content: "▤"; color: var(--accent-2); }
.doc-actions a { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-left: 16px; }
.doc-actions a:hover { color: var(--accent); }

/* ---------- Utility states ---------- */
.state-msg { color: var(--muted); font-family: var(--font-mono); font-size: 14px; padding: 40px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-diagram { max-width: 420px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .detail-header { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .card-grid, .project-grid, .team-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  section { padding: 64px 0; }
}
