/* QMDI website — brand tokens from the QMDI Brand Identity System */
:root {
  --ink: #0E1410;
  --ink-2: #1A211C;
  --ink-3: #232B25;
  --cream: #F2EDD8;
  --cream-2: #E8E2C8;
  --lime: #B1D237;
  --lime-deep: #7FA022;
  --rule: rgba(242, 237, 216, 0.14);
  --muted: rgba(242, 237, 216, 0.62);

  --display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.lime { color: var(--lime); }

h1, h2, h3 {
  font-family: var(--display);
  color: var(--cream);
  font-feature-settings: "ss01", "cv11";
}
h1 { font-size: clamp(40px, 7vw, 80px); font-weight: 900; letter-spacing: -0.04em; line-height: 1.0; }
h2 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 32px; }
h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 8px; }
p + p { margin-top: 16px; }
.lead { font-size: 18px; color: var(--cream); }
.narrow { max-width: 620px; margin: -16px 0 48px; color: var(--muted); }

.label {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 16px;
}

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--lime); color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.01em;
  padding: 16px 28px; border: 1px solid var(--lime); cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); background: #C2E34A; }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--rule); }
.btn-ghost:hover { background: rgba(242, 237, 216, 0.08); border-color: var(--cream); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.play-icon {
  width: 0; height: 0;
  border-left: 10px solid currentColor;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}

/* ───── Nav ───── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 72px;
  transition: background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(14, 20, 16, 0.92); backdrop-filter: blur(12px); border-color: var(--rule); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav-logo img { height: 22px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a:not(.btn) { font-size: 14px; color: var(--muted); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--cream); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 32px; height: 32px; position: relative; }
.nav-toggle span { position: absolute; left: 4px; right: 4px; height: 2px; background: var(--cream); transition: transform .25s; }
.nav-toggle span:first-child { top: 11px; }
.nav-toggle span:last-child { top: 19px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ───── Hero ───── */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; padding: 120px 0 96px;
}
/* Background footage. Slightly softened so the headline stays the hero; the video's own
   caption bar sits under the bottom fade. */
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
  filter: blur(2px) saturate(1.1); transform: scale(1.04);
}
.hero-shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(14,20,16,0.94) 0%, rgba(14,20,16,0.72) 50%, rgba(14,20,16,0.4) 100%),
    linear-gradient(0deg, var(--ink) 0%, var(--ink) 8%, rgba(14,20,16,0) 40%);
}
.grid-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(242,237,216,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242,237,216,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
}
.hero-content { position: relative; z-index: 2; width: 100%; }
.hero-content h1 { max-width: 900px; margin-bottom: 24px; }
.hero-sub { max-width: 560px; font-size: 18px; color: var(--cream-2); margin-bottom: 40px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 32px; z-index: 2;
  display: flex; justify-content: space-between;
}

/* ───── Sections ───── */
.section { position: relative; padding: 128px 0; border-top: 1px solid var(--rule); }
.section-alt { background: var(--ink-2); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.split p { color: var(--muted); }
.split .lead { color: var(--cream); }

/* ───── Service cards ───── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.card { background: var(--ink-2); padding: 40px 32px; position: relative; transition: background .25s; }
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0;
  background: var(--lime); transition: width .35s ease;
}
.card:hover { background: var(--ink-3); }
.card:hover::before { width: 100%; }
.card-num { display: block; margin-bottom: 48px; color: var(--lime); }
.card p { color: var(--muted); font-size: 15px; }

/* ───── Process ───── */
.process { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.process li { border-top: 3px solid var(--lime); padding-top: 24px; }
.process .mono { display: block; margin-bottom: 12px; }
.process p { color: var(--muted); font-size: 15px; }

/* ───── Video ───── */
.video-frame {
  position: relative; border: 1px solid var(--rule); background: #000;
  box-shadow: 0 32px 80px rgba(0,0,0,0.45);
}
.video-frame::after {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--lime);
}
.video-frame video { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }

/* ───── Partners ───── */
.partners { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.partner {
  flex: 0 0 calc(25% - 9px); border: 1px solid var(--rule);
  background: var(--ink); aspect-ratio: 3 / 2;
  display: flex; align-items: center; justify-content: center; padding: 32px;
  transition: background .25s;
}
.partner img {
  max-height: 64px; width: auto; object-fit: contain;
  filter: grayscale(1) brightness(1.6); opacity: 0.75; transition: filter .25s, opacity .25s;
}
.partner:hover { background: var(--ink-2); }
.partner:hover img { filter: none; opacity: 1; }
.partner span {
  font-family: var(--display); font-weight: 700; font-size: clamp(15px, 1.8vw, 20px);
  letter-spacing: -0.01em; text-align: center; color: rgba(242,237,216,0.55); transition: color .25s;
}
.partner:hover span { color: var(--cream); }
.partner-more span { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); }

.partner-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 96px; }
.partner-feature {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; align-items: center;
}
.partner-feature-text { display: grid; gap: 12px; align-content: start; }
.partner-feature .partner-name { font-size: 32px; }
.partner-feature-tall { grid-template-columns: minmax(220px, 320px) 1fr; gap: 48px; }
.partner-feature-tall .partner-video video { aspect-ratio: 9 / 16; }
.partner-wide { grid-column: 1 / -1; }
.partner-video { border: 1px solid var(--rule); background: #000; }
.partner-video video { width: 100%; aspect-ratio: 1280 / 612; object-fit: cover; background: #000; }
.partner-card {
  background: var(--ink-2); border: 1px solid var(--rule); border-top: 3px solid var(--lime);
  padding: 32px; display: grid; gap: 12px; align-content: start;
}
.partner-card h3 { font-size: 26px; margin: 0; }
.partner-card p { color: var(--muted); font-size: 15px; }
.partner-card .mono { color: var(--lime); text-transform: uppercase; font-size: 11px; }
.clients-title { font-size: clamp(24px, 3vw, 32px); font-weight: 700; margin-bottom: 32px; }

/* ───── Contact ───── */
.section-cta { background: var(--ink-2); overflow: hidden; }
.section-cta .wrap { position: relative; z-index: 2; }
.contact-list { list-style: none; margin-top: 40px; border-top: 1px solid var(--rule); }
.contact-list li {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.contact-list a:hover { color: var(--lime); }
.contact-list a { overflow-wrap: anywhere; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.socials a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  border: 1px solid var(--rule); font-family: var(--display); font-weight: 600; font-size: 14px;
  transition: border-color .2s, color .2s;
}
.socials a:hover { border-color: var(--lime); color: var(--lime); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.map { margin-top: 32px; border: 1px solid var(--rule); aspect-ratio: 16 / 10; background: var(--ink); }
/* darken Google's light map so it matches the site */
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: invert(0.9) hue-rotate(180deg) saturate(0.6) brightness(0.95); }
.form-note { font-size: 14px; color: var(--lime); line-height: 1.5; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; color: var(--muted); }
.footer-links a:hover { color: var(--lime); }
.form { display: grid; gap: 16px; background: var(--ink); border: 1px solid var(--rule); padding: 40px; }
.form label {
  display: grid; gap: 8px;
  font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.form input, .form textarea {
  font: 16px/1.5 var(--body); color: var(--cream); letter-spacing: 0; text-transform: none;
  background: var(--ink-2); border: 1px solid var(--rule); padding: 12px 16px; resize: vertical;
  transition: border-color .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--lime); }
.form .btn { justify-content: center; margin-top: 8px; }

/* ───── Footer ───── */
.lime-bar { height: 3px; background: var(--lime); }
.footer { background: #000; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.footer-logo { height: 20px; width: auto; }

/* ───── Video pop-up ───── */
.modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .25s ease;
}
.modal[hidden] { display: none; }
.modal video { width: min(1200px, 100%); max-height: 85vh; background: #000; }
.modal-close {
  position: absolute; top: 16px; right: 24px; background: none; border: 0;
  color: var(--cream); font-size: 40px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--lime); }
@keyframes fade { from { opacity: 0; } }

/* ───── Reveal on scroll ───── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ───── Tablet ───── */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .partner { flex-basis: calc(33.333% - 8px); }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .partner-cards { grid-template-columns: 1fr; }
  .partner-feature { grid-template-columns: 1fr; }
  .partner-feature-tall .partner-video { max-width: 320px; }
}

/* ───── Phone ───── */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .section { padding: 88px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--rule);
    padding: 8px 16px 24px;
    transform: translateY(-120%); transition: transform .3s ease; z-index: -1;
  }
  .nav-links.open { transform: none; }
  .nav-links a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
  .nav-links .btn { margin-top: 16px; justify-content: center; }
  .nav.menu-open { background: var(--ink); }
  .cards, .process { grid-template-columns: 1fr; }
  .partner { flex-basis: calc(50% - 6px); padding: 16px; }
  .form { padding: 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .hero-foot { bottom: 24px; }
}
