:root {
  --navy: #0a2c5e;
  --navy-2: #12407f;
  --navy-dark: #071f45;
  --ink: #0b2a55;
  --body: #3b4b61;
  --muted: #6f7d8f;
  --sky: #d6e8fa;
  --sky-light: #eef5fd;
  --line: #d5dfeb;
  --card: #ffffff;
  --bg: #ffffff;
  --tint: #f4f8fd;
  --amber: #f2b233;
  --amber-dark: #d99a17;
  --radius: 16px;
  --nav-h: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }

/* `hidden` must win over display rules such as .contact-card { display: flex }. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: 'Poppins', 'Noto Sans Sinhala', system-ui, sans-serif;
  line-height: 1.6;
}

img { max-width: 100%; }
h1, h2, h3 { color: var(--ink); line-height: 1.3; }
a { color: var(--navy); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--amber); color: var(--navy-dark); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }

/* Buttons --------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; text-decoration: none; border-radius: 12px; padding: 12px 20px;
  border: 1.5px solid transparent; cursor: pointer; min-height: 48px; text-align: center; line-height: 1.3;
}
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 0.9rem; }
.btn-amber { background: var(--amber); color: var(--navy-dark); }
.btn-amber:hover { background: var(--amber-dark); }
.btn-ghost { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--line); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* Navigation ------------------------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; transition: box-shadow 0.2s, border-color 0.2s;
}
.nav.scrolled { border-color: var(--line); box-shadow: 0 4px 18px rgba(10, 44, 94, 0.08); }
.nav-inner { display: flex; align-items: center; gap: 12px; min-height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; flex: 1 1 auto; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; flex: none; object-fit: contain; }
.brand-logo { background: #fff; border: 1px solid var(--line); padding: 2px; }
.brand-name { font-weight: 700; color: var(--ink); font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: var(--body); text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 10px; }
.nav-links a:hover { background: var(--sky-light); color: var(--navy); }
.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.lang { display: inline-flex; background: var(--sky-light); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button {
  font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--navy); background: transparent; border: 0;
  border-radius: 999px; padding: 4px 10px; cursor: pointer; min-width: 40px; min-height: 32px;
}
.lang button[aria-pressed='true'] { background: var(--navy); color: #fff; }

.menu-btn { display: none; background: transparent; border: 0; color: var(--navy); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.menu-btn:hover { background: var(--sky-light); }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav-call { display: none; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: var(--nav-h); flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(10, 44, 94, 0.1); padding: 8px 16px 14px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; border-radius: 8px; font-size: 1.02rem; }
}

/* Hero ------------------------------------------------------------------------------------ */
.hero { background: linear-gradient(155deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.eyebrow { display: inline-block; margin: 0 0 14px; padding: 6px 12px; border-radius: 999px; background: rgba(242, 178, 51, 0.16); color: #ffd98a; font-weight: 600; font-size: 0.86rem; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 5vw, 3rem); margin: 0 0 14px; }
.lead { font-size: 1.05rem; color: rgba(255, 255, 255, 0.88); margin: 0 0 24px; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 0; margin: 30px 0 0; }
.trust li { display: flex; flex-direction: column; }
.trust strong { color: #fff; font-size: 1.35rem; }
.trust span { color: rgba(255, 255, 255, 0.75); font-size: 0.86rem; }
.hero-media { position: relative; }
.hero-media img, .hero-art {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3); background: #163f78;
}
.hero-badge {
  position: absolute; left: 16px; bottom: 16px; right: 16px; margin: 0; padding: 10px 14px; border-radius: 12px;
  background: rgba(7, 31, 69, 0.82); color: #fff; font-weight: 600; font-size: 0.9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; padding-bottom: 44px; }
}

/* Sections -------------------------------------------------------------------------------- */
.section { padding: 72px 0; }
.section-tint { background: var(--tint); }
.section-navy { background: var(--navy); color: rgba(255, 255, 255, 0.86); }
.section-navy h2, .section-navy h3 { color: #fff; }
.section h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 0 0 12px; }
.kicker { margin: 0 0 6px; color: var(--amber-dark); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.kicker-light { color: var(--amber); }
@media (max-width: 600px) { .section { padding: 52px 0; } }

.cards-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; margin-top: 26px; }
.service { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.service svg { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--sky-light); fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { margin: 14px 0 6px; font-size: 1.08rem; }
.service p { margin: 0; font-size: 0.94rem; }

.why { display: grid; grid-template-columns: 1fr 1.2fr; gap: 36px; align-items: start; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ticks li { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.tick { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: var(--navy-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ticks strong { color: var(--ink); }
.ticks p { margin: 2px 0 0; font-size: 0.93rem; }
@media (max-width: 860px) { .why { grid-template-columns: 1fr; gap: 20px; } }

/* Projects -------------------------------------------------------------------------------- */
.status { color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.status:empty { display: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; margin-top: 24px; }
.grid:empty { display: none; }
.card {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; cursor: pointer;
  font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(10, 44, 94, 0.12); }
.card-media { position: relative; }
.card-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--sky-light); display: block; }
.card-count { position: absolute; right: 10px; bottom: 10px; background: rgba(7, 31, 69, 0.78); color: #fff; font-size: 0.8rem; padding: 3px 8px; border-radius: 999px; }
.card-body { padding: 16px 18px 18px; }
.card h3 { margin: 0 0 6px; font-size: 1.06rem; }
.caption { margin: 0 0 8px; font-size: 0.93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin: 0; font-size: 0.82rem; color: var(--muted); }

/* Steps ----------------------------------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.steps li { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--radius); padding: 20px; }
.steps span { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; background: var(--amber); color: var(--navy-dark); font-weight: 700; }
.steps h3 { margin: 12px 0 4px; font-size: 1.05rem; }
.steps p { margin: 0; font-size: 0.93rem; }

/* About ----------------------------------------------------------------------------------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.about-text { white-space: pre-line; margin: 0; font-size: 1.02rem; }
.about-card { background: var(--sky-light); border-left: 5px solid var(--amber); border-radius: 14px; padding: 22px; }
.about-card p { margin: 0; color: var(--ink); font-weight: 600; font-size: 1.08rem; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 20px; } }

/* Contact --------------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin-top: 22px; }
.contact-card {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 14px; background: #fff;
  border: 1px solid var(--line); text-decoration: none; color: var(--body); min-width: 0;
}
.contact-card:hover { border-color: var(--navy); box-shadow: 0 8px 20px rgba(10, 44, 94, 0.08); }
.c-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--sky-light); display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.contact-card strong { display: block; color: var(--ink); }
.c-value { display: block; overflow-wrap: anywhere; color: var(--navy); font-weight: 500; }
.contact-empty { margin-top: 16px; }
.hours { margin: 22px 0 0; color: var(--body); }

/* Footer ---------------------------------------------------------------------------------- */
.footer { background: var(--navy-dark); color: rgba(255, 255, 255, 0.78); padding: 48px 0 0; font-size: 0.93rem; }
.footer a { color: rgba(255, 255, 255, 0.86); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer h3 { color: #fff; font-size: 1rem; margin: 0 0 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.brand-footer .brand-name { color: #fff; }
.footer-text { margin: 12px 0 0; max-width: 340px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 32px; padding-top: 16px; padding-bottom: 88px; font-size: 0.85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
@media (min-width: 861px) { .footer-bottom { padding-bottom: 20px; } }

/* WhatsApp button ------------------------------------------------------------------------- */
.fab-wa {
  position: fixed; right: 16px; bottom: 16px; z-index: 15; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* Photo viewer ---------------------------------------------------------------------------- */
.viewer { width: min(960px, calc(100vw - 16px)); max-height: calc(100vh - 16px); padding: 12px; border: 0; border-radius: 16px; background: #0b1424; color: #fff; }
.viewer::backdrop { background: rgba(5, 12, 24, 0.82); }
.viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.viewer-top h3 { margin: 0; font-size: 1rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-stage { position: relative; display: flex; align-items: center; justify-content: center; margin-top: 10px; }
.viewer-stage img { max-width: 100%; max-height: 70vh; border-radius: 10px; display: block; }
.icon-btn { font: inherit; font-size: 1.3rem; line-height: 1; color: #fff; background: rgba(255, 255, 255, 0.14); border: 0; border-radius: 999px; width: 44px; height: 44px; cursor: pointer; flex: none; }
.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.prev { left: 6px; }
.next { right: 6px; }
.viewer-caption { margin: 10px 2px 0; white-space: pre-line; }
.viewer-count { margin: 4px 2px 0; color: #9fb0c6; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
  .card:hover { transform: none; }
}
