/* ============================================================
   MUNARIS — Digital transformation for civil infrastructure
   Shared design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* base — deep cool slate */
  --bg:        oklch(0.158 0.012 248);
  --bg-2:      oklch(0.196 0.014 248);
  --bg-3:      oklch(0.235 0.016 248);
  --bg-glass:  oklch(0.196 0.014 248 / 0.72);

  /* ink */
  --ink:       oklch(0.972 0.005 248);
  --muted:     oklch(0.745 0.012 248);
  --faint:     oklch(0.565 0.012 248);
  --line:      oklch(0.318 0.013 248);
  --line-soft: oklch(0.272 0.012 248);

  /* accents — shared chroma/lightness, varied hue */
  --cyan:      oklch(0.825 0.125 205);
  --cyan-dim:  oklch(0.825 0.125 205 / 0.16);
  --green:     oklch(0.838 0.135 158);
  --amber:     oklch(0.838 0.130 78);

  --radius:    4px;
  --radius-lg: 8px;
  --maxw:      1280px;
  --gutter:    clamp(20px, 5vw, 64px);

  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);

  --f-display: 'Space Grotesk', system-ui, sans-serif;
  --f-body:    'IBM Plex Sans', system-ui, sans-serif;
  --f-mono:    'IBM Plex Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* blueprint grid texture, applied to <body> */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.32;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 30%, transparent 78%);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--cyan); color: var(--bg); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; z-index: 1; padding-block: clamp(72px, 11vw, 132px); }
.section--tight { padding-block: clamp(48px, 7vw, 80px); }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; }
.display {
  font-size: clamp(2.6rem, 6.4vw, 5.1rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -0.028em; }
.h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); letter-spacing: -0.02em; }
.lede { font-size: clamp(1.06rem, 1.5vw, 1.32rem); color: var(--muted); max-width: 60ch; line-height: 1.55; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* mono kicker / data labels */
.kicker {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--cyan);
  display: inline-block;
}
.mono { font-family: var(--f-mono); }
.eyebrow-num { font-family: var(--f-mono); color: var(--faint); font-size: 0.78rem; letter-spacing: 0.1em; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--f-mono);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn .ar { transition: transform .25s var(--ease); }
.btn:hover .ar { transform: translateX(4px); }
.btn--primary { background: var(--cyan); color: oklch(0.18 0.03 248); border-color: var(--cyan); }
.btn--primary:hover { background: oklch(0.88 0.12 205); transform: translateY(-2px); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: var(--bg-glass);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line-soft);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--f-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.02em; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand small { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.18em; color: var(--faint); font-weight: 400; }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  font-family: var(--f-mono); font-size: 0.82rem; letter-spacing: 0.02em;
  color: var(--muted); padding: 8px 14px; border-radius: var(--radius);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.active { color: var(--cyan); }
.nav__cta { margin-left: 10px; }
.nav__burger { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); width: 42px; height: 42px; color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }

@media (max-width: 860px) {
  .nav__links { position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-glass); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line-soft);
    padding: 12px var(--gutter) 22px; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .3s var(--ease); }
  .nav__links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
  .nav__cta { margin: 12px 0 0; }
  .nav__burger { display: inline-flex; }
}

/* ---------- chips / pills ---------- */
.chip {
  font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.02em;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px; transition: border-color .2s, color .2s;
}
.chip:hover { border-color: var(--cyan); color: var(--ink); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); flex: none; }
.dot--green { background: var(--green); }
.dot--amber { background: var(--amber); }

/* ---------- cards ---------- */
.card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line); background: var(--bg-3); }
.card__corner { position: absolute; top: 14px; right: 16px; font-family: var(--f-mono); font-size: 0.72rem; color: var(--faint); }

/* service card */
.svc { display: flex; flex-direction: column; gap: 14px; min-height: 230px; }
.svc__ico { width: 40px; height: 40px; color: var(--cyan); }
.svc h3 { font-size: 1.15rem; }
.svc p { color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.svc:hover .svc__ico { color: var(--green); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line-soft); background: var(--bg-2); padding-block: 64px 32px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--f-mono); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.footer a { display: block; color: var(--muted); font-size: 0.92rem; padding: 5px 0; transition: color .2s; }
.footer a:hover { color: var(--cyan); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--line-soft); font-family: var(--f-mono); font-size: 0.78rem; color: var(--faint); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }

/* ---------- image placeholder ---------- */
.ph {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background:
    repeating-linear-gradient(135deg, oklch(0.235 0.016 248) 0 11px, oklch(0.205 0.014 248) 11px 22px);
  border: 1px solid var(--line-soft);
  display: flex; align-items: flex-end;
}
.ph__tag { font-family: var(--f-mono); font-size: 0.74rem; color: var(--faint); padding: 12px 14px; letter-spacing: 0.02em; }
.ph__tag::before { content: "// "; color: var(--cyan); }

/* ---------- utilities ---------- */
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.wrap-narrow { max-width: 760px; }
.divider { height: 1px; background: var(--line-soft); border: 0; }
.flex-btns { display: flex; flex-wrap: wrap; gap: 14px; }
.section-head { display: flex; flex-direction: column; gap: 18px; max-width: 720px; }

@media (max-width: 600px) { .btn { width: 100%; justify-content: center; } .flex-btns .btn { width: auto; } }
