/* =========================================================
   Avante Garde Technologies — stylesheet
   Palette: primary/deep blue, pale blue and slate neutrals.
   Type: Inter
   ========================================================= */

:root {
  --bg:          #eaf4ff;
  --bg-alt:      #eaf4ff;
  --ink:         #1e293b;
  --ink-soft:    #64748b;
  --muted:       #64748b;
  --line:        #e2e8f0;
  --brass:       #0d6efd;
  --brass-dark:  #003e9c;
  --dark:        #003e9c;
  --dark-2:      #003e9c;
  --maxw: 1180px;
  --pad: clamp(1.25rem, 5vw, 4rem);

  --f-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(.4, 0, .2, 1);
}
.section-action { margin-top: 2rem; }
.project-card-grid,
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}
.home-projects {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}
.project-card-grid.project-cards-highlight:not(.home-projects) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}
.project-cards-highlight .project-card {
  overflow: hidden;
  border: 2px solid var(--brass-dark);
  background: linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);
  border-radius: 14px;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 24px rgba(0, 62, 156, 0.08);
  padding: 0;
}
.project-cards-highlight .project-card::before {
  content: "";
  display: block;
  height: 150px;
  background: linear-gradient(135deg, #0a67ff 0%, #003e9c 100%);
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.project-cards-highlight .project-card > * {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.project-cards-highlight .project-card .project-tag {
  padding-top: 1.25rem;
  margin-bottom: .9rem;
  color: var(--brass-dark);
  letter-spacing: .14em;
}
.project-cards-highlight .project-card h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 1.8vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -.04em;
  font-weight: 600;
}
.project-cards-highlight .project-card p:not(.project-meta) {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 28ch;
}
.project-cards-highlight .project-meta {
  margin-top: auto;
  padding-bottom: 1.5rem;
  font-size: .7rem;
  letter-spacing: .18em;
  color: var(--brass-dark);
  font-weight: 600;
}
.project-card,
.team-card {
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.3rem);
  background: #fff;
  border: 1px solid var(--brass);
  border-top: 3px solid var(--brass);
}
.team-card {
  background: linear-gradient(135deg, #f4f8ff, #fff);
  border: 1px solid #d7e5f5;
  border-left: 4px solid var(--brass);
  border-radius: 10px;
}
.project-tag,
.project-meta,
.team-card .service-index {
  font-family: var(--f-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.5;
  text-transform: uppercase;
}
.project-tag { color: var(--brass-dark); }
.project-card h3,
.team-card h3 {
  margin: 1.1rem 0 .7rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}
.project-card p:not(.project-meta),
.team-card p { color: var(--ink-soft); font-size: .93rem; }
.project-meta { margin-top: 1.3rem; color: var(--muted); }
.team-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.team-card .service-index { color: var(--brass-dark); }
.process-list--three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.process-list--three article { padding: 2.4rem 1.8rem 2.6rem; background: var(--bg-alt); }
.process-list--three h3 {
  margin-bottom: .7rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.process-list--three p { color: var(--ink-soft); font-size: .9rem; }
.about-points--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-visual {
  min-height: 300px;
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 82% 18%, rgba(13,110,253,.35), transparent 28%),
    linear-gradient(135deg, #0d6efd, #003e9c);
}
.feature-visual span {
  color: rgba(255,255,255,.72);
  font-size: clamp(4rem, 11vw, 8rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.08em;
}
.feature-visual strong {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.25;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

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

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

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: .01em;
}

.eyebrow {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .72rem;
  font-weight: 400;
  color: var(--brass-dark);
  margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .74rem;
  padding: 1.05rem 2.1rem;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn-solid { background: var(--brass-dark); color: #fff; }
.btn-solid:hover { background: var(--brass-dark); border-color: var(--brass-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-block { width: 100%; }

/* on light sections a ghost-less solid is fine; add a light-bg outline variant */
.section .btn-ghost { color: var(--ink); border-color: var(--ink); }
.section .btn-ghost:hover { background: var(--ink); color: #fff; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg-alt);
  box-shadow: 0 1px 0 var(--line);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .4rem;
  padding-bottom: .4rem;
}
.site-header.scrolled {
  background: rgba(234,244,255,.96);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.scrolled .header-inner { padding-top: .35rem; padding-bottom: .35rem; }

.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); }
.site-header.scrolled .brand { color: var(--ink); }
.brand-logo {
  display: block;
  width: 110px;
  height: 57px;
  object-fit: contain;
}
.brand-mark {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: .05em;
  border: 1.5px solid currentColor;
  padding: .28rem .5rem;
  font-size: .95rem;
  line-height: 1;
}
.brand-text {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .9rem;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-sub { letter-spacing: .3em; font-size: .62rem; color: var(--brass); }

.main-nav { display: flex; align-items: center; gap: 2.5rem; }
.main-nav ul { display: flex; gap: 2rem; list-style: none; }
.nav-link {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .74rem;
  color: var(--ink);
  padding: .3rem 0;
  position: relative;
}
.site-header.scrolled .nav-link { color: var(--ink); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--brass);
  transition: width .3s var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link[aria-current="page"]::after { width: 100%; }

.nav-cta { padding: .85rem 1.6rem; font-size: .68rem; background: var(--brass-dark); border-color: var(--brass-dark); color: #fff; }
.site-header.scrolled .nav-cta { background: var(--brass-dark); border-color: var(--brass-dark); color: #fff; }
.nav-cta:hover,
.site-header.scrolled .nav-cta:hover { background: var(--brass-dark); border-color: var(--brass-dark); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.site-header.scrolled .nav-toggle span { background: var(--ink); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  background: var(--bg-alt);
  color: #fff;
  overflow: hidden;
}
.hero-slides { display: contents; }
.hero-slide {
  grid-column: 1;
  grid-row: 1;           /* stack every slide in the same cell */
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  padding: 108px 0 64px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  isolation: isolate;
  transition: opacity .9s var(--ease), visibility .9s var(--ease);
}
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  transition: transform 7s linear;
  z-index: 0;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15,23,42,.68) 0%, rgba(15,23,42,.42) 45%, rgba(15,23,42,.18) 100%);
  z-index: 1;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide.is-active::before { transform: scale(1); }

.hero-content { max-width: 760px; min-width: 0; position: relative; z-index: 2; }
.hero-content .eyebrow,
.page-intro .eyebrow,
.feature-band-copy .eyebrow { color: var(--bg-alt); }
.hero .btn-solid {
  background: var(--bg-alt);
  border-color: var(--line);
  color: var(--dark);
}
.hero .btn-solid:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: #fff;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 300;
  margin-bottom: 1.6rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  overflow-wrap: break-word;
}
.hero-text {
  font-size: 1.05rem;
  color: rgba(255,255,255,.82);
  max-width: 46ch;
  margin-bottom: 2.4rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  background: #fff;
  color: var(--dark);
  border: 1px solid #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .25s var(--ease);
  z-index: 5;
}
.hero-arrow:hover { background: #eaf4ff; }
.hero-prev { left: 0; }
.hero-next { right: 0; }

.hero-dots {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .7rem;
  z-index: 5;
}
.hero-dots button {
  width: 34px; height: 3px;
  background: rgba(255,255,255,.35);
  border: 0;
  cursor: pointer;
  transition: background .25s var(--ease);
}
.hero-dots button.is-active { background: var(--brass); }

/* ---------- Interior page heading ---------- */
.page-intro {
  background-color: #1e293b;
  background-image: linear-gradient(120deg, rgba(15,23,42,.58), rgba(15,23,42,.38));
  background-size: cover;
  background-position: center;
  color: #fff;
  min-height: clamp(42rem, 80svh, 56rem);
  display: flex;
  align-items: center;
  padding: 10.5rem 0 4rem;
}
.page-intro--services {
  background-image: linear-gradient(120deg, rgba(15,23,42,.58), rgba(15,23,42,.38)), url("../img/hero/service-network-equipment.jpg");
}
.page-intro--projects {
  background-image: linear-gradient(120deg, rgba(15,23,42,.58), rgba(15,23,42,.38)), url("../img/hero/project-network-cabling.jpg");
}
.page-intro--about {
  background-image: linear-gradient(120deg, rgba(15,23,42,.58), rgba(15,23,42,.38)), url("../img/top-view-people-using-tablet.jpg");
}
.page-intro--contact {
  background-image: linear-gradient(120deg, rgba(15,23,42,.58), rgba(15,23,42,.38)), url("../img/happy-african-american-businesswoman-drinking-coffee-conference-call-laptop.jpg");
}
.page-intro h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.page-intro p:not(.eyebrow) {
  max-width: 62ch;
  color: rgba(255,255,255,.78);
  margin-top: 1rem;
}

/* =========================================================
   SECTION SCAFFOLD
   ========================================================= */
.section { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.services-page main > .section + .section {
  padding-top: clamp(2rem, 4vw, 3rem);
}
.section-head { max-width: 640px; margin-bottom: 3.5rem; }
.section-head h2 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 54px; height: 2px;
  background: var(--brass);
  margin-top: 1.2rem;
}
.section-lede { color: var(--ink-soft); margin-top: 1.2rem; font-size: 1.02rem; }

/* =========================================================
   SERVICES
   ========================================================= */
.services,
.featured,
.process {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--bg-alt);
  background-repeat: no-repeat;
}
.services > .container,
.featured > .container,
.process > .container {
  position: relative;
  z-index: 1;
}
.services::before,
.featured::before,
.process::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: clamp(180px, 16vw, 240px);
  aspect-ratio: 2 / 1;
  background: url("../avantegarde-logo.png") center / contain no-repeat;
  opacity: .1;
  pointer-events: none;
}
.services::before {
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
}
.featured::before {
  top: 50%;
  left: 1.5rem;
  transform: translateY(-50%);
}
.projects-featured::before {
  top: clamp(2rem, 5vw, 4rem);
  right: max(1.5rem, calc((100vw - var(--maxw)) / 2 + 1.5rem));
  left: auto;
  transform: none;
}
.process::before {
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
}
.values-section::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 1rem;
  left: max(1.5rem, calc((100vw - var(--maxw)) / 2 + 1.5rem));
  width: clamp(180px, 16vw, 240px);
  aspect-ratio: 2 / 1;
  background: url("../avantegarde-logo.png") center / contain no-repeat;
  opacity: .1;
  pointer-events: none;
}
.services {
  background-image: none;
}
.featured {
  background-image: none;
}
.process {
  background-image: none;
}
.home-page #services {
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.home-page .featured {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}
.home-page #services::before {
  top: clamp(4.5rem, 10vw, 8rem);
  right: max(1.5rem, calc((100vw - var(--maxw)) / 2 + 1.5rem));
  transform: none;
}
.home-page #services::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  width: clamp(150px, 14vw, 200px);
  aspect-ratio: 2 / 1;
  top: 1rem;
  left: max(1.5rem, calc((100vw - var(--maxw)) / 2 + 1.5rem));
  background: url("../avantegarde-logo.png") center / contain no-repeat;
  opacity: .1;
  pointer-events: none;
}
.home-page .featured::before {
  display: block;
  top: clamp(2.5rem, 5vw, 4rem);
  right: max(1.5rem, calc((100vw - var(--maxw)) / 2 + 1.5rem));
  left: auto;
  transform: none;
}
.business-support-services::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  width: clamp(180px, 16vw, 240px);
  aspect-ratio: 2 / 1;
  top: clamp(2.5rem, 5vw, 4rem);
  right: max(1.5rem, calc((100vw - var(--maxw)) / 2 + 1.5rem));
  background: url("../avantegarde-logo.png") center / contain no-repeat;
  opacity: .1;
  pointer-events: none;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.service-card {
  background: #fff;
  border: 1px solid #d7e5f5;
  border-top: 3px solid var(--brass);
  border-radius: 12px;
  padding: 2.2rem 2rem 2.4rem;
  box-shadow: 0 8px 20px rgba(0, 62, 156, .06);
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.service-card:hover {
  background: var(--dark);
  border-color: var(--dark);
  box-shadow: 0 14px 28px rgba(0, 62, 156, .18);
  transform: translateY(-3px);
}
.service-card:hover h3,
.service-card:hover p { color: #fff; }
.service-card:hover .service-index { color: #8fbdff; }
.service-index {
  font-family: var(--f-display);
  font-size: .8rem;
  letter-spacing: .2em;
  color: var(--brass-dark);
  font-weight: 600;
}
.service-card h3 {
  font-size: 1.3rem;
  margin: 1rem 0 .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.service-card p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Other divisions ---------- */
.more-services { border-top: 1px solid var(--line); }
.service-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-card .service-index { font-size: .85rem; }

/* =========================================================
   FEATURED
   ========================================================= */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.featured-card .featured-img {
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: center;
  filter: grayscale(.15);
  transition: filter .4s var(--ease), transform .4s var(--ease);
}
.featured-card:hover .featured-img { filter: grayscale(0); transform: scale(1.01); }
.featured-card h3 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 1.3rem 0 .3rem;
}
.featured-card .meta {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .68rem;
  color: var(--muted);
}

/* =========================================================
   FEATURE BAND
   ========================================================= */
.feature-band { background: var(--dark); color: #fff; }
.feature-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}
.feature-band-media {
  aspect-ratio: 5 / 4;
  background-size: cover;
  background-position: center;
}
.feature-band-copy h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 1.4rem;
}
.feature-band-copy > p { color: rgba(255,255,255,.75); margin-bottom: 1.8rem; }
.check-list { list-style: none; margin-bottom: 2.2rem; }
.check-list li {
  padding: .7rem 0 .7rem 1.9rem;
  position: relative;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
  font-size: .95rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.15rem;
  width: 10px; height: 10px;
  border-right: 2px solid var(--brass);
  border-bottom: 2px solid var(--brass);
  transform: rotate(45deg);
}

/* =========================================================
   GALLERY
   ========================================================= */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2.5rem;
}
.filter-btn {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .7rem;
  padding: .7rem 1.3rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .25s var(--ease);
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
}
.gallery-note {
  margin-top: 1.8rem;
  font-size: .8rem;
  color: var(--muted);
}
.gallery-note code { background: var(--bg-alt); padding: .1rem .3rem; }
.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-alt);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(.2);
  transition: transform .5s var(--ease), filter .5s var(--ease);
}
.gallery-item:hover img { transform: scale(1.06); filter: grayscale(0); }
.gallery-item .gi-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem;
  background: linear-gradient(to top, rgba(0,62,156,.82), transparent 60%);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.gallery-item:hover .gi-overlay { opacity: 1; }
.gi-overlay strong {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fff;
  font-size: .95rem;
}
.gi-overlay span {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .62rem;
  color: var(--brass);
}
.gallery-item.is-hidden { display: none; }

/* =========================================================
   PROCESS
   ========================================================= */
.process-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  counter-reset: step;
}
.process-list li {
  background: #fff;
  padding: 2.4rem 1.8rem 2.6rem;
}
.process-num {
  font-family: var(--f-display);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--brass);
  display: block;
  margin-bottom: .8rem;
}
.process-list h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .7rem;
}
.process-list p { color: var(--ink-soft); font-size: .9rem; }

/* =========================================================
   ABOUT
   ========================================================= */
.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
}
.about-media { position: relative; }
.about-img { background-size: cover; background-position: center; }
.about-img-1 { aspect-ratio: 3 / 4; }
.about-img-2 {
  position: absolute;
  right: -1.5rem; bottom: -2.5rem;
  width: 55%;
  aspect-ratio: 1 / 1;
  border: 8px solid var(--bg);
}
.about.section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.about.section::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 1.5rem;
  right: max(1.5rem, calc((100vw - var(--maxw)) / 2 + 1.5rem));
  width: clamp(180px, 16vw, 240px);
  aspect-ratio: 2 / 1;
  background: url("../avantegarde-logo.png") center / contain no-repeat;
  opacity: .1;
  pointer-events: none;
}
.services-page #security::before {
  top: 4rem;
  transform: none;
}
.about-copy h2 {
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 1.4rem;
}
.about-copy p { color: var(--ink-soft); margin-bottom: 1.1rem; }
.about-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.about-points strong {
  font-family: var(--f-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .8rem;
  display: block;
  margin-bottom: .3rem;
}
.about-points span { font-size: .82rem; color: var(--muted); }

.about-summary {
  position: relative;
  overflow: hidden;
  background: #fff;
}
.about-summary::before,
.about-summary::after {
  content: "";
  position: absolute;
  width: clamp(180px, 16vw, 240px);
  aspect-ratio: 2 / 1;
  background: url("../avantegarde-logo.png") center / contain no-repeat;
  opacity: .08;
  z-index: 0;
  pointer-events: none;
}
.about-summary::before {
  left: 1.5rem;
  top: .2rem;
}
.about-summary::after {
  right: 1.5rem;
  bottom: .2rem;
}
.about-summary .container {
  position: relative;
  z-index: 1;
}
.about-summary .section-head {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  text-align: center;
}
.about-summary .section-head h2::after {
  margin-left: auto;
  margin-right: auto;
}
.about-summary p {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  line-height: 1.55;
  margin-bottom: 1.3rem;
  text-align: center;
}

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem;
}
.testimonial {
  border: 1px solid var(--line);
  padding: 2.2rem 2rem;
}
.testimonial p {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.testimonial footer {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .66rem;
  color: var(--brass-dark);
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact { background: var(--dark); color: #fff; }
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 7vw, 5.5rem);
}
.contact-copy h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.contact-copy h2::after {
  content: ""; display: block;
  width: 54px; height: 2px; background: var(--brass);
  margin: 1.2rem 0;
}
.contact-copy > p { color: rgba(255,255,255,.72); margin-bottom: 2rem; }
.contact-details { list-style: none; }
.contact-details li {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.2rem;
  padding: .9rem 0;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .92rem;
  color: rgba(255,255,255,.85);
}
.contact-details li span {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .64rem;
  color: var(--brass);
  min-width: 70px;
  padding-top: .15rem;
}
.contact-details a:hover { color: var(--brass); }
.contact-details li em { font-style: normal; font-size: .72rem; color: var(--muted); }
.contact-copy .section-action .btn-ghost {
  background: #fff;
  border-color: #fff;
  color: var(--dark);
}
.contact-copy .section-action .btn-ghost:hover {
  background: #eaf4ff;
  border-color: #eaf4ff;
  color: var(--dark);
}

.quote-form { background: #fff; color: var(--ink); padding: clamp(1.6rem, 4vw, 2.6rem); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.field { display: block; margin-bottom: 1rem; }
.field span {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .64rem;
  color: var(--ink-soft);
  display: block;
  margin-bottom: .45rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--f-body);
  font-size: .92rem;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--ink);
  transition: border-color .2s var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brass);
}
.field textarea { resize: vertical; }
.field input.invalid,
.field textarea.invalid { border-color: var(--brass-dark); background: var(--bg-alt); }

.form-status {
  margin-top: 1rem;
  font-size: .85rem;
  font-weight: 500;
  min-height: 1.2em;
}
.form-status.ok { color: var(--brass-dark); }
.form-status.err { color: var(--brass-dark); }
.form-note {
  margin-top: 1rem;
  font-size: .72rem;
  color: var(--muted);
}
.form-note code { background: var(--bg-alt); padding: .1rem .3rem; }
.form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--dark-2); color: rgba(255,255,255,.7); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  padding-top: 4.5rem;
  padding-bottom: 3rem;
}
.brand-light { color: #fff; margin-bottom: 1.2rem; }
.footer-brand .brand-logo {
  width: 170px;
  height: 88px;
  filter: brightness(0) invert(1);
}
.footer-brand p { font-size: .85rem; max-width: 34ch; }
.footer-col h4 {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  color: #fff;
  margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { padding: .35rem 0; font-size: .86rem; }
.footer-col a:hover { color: var(--brass); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: 1.8rem;
  padding-bottom: 2.2rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .74rem;
  color: var(--muted);
}

/* =========================================================
   TO-TOP
   ========================================================= */
.to-top {
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  width: 46px; height: 46px;
  background: var(--ink);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .25s var(--ease);
  z-index: 90;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--brass-dark); }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,62,156,.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 4rem 1rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(90vw, 1100px);
  max-height: 80vh;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1.2rem; right: 1.5rem;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  width: 52px; height: 52px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.lightbox-nav:hover { background: var(--brass-dark); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-caption {
  position: absolute;
  bottom: 1.6rem;
  left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,.8);
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.card-reveal {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--stagger-delay, 0s);
}
.card-reveal.in { opacity: 1; transform: translateX(0); }
.service-card.card-reveal.in:hover { transform: translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card-reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide::before { transition: none; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .service-grid,
  .gallery-grid,
  .process-list { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .project-card-grid.project-cards-highlight:not(.home-projects) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* 3-item grids: skip the lopsided 2-col-with-orphan step, go straight to 1 col */
  .featured-grid,
  .testimonial-grid,
  .service-grid.service-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .feature-band-inner,
  .about-inner,
  .contact-inner { grid-template-columns: minmax(0, 1fr); }
  .project-card-grid,
  .team-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .process-list--three { grid-template-columns: minmax(0, 1fr); }
  .about-img-2 { position: static; width: 60%; margin: -3rem 0 0 auto; border: 0; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* backdrop-filter would make the header the containing block for the fixed
     menu below, shrinking it to the header's height once the page scrolls. */
  .site-header.scrolled { backdrop-filter: none; background: var(--bg-alt); }

  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    background: var(--dark);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
  }
  .main-nav.open { transform: translateX(0); box-shadow: -12px 0 32px rgba(0,0,0,.35); }
  .main-nav ul { flex-direction: column; gap: 1.4rem; }
  .main-nav .nav-link,
  .site-header.scrolled .main-nav .nav-link { color: #fff; font-size: .95rem; }
  .nav-cta,
  .site-header.scrolled .nav-cta { color: #fff; background: var(--brass-dark); border-color: var(--brass-dark); }
  .nav-toggle { display: flex; z-index: 101; }
  .nav-toggle.open span { background: #fff; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-slide::after {
    background: linear-gradient(180deg, rgba(15,23,42,.5), rgba(15,23,42,.72));
  }
}

@media (max-width: 560px) {
  .service-grid,
  .featured-grid,
  .gallery-grid,
  .process-list,
  .testimonial-grid,
  .about-points,
  .about-points--three,
  .project-card-grid,
  .team-grid,
  .footer-grid,
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .project-card-grid.project-cards-highlight:not(.home-projects) {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-slide { padding: 96px 0 44px; }
  .page-intro {
    min-height: clamp(34rem, 68svh, 42rem);
    padding: 8rem 0 4rem;
  }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.5rem); letter-spacing: .02em; }
  .hero h1 br { display: none; }
  .hero-text { font-size: .98rem; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-arrow { display: none; }
  .hero-dots { bottom: 1.4rem; }
  .footer-bottom { flex-direction: column; }
  .btn { white-space: normal; text-align: center; }
  /* Cards stack in one column here: rise in place instead of sliding in from
     the right (which pushed the page wider than the screen), with no stagger. */
  .card-reveal { transform: translateY(24px); transition-delay: 0s; }
  .card-reveal.in { transform: none; }
}
