/* =========================
   MrQ Engineering Base Style
   ========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f1113;
  --bg-soft: #161a1d;
  --card: #1b2024;
  --text: #e6e6e6;
  --muted: #8a8f98;
  --line: #2a2f34;
  --accent: #00aeef;
  --accent-soft: rgba(0, 174, 239, 0.12);
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  opacity: 0.9;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
}

/* =========================
   Header
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 17, 19, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text);
  font-size: 0.98rem;
}

.site-nav a:hover {
  color: var(--accent);
}

.nav-cta {
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent) !important;
}

.nav-cta:hover {
  background: var(--accent-soft);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

/* =========================
   Hero
   ========================= */

.hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(0, 174, 239, 0.08), transparent 28%),
    linear-gradient(180deg, #101316 0%, #0f1113 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 4.4rem);
  line-height: 1.02;
  margin-bottom: 20px;
  max-width: 7ch;
}

.hero-text {
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 18px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 4px;
  transition: 0.2s ease;
}

.btn:hover {
  background: var(--accent-soft);
}

.btn-secondary {
  border-color: var(--line);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* =========================
   Hero visual
   ========================= */

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 380px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
    radial-gradient(circle at center, rgba(0,174,239,0.10), transparent 62%);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 174, 239, 0.04);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.25;
}

/* =========================
   General sections
   ========================= */

section {
  padding: 72px 0;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 18px;
  line-height: 1.15;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

p {
  color: var(--muted);
}

.intro,
.system-thinking {
  border-bottom: 1px solid var(--line);
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

/* =========================
   Cards
   ========================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 24px;
  min-height: 220px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 174, 239, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 174, 239, 0.08);
}

.card p {
  margin-bottom: 18px;
}

.card a {
  font-weight: 700;
}

/* =========================
   CTA section
   ========================= */

.cta-section {
  padding-top: 80px;
  padding-bottom: 80px;
}

.cta-box {
  text-align: center;
  background: linear-gradient(180deg, rgba(0,174,239,0.05), rgba(0,174,239,0.02));
  border: 1px solid var(--line);
  padding: 48px 24px;
}

.cta-box p {
  max-width: 760px;
  margin: 0 auto 24px;
}

/* =========================
   Footer
   ========================= */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  background: #0c0e10;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-start;
}

.footer-inner h3 {
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================
   Inner Pages
   ========================= */

.page-hero {
  padding: 90px 0 50px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(0, 174, 239, 0.06), transparent 28%),
    linear-gradient(180deg, #101316 0%, #0f1113 100%);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 1.08;
  margin-bottom: 18px;
  max-width: 14ch;
}

.page-hero-text {
  max-width: 70ch;
  font-size: 1.08rem;
  color: var(--muted);
}

.content-section {
  padding: 68px 0;
  border-bottom: 1px solid var(--line);
}

.section-band {
  background: rgba(255, 255, 255, 0.015);
}

.narrow {
  max-width: 860px;
}

.narrow p + p,
.content-section p + p {
  margin-top: 18px;
}

/* =========================
   Form Styling
   ========================= */

.tech-form {
  margin-top: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  background: #0f1113;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.95rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0,174,239,0.03);
}

textarea {
  resize: vertical;
}

/* =========================
   Diagram
   ========================= */

.system-diagram {
  width: 100%;
  max-width: 460px;
}

.system-diagram text {
  font-family: Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.3px;
  opacity: 0.95;
}

.system-diagram rect {
  stroke-width: 1.4;
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(0,174,239,0.25));
}

.system-diagram line {
  stroke-width: 1.5;
  opacity: 0.9;
  filter: drop-shadow(0 0 3px rgba(0,174,239,0.3));
  stroke-dasharray: 6 6;
  animation: flow 10s linear infinite;
}

@keyframes flow {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: 24;
  }
}

/* =========================
   Tablet / Smaller Desktop
   ========================= */

@media (max-width: 980px) {
  .hero-grid,
  .two-column,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

  .footer-inner {
    flex-direction: column;
  }
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 768px) {
  .site-header {
    position: static;
  }

  .header-inner {
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 0;
  }

  .logo {
    font-size: 1.1rem;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: 8px;
  }

  .site-nav.active {
    display: flex;
  }

  .site-nav a {
    font-size: 0.95rem;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
  }

  .hero {
    padding: 50px 0 36px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero h1 {
    font-size: 2.05rem;
    max-width: 100%;
    line-height: 1.08;
    margin-bottom: 16px;
  }

  .hero-text {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 22px;
  }

  .hero-panel {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    padding: 18px;
  }

  .system-diagram {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: block;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions .btn,
  .btn {
    width: 100%;
    text-align: center;
  }

  section,
  .content-section {
    padding: 46px 0;
  }

  .page-hero h1 {
    font-size: 2rem;
    max-width: 100%;
  }

  .page-hero-text {
    font-size: 0.95rem;
  }

  .card-grid,
  .two-column {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .card {
    min-height: auto;
  }

  .footer-inner {
    flex-direction: column;
    gap: 20px;
  }
}