/* Brilliant Engineering Solutions -- public website */
:root {
  --navy: #0a1a2f;
  --navy-2: #12284a;
  --blue: #0c63f6;
  --blue-dark: #0a4fc4;
  --orange: #ff8a1f;
  --orange-dark: #e9740a;
  --ink: #142033;
  --ink-2: #44546a;
  --muted: #6b7a8f;
  --line: #e3e8f0;
  --tint: #f4f7fb;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 26, 47, .06), 0 10px 30px rgba(10, 26, 47, .07);
  --font: "Manrope", "Noto Sans Myanmar", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--white);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
/* Myanmar script needs taller lines than Latin text to stay readable. */
body.lang-my { line-height: 1.9; }
body.lang-my h1, body.lang-my h2, body.lang-my h3 { line-height: 1.55; letter-spacing: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { margin: 6px 0; }
.plain a { text-decoration: none; color: rgba(255, 255, 255, .78); }
.plain a:hover { color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px;
  font-weight: 700; font-size: 15px; text-decoration: none; border: 1.5px solid transparent;
  transition: background .15s, border-color .15s, color .15s, transform .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--orange); color: #fff; }
.btn-accent:hover { background: var(--orange-dark); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #e9eef6; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand img { height: 36px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-2); padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--blue); }
.nav .nav-cta { color: #fff; margin-left: 8px; padding: 10px 16px; }
.nav .nav-cta:hover { color: #fff; background: var(--orange-dark); }
.lang-switch { font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink-2); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.lang-switch:hover { border-color: var(--blue); color: var(--blue); }
.menu-btn { display: none; background: none; border: 0; padding: 8px; color: var(--ink); cursor: pointer; }

@media (max-width: 920px) {
  .top-row { gap: 12px; }
  .lang-switch { margin-left: auto; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 20px; margin: 0;
    box-shadow: var(--shadow); transform: translateY(-120%); transition: transform .25s ease; visibility: hidden;
  }
  .nav.open { transform: none; visibility: visible; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 17px; }
  .nav .nav-cta { margin: 14px 0 0; justify-content: center; border: 0; border-radius: 10px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; color: #fff; min-height: min(86vh, 760px); display: flex; align-items: flex-end;
  background: var(--navy) radial-gradient(1200px 500px at 85% -10%, rgba(12, 99, 246, .45), transparent 60%);
  overflow: hidden;
}
/* Blueprint grid when there is no project photo yet. */
.hero:not(.has-photo)::before {
  content: ""; position: absolute; inset: 0; opacity: .18;
  background-image: linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .25) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .25) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 26, 47, .15) 0%, rgba(10, 26, 47, .55) 45%, rgba(10, 26, 47, .92) 100%); }
.hero:not(.has-photo) .hero-shade { display: none; }
.hero-inner { position: relative; padding: 140px 0 64px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12.5px; font-weight: 700; color: var(--orange); margin-bottom: 18px; }
.lang-my .eyebrow { letter-spacing: .04em; text-transform: none; font-size: 14px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 64px); font-weight: 800; max-width: 17ch; }
.lang-my .hero h1 { font-size: clamp(26px, 4vw, 46px); max-width: 24ch; }
.hero .lead { font-size: clamp(16px, 1.6vw, 19px); color: rgba(255, 255, 255, .86); max-width: 60ch; margin: 22px 0 30px; }
.hero-caption { display: inline-block; margin-top: 34px; font-size: 13px; color: rgba(255, 255, 255, .7); text-decoration: none; border-left: 2px solid var(--orange); padding-left: 10px; }
.hero-caption:hover { color: #fff; }

/* ---------- stats ---------- */
.stats { background: var(--navy-2); color: #fff; }
.stats-row { display: flex; flex-wrap: wrap; gap: 12px 56px; padding: 22px 0; }
.stats-row div { display: flex; align-items: baseline; gap: 10px; }
.stats-row strong { font-size: 26px; font-weight: 800; color: var(--orange); }
.stats-row span { color: rgba(255, 255, 255, .78); font-size: 14.5px; }

/* ---------- sections ---------- */
.sec { padding: 88px 0; }
.sec-tight { padding: 40px 0 72px; }
.sec-tint { background: var(--tint); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; }
.sec-head p { margin: 8px 0 0; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--blue); text-decoration: none; font-size: 15px; }
.link-more:hover { gap: 10px; }
.empty { color: var(--muted); padding: 40px 0; }
.h-small { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 32px 0 14px; font-weight: 700; }
.lang-my .h-small { text-transform: none; letter-spacing: 0; font-size: 16px; }

.page-head { padding: 72px 0 24px; background: linear-gradient(180deg, var(--tint), #fff); }
.page-head h1 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; }
.page-head .lead { font-size: 18px; color: var(--ink-2); margin: 14px 0 0; max-width: 60ch; }

/* ---------- project cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; gap: 22px; } }
.card { text-decoration: none; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(10, 26, 47, .06), 0 18px 40px rgba(10, 26, 47, .12); }
.card-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 18px 20px 22px; }
.card-body h3 { font-size: 18px; font-weight: 700; }
.card-body p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.ph-empty { width: 100%; height: 100%; background: linear-gradient(135deg, var(--tint), #e6ecf5); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip { text-decoration: none; font-weight: 600; font-size: 14.5px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: #fff; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- services ---------- */
.svc-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.svc-grid li { background: #fff; border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.svc-no { font-weight: 800; color: var(--orange); font-size: 14px; letter-spacing: .06em; }
.svc-grid h3 { font-size: 18px; margin: 10px 0 8px; }
.svc-grid p { color: var(--ink-2); font-size: 15px; margin: 0; }
.svc-list { list-style: none; padding: 0; margin: 0; }
.svc-list li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.svc-list li:first-child { border-top: 1px solid var(--line); }
.svc-list .svc-no { font-size: 22px; }
.svc-list h3 { font-size: 21px; margin-bottom: 6px; }
.svc-list p { color: var(--ink-2); margin: 0; }

/* ---------- project page ---------- */
.proj-hero { padding: 44px 0 0; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px; margin-bottom: 18px; }
.back:hover { color: var(--blue); }
.proj-hero h1 { font-size: clamp(30px, 4.2vw, 50px); font-weight: 800; margin-bottom: 28px; max-width: 24ch; }
.proj-cover { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: var(--tint); }
.proj-cover img { width: 100%; max-height: 78vh; object-fit: cover; }
.proj-grid { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; }
@media (max-width: 900px) { .proj-grid { grid-template-columns: 1fr; gap: 28px; } }
.proj-text { font-size: 17px; color: var(--ink-2); }
.facts { margin: 0; background: var(--tint); border-radius: var(--radius); padding: 8px 22px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: 14.5px; }
.facts dd { margin: 0; font-weight: 700; text-align: right; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: #eef4ff; color: var(--blue-dark); font-weight: 600; font-size: 14px; padding: 7px 13px; border-radius: 8px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.gallery button { padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; background: var(--tint); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.04); }
.pager { display: flex; justify-content: space-between; gap: 20px; padding: 0 0 72px; flex-wrap: wrap; }
.pager a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; color: var(--ink-2); max-width: 46%; }
.pager a:hover { color: var(--blue); }

/* ---------- about + contact ---------- */
.prose { font-size: 18px; color: var(--ink-2); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.c-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.c-item { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.c-item a, .c-item span:not(.c-icon):not(.c-label) { font-weight: 700; font-size: 18px; text-decoration: none; }
.c-item a:hover { color: var(--blue); }
.c-label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.c-icon { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #eef4ff; color: var(--blue); }
.c-office { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 30px; }
.c-office .c-icon { background: rgba(255, 255, 255, .1); color: var(--orange); margin-bottom: 18px; }
.c-office h3 { font-size: 20px; margin-bottom: 10px; }
.c-office p { color: rgba(255, 255, 255, .82); font-size: 17px; }
.c-office .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }

/* ---------- call to action + footer ---------- */
.cta { background: linear-gradient(120deg, var(--blue-dark), var(--blue)); color: #fff; }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 56px 0; flex-wrap: wrap; }
.cta h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 800; }
.cta p { margin: 10px 0 0; color: rgba(255, 255, 255, .86); max-width: 52ch; }
.foot { background: var(--navy); color: #fff; padding: 64px 0 0; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 36px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.foot h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 255, 255, .55); margin-bottom: 14px; }
.lang-my .foot h4 { text-transform: none; letter-spacing: 0; font-size: 15px; }
.foot .muted { color: rgba(255, 255, 255, .7); }
.foot-logo { height: 34px; width: auto; background: #fff; padding: 6px 10px; border-radius: 8px; margin-bottom: 16px; }
.foot-base { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 48px; padding: 22px 0 28px; color: rgba(255, 255, 255, .5); font-size: 13.5px; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6, 14, 26, .94); display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 30px; cursor: pointer; line-height: 1; }
.lightbox button:hover { background: rgba(255, 255, 255, .2); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
