/* =========================================================
   Gray Infrastructure — Minimal & Modern theme
   ========================================================= */

:root {
  /* Palette — to match the logo (charcoal grey + orange) */
  --ink: #33353a;           /* logo charcoal grey */
  --ink-soft: #4b4c50;      /* logo grey */
  --muted: #7c7f85;
  --line: #e6e7ea;
  --paper: #ffffff;
  --paper-alt: #f5f5f6;     /* soft neutral grey */
  --accent: #f59121;        /* logo orange */
  --accent-soft: #fdecd8;   /* light orange wash */
  --accent-ink: #b5640d;    /* deep orange (accessible on white) */
  --accent-bright: #ffa73d; /* brighter orange for highlights */

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1140px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 30px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; color: var(--ink-soft); }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1rem;
}

.section { padding: clamp(56px, 9vw, 110px) 0; }
.section--alt { background: var(--paper-alt); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #2a2b2e; }        /* dark text on orange — accessible */
.btn--primary:hover { background: var(--accent-ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }

/* Visible keyboard focus for accessibility */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent-ink); outline-offset: 2px; border-radius: 4px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 800; letter-spacing: -0.02em; font-size: 1.1rem; }
.brand .mark {
  width: 36px; height: 36px; border-radius: 9px;
  background: center / cover no-repeat url('../assets/logo-mark.svg');
  font-size: 0; /* hide fallback GI text, show SVG mark */
}
.brand .mark span { color: var(--accent); }
.brand-logo { height: 36px; width: auto; display: block; }
.site-footer .brand-logo { height: 32px; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { position: relative; font-size: .95rem; font-weight: 500; color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -22px; height: 3px;
  background: var(--accent); border-radius: 3px; transition: right .22s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
@media (max-width: 860px) { .nav-links a::after { display: none; } }
.nav-cta { display: flex; align-items: center; gap: 1rem; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: .25s; }

@media (max-width: 860px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .nav-links.open li { padding: 12px 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(64px, 11vw, 132px) 0 clamp(56px, 9vw, 100px); overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 500px at 75% -10%, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, #fff, var(--paper-alt));
}
/* Optional hero background image (enabled by JS when assets/media/hero.jpg exists) */
.hero.has-bg::after {
  background:
    linear-gradient(180deg, rgba(24,26,29,.72), rgba(24,26,29,.84)),
    var(--hero-img) center / cover no-repeat;
}
.hero.has-bg h1, .hero.has-bg .stat strong { color: #fff; }
.hero.has-bg .lead, .hero.has-bg .stat span { color: #e7e9ec; }
.hero.has-bg .eyebrow { color: #ffce9a; }
.hero.has-bg .btn--ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.hero.has-bg .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.hero h1 { max-width: 16ch; }
.hero .lead { margin-top: 1.2rem; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 3.5rem; flex-wrap: wrap; }
.hero-stats .stat strong { display: block; font-size: 2rem; letter-spacing: -0.02em; }
.hero-stats .stat span { color: var(--muted); font-size: .9rem; }

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 920px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card .ico {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center; margin-bottom: 1rem;
}
.card h3 { margin-bottom: .4rem; }
.card p { margin: 0; font-size: .95rem; color: var(--muted); }

.section-head { max-width: 640px; margin-bottom: 3rem; }
.center { text-align: center; margin-inline: auto; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.checklist li { display: flex; gap: .75rem; padding: .55rem 0; color: var(--ink-soft); }
.checklist li::before { content: "✓"; color: var(--accent); font-weight: 700; }

.panel {
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3rem); box-shadow: var(--shadow);
}
.panel p { color: #c9ccd1; }
.panel h3 { color: #fff; }
.panel .row { display: flex; align-items: baseline; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.panel .row:last-child { border-bottom: 0; }
.panel .row strong { color: var(--accent); font-size: 1.4rem; min-width: 3ch; }

/* ---------- CTA band ---------- */
.cta {
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #c9ccd1; max-width: 50ch; margin-inline: auto; }
.cta .hero-actions { justify-content: center; }

/* ---------- Service detail blocks ---------- */
.svc-detail { display: grid; grid-template-columns: 1fr; gap: 0; }
.svc-row {
  display: grid; grid-template-columns: 80px 1fr; gap: 1.5rem;
  padding: 2rem 0; border-bottom: 1px solid var(--line); align-items: start;
}
.svc-row:last-child { border-bottom: 0; }
.svc-row .num { font-size: 1.6rem; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.svc-row h3 { margin-bottom: .4rem; }
.svc-row p { margin: 0; color: var(--muted); }
@media (max-width: 620px) { .svc-row { grid-template-columns: 1fr; gap: .5rem; } }

.tag {
  display: inline-block; font-size: .75rem; font-weight: 600;
  padding: .25rem .6rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); margin-right: .4rem;
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .9rem; font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit; padding: .8rem 1rem; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.info-block { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.info-block:last-child { border-bottom: 0; }
.info-block .k { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .25rem; }
.info-block .v { font-weight: 600; }

/* ---------- Page hero (sub pages) ---------- */
.page-hero { padding: clamp(48px, 8vw, 90px) 0 clamp(32px, 5vw, 56px); background: var(--paper-alt); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9ccd1; padding: clamp(48px, 7vw, 80px) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.site-footer a { color: #c9ccd1; font-size: .95rem; display: block; padding: .25rem 0; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.site-footer .brand .mark { background: center / cover no-repeat url('../assets/logo-mark-reversed.svg'); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 3rem; padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }

/* ---------- Service / partner logos ---------- */
.svc-logo { height: 34px; width: auto; margin-bottom: .9rem; display: block; }

/* ---------- Category quick-links ---------- */
.cat-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.cat-nav a {
  font-size: .88rem; font-weight: 600; padding: .5rem 1.1rem;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  transition: all .2s ease;
}
.cat-nav a:hover { border-color: var(--ink); color: var(--ink); }
.cat-block { scroll-margin-top: 90px; }
.cat-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.75rem; }
.cat-head .num { font-size: .9rem; font-weight: 700; color: var(--accent); letter-spacing: .1em; }

/* ---------- Projects / Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.5rem; }
.filter-btn {
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  padding: .5rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  transition: all .2s ease;
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.project-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.project-card.hide { display: none; }
.project-thumb {
  aspect-ratio: 16 / 10; position: relative;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.05rem;
  letter-spacing: .02em; text-align: center; padding: 1rem;
  background: linear-gradient(135deg, var(--ink), var(--ink-soft));
}
.project-thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.project-thumb span { position: relative; z-index: 1; }
.project-thumb.alt { background: linear-gradient(135deg, var(--accent-ink), var(--accent)); }
.project-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.project-meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); }
.project-body h3 { margin: 0; font-size: 1.1rem; }
.project-body p { margin: 0; font-size: .92rem; color: var(--muted); }
.project-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }

/* ---------- Partner / client logo strip ---------- */
.logo-strip { padding: 2.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.logo-strip .label { text-align: center; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.5rem; }
.logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2.5rem; }
.logos .logo-item {
  font-weight: 700; color: var(--ink-soft); opacity: .75; letter-spacing: -0.01em;
  padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.logos img { height: 34px; width: auto; opacity: .8; }

/* ---------- Testimonials ---------- */
.quote {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; position: relative;
}
.quote::before { content: "\201C"; font-size: 3rem; line-height: 1; color: var(--accent); opacity: .35; font-weight: 800; }
.quote p { font-size: 1.02rem; color: var(--ink); margin: .3rem 0 1.2rem; }
.quote .who { display: flex; align-items: center; gap: .8rem; }
.quote .who .av { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.quote .who b { display: block; font-size: .95rem; }
.quote .who span { font-size: .85rem; color: var(--muted); }

/* ---------- Stat / value band ---------- */
.value-band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: clamp(2rem, 4vw, 3rem); }
.value-band .grid { text-align: center; }
.value-band .stat strong { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--accent-bright); letter-spacing: -0.02em; }
.value-band .stat span { color: #c7ccc9; font-size: .9rem; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 860px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }
.member { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.member:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.member .photo { aspect-ratio: 1 / 1; background: linear-gradient(135deg, var(--accent-ink), var(--accent-bright)); display: grid; place-items: center; color: #fff; font-size: 2rem; font-weight: 800; }
.member .m-body { padding: 1.2rem 1.3rem 1.4rem; }
.member h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.member .role { color: var(--accent-ink); font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.member p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- Icon pillar (sustainability) ---------- */
.pillar .ico { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Mobile sticky action bar ---------- */
.mobilebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; gap: 10px; padding: 10px 14px;
  background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.mobilebar .btn { flex: 1; justify-content: center; padding: .8rem 1rem; }
@media (max-width: 860px) {
  .mobilebar { display: flex; }
  body { padding-bottom: 66px; }
}

/* ---------- Updates / News ---------- */
.update { display: flex; flex-direction: column; gap: .55rem; }
.update .u-media { border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: .4rem; background: var(--paper-alt); }
.update .u-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.update .u-date { font-size: .78rem; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.update h3 { margin: 0; font-size: 1.1rem; }
.update p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.update .u-link { margin-top: .4rem; font-weight: 600; color: var(--accent-ink); font-size: .92rem; align-self: flex-start; }
.update .u-link:hover { text-decoration: underline; }
.updates-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }

/* ---------- Media slots (photo / video placeholders) ---------- */
.media {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--paper-alt); border: 1px dashed #c8d3cc;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3  { aspect-ratio: 4 / 3; }
.media--1x1  { aspect-ratio: 1 / 1; }
.media > img, .media > video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; z-index: 1;
}
.media .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .45rem;
  color: var(--muted); text-align: center; padding: 1rem;
}
.media .ph span { font-size: 2rem; opacity: .5; line-height: 1; }
.media .ph small { font-size: .8rem; letter-spacing: .03em; }

.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 820px) { .media-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .media-grid { grid-template-columns: 1fr; } }

/* Video embed (drop in a YouTube/Vimeo iframe or <video>) */
.video-embed {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius);
  overflow: hidden; background: #0d1310; border: 1px solid var(--line);
}
.video-embed iframe, .video-embed video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video-embed .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: #c7ccc9; }
.video-embed .ph .play { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 1.4rem; }

/* Let project thumbnails hold real images */
.project-thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }

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