/* =========================================================
   ATOS GROUP — design tokens
   Palette drawn from the subject itself: poured concrete,
   steel, site-safety amber (hazard bollards / floor lining),
   and the navy of trade-certification signage.
   ========================================================= */
:root {
  --concrete: #edebe6;
  --concrete-dark: #e1ddd4;
  --charcoal: #1b1e22;
  --charcoal-soft: #262a30;
  --steel: #6b7178;
  --steel-light: #9aa0a6;
  --navy: #24425f;
  --amber: #e8a33d;
  --amber-dark: #c98a2c;
  --white: #ffffff;

  --font-display: "Archivo", sans-serif;
  --font-body: "Public Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --max-width: 1240px;
  --edge: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--concrete);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--amber-dark);
  font-weight: 500;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.95em 1.6em;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn-primary { background: var(--amber); color: var(--charcoal); }
.btn-primary:hover { background: var(--amber-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn-dark { background: var(--charcoal); color: var(--white); }
.btn-dark:hover { background: var(--navy); }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 30px 0;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(27, 30, 34, 0.94);
  backdrop-filter: blur(6px);
  padding: 16px 0;
  box-shadow: 0 2px 18px rgba(0,0,0,0.25);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }

.wordmark {
  text-decoration: none;
  display: flex;
  align-items: center;
}
.wordmark .logo-img {
  height: 66px;
  width: auto;
  display: block;
  transition: height 0.3s ease;
}
.site-header.is-scrolled .wordmark .logo-img {
  height: 52px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--amber); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 3px;
  color: var(--white);
  padding: 8px 10px;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--charcoal);
    flex-direction: column;
    padding: 100px 32px 32px;
    gap: 1.6rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { font-size: 1rem; }
  .nav-toggle { display: inline-flex; }
  .wordmark .logo-img { height: 54px; }
  .site-header.is-scrolled .wordmark .logo-img { height: 44px; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 88vh;
  padding: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--charcoal);
}
.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14,16,18,0.62) 0%, rgba(14,16,18,0.52) 50%, rgba(14,16,18,0.88) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
  text-align: center;
}
.hero h1 {
  color: var(--white);
  font-weight: 900;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
  text-transform: uppercase;
  max-width: 21ch;
  margin: 0 auto;
  text-wrap: balance;
  text-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.hero-sub {
  color: rgba(255,255,255,0.82);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  max-width: 46ch;
  margin: 1.1rem auto 0;
}

/* accreditation strip, directly beneath the hero */
.accred-strip {
  background: var(--charcoal);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
}
.accred-strip .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  flex-wrap: wrap;
}
.accred-strip img { height: 46px; width: auto; }
.accred-strip span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--steel);
}
@media (max-width: 560px) {
  .accred-strip .wrap { gap: 1.4rem; }
  .accred-strip span { width: 100%; text-align: center; font-size: 0.66rem; }
}

/* =========================================================
   SECTION SCAFFOLDING
   ========================================================= */
section { padding: 96px 0; }
.projects-page-head { padding-top: 180px; padding-bottom: 56px; }
.section-head { max-width: 640px; margin-bottom: 3.2rem; }
.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 800;
  margin-top: 0.6rem;
  text-transform: uppercase;
}
.section-head p { color: var(--steel); font-size: 1.05rem; margin-top: 1rem; }

.on-dark { background: var(--charcoal); color: var(--white); }
.on-dark .section-head p { color: var(--steel-light); }
.on-dark .eyebrow { color: var(--amber); }

/* =========================================================
   SERVICES
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}
.service-card {
  background: var(--white);
  border-radius: 4px;
  padding: 2rem 1.7rem;
  border-left: 3px solid transparent;
  box-shadow: 0 1px 3px rgba(20,20,20,0.06);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(18px);
}
.service-card.is-visible { opacity: 1; transform: translateY(0); }
.service-card:hover {
  border-left-color: var(--amber);
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(20,20,20,0.1);
}
.service-icon {
  width: 34px; height: 34px;
  margin-bottom: 1.3rem;
  color: var(--navy);
}
.service-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 0.6rem;
}
.service-card p { color: var(--steel); font-size: 0.95rem; }

/* =========================================================
   SAFETY / ACCREDITATION BAND
   ========================================================= */
.safety-band { position: relative; }
.safety-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 780px) { .safety-grid { grid-template-columns: 1fr; } }

.safety-copy .eyebrow { margin-bottom: 1rem; display: block; }
.safety-copy h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 1.2rem;
}
.safety-copy p { color: var(--steel-light); font-size: 1.02rem; }

.safety-plate {
  background: var(--charcoal-soft);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 2.2rem;
}
.badge-row {
  display: flex;
  gap: 2.4rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.6rem;
}
.badge-row img { height: 84px; width: auto; }
.plate-caption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel-light);
  letter-spacing: 0.03em;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.2rem;
}

/* =========================================================
   PROJECTS / CASE STUDIES
   ========================================================= */
/* projects laid out 2 per row */
#projects-detail .wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  align-items: start;
}
@media (max-width: 760px) { #projects-detail .wrap { grid-template-columns: 1fr; } }

.project {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  /* keep the top of a project clear of the fixed header when linked to by anchor */
  scroll-margin-top: 130px;
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(20,20,20,0.07);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.project.is-visible { opacity: 1; transform: translateY(0); }

.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--charcoal);
}

.media-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}
.media-slide.is-active { opacity: 1; visibility: visible; }
.media-slide img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.45s ease;
  cursor: pointer;
}

.media-nav {
  position: absolute;
  top: 50%; left: 12px;
  transform: translateY(-50%);
  z-index: 5;
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27,30,34,0.55);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.media-nav:hover { background: rgba(27,30,34,0.85); }
.media-nav-next { left: auto; right: 12px; }

.media-dots {
  position: absolute;
  bottom: 16px; right: 16px;
  z-index: 4;
  display: flex;
  gap: 6px;
}
.media-dots button {
  width: 7px; height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
}
.media-dots button.is-active { background: var(--amber); }

/* "enlarge" hint badge on project photos */
.media-zoom-hint {
  position: absolute;
  bottom: 16px; left: 16px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(27,30,34,0.78);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 30px;
  padding: 0.45em 0.9em;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.project-media:hover .media-zoom-hint { opacity: 1; }
.media-zoom-hint svg { width: 13px; height: 13px; }

/* per-photo job label, for mixed galleries like Small Works */
.media-label {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 4;
  background: rgba(27,30,34,0.86);
  border: 1px solid rgba(255,255,255,0.2);
  border-left: 3px solid var(--amber);
  border-radius: 2px;
  padding: 0.45em 0.85em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  pointer-events: none;
}

/* "Before & Progress" button — sharp, squared, nudge-arrow on hover */
.btn-progress {
  align-self: flex-start;
  margin-top: auto;
  background: transparent;
  color: var(--charcoal);
  border: 1px solid rgba(27, 30, 34, 0.22);
  border-radius: 2px;
  padding: 0.72em 1.05em;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}
.btn-progress::after {
  content: "\2192";
  margin-left: 0.15em;
  transition: transform 0.18s ease;
}
.btn-progress:hover {
  background: var(--charcoal);
  color: var(--white);
  border-color: var(--charcoal);
  transform: none;
}
.btn-progress:hover::after { transform: translateX(3px); }
.btn-progress svg { width: 14px; height: 14px; }

.project-body {
  padding: 1.7rem 1.7rem 1.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-body h3 {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.project-body p { color: var(--steel); font-size: 0.92rem; margin-bottom: 1.4rem; }
/* category tags removed site-wide (projects + homepage tiles) */
.project-tag { display: none; }

/* video project variant */
.project-video video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* =========================================================
   PROJECTS PREVIEW (homepage teaser cards)
   ========================================================= */
.projects-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.project-preview-card {
  display: block;
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(20,20,20,0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.project-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(20,20,20,0.1);
}
.project-preview-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.project-preview-body { padding: 1.6rem 1.6rem 1.8rem; }
.project-preview-body h3 {
  font-size: 1.12rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0.7rem 0 0.6rem;
}
.project-preview-body p { color: var(--steel); font-size: 0.92rem; }

.projects-preview-cta { margin-top: 2.6rem; }

/* =========================================================
   ABOUT
   ========================================================= */
/* centred about section */
#about.about-centered { text-align: center; }
.about-centered h2 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800;
  text-transform: uppercase;
  margin: 0.6rem 0 0;
  white-space: nowrap;
}
@media (max-width: 640px) { .about-centered h2 { white-space: normal; } }
.about-rule { width: 60px; height: 3px; background: var(--amber); margin: 1.4rem auto 1.9rem; }
.about-lead { color: var(--charcoal); font-size: 1.12rem; max-width: 58ch; margin: 0 auto 1.9rem; }
.about-body { color: var(--steel); font-size: 1rem; max-width: 62ch; margin: 0 auto 1.1rem; line-height: 1.65; }
.about-badges { justify-content: center; margin-top: 2.3rem; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.2rem;
}
.stat {
  border-left: 2px solid var(--amber);
  padding-left: 0.9rem;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
}
.stat span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--steel);
}

/* =========================================================
   CONTACT / FOOTER
   ========================================================= */
.contact-band { background: var(--charcoal); color: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-grid h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  text-transform: uppercase;
  font-weight: 800;
  max-width: 14ch;
}
.contact-grid .section-head p { margin-top: 1.1rem; }

.contact-plate {
  background: var(--charcoal-soft);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 2.2rem;
}
.contact-line {
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-body);
  font-size: 0.98rem;
}
.contact-line:last-of-type { border-bottom: none; }
.contact-line span:first-child { color: var(--steel-light); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem; padding-top: 0.15rem; }
.contact-line a { text-decoration: none; color: var(--white); }
.contact-line a:hover { color: var(--amber); }
.contact-plate .btn { margin-top: 1.6rem; width: 100%; justify-content: center; }

footer.site-footer {
  background: var(--charcoal);
  color: var(--steel-light);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 28px 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; }

/* reveal-on-scroll base for non-card elements */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   LIGHTBOX — enlarged photos + before/progress galleries
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 10, 12, 0.96);
  backdrop-filter: blur(6px);
  padding: clamp(16px, 5vw, 40px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
body.lightbox-open { overflow: hidden; }

.lightbox-stage {
  position: relative;
  max-width: 1300px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  /* leave room in the margins for the edge arrows (Overbury-style) */
  padding: 0 clamp(10px, 7vw, 92px);
}
@media (max-width: 700px) { .lightbox-stage { padding: 0; } }

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-height: 100%;
  min-height: 0;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  background: var(--charcoal);
  transform: scale(0.97);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lightbox.is-open .lightbox-figure img { transform: scale(1); }

.lightbox-caption {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.78);
  text-align: center;
  max-width: 62ch;
  line-height: 1.5;
}
.lightbox-phase {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--charcoal);
  background: var(--amber);
  border-radius: 2px;
  padding: 0.25em 0.6em;
  margin-right: 0.6em;
  vertical-align: 0.1em;
}

.lightbox-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.5);
}

/* controls — solid white circles pinned to the screen edges (Overbury-style) */
.lightbox-close,
.lightbox-nav {
  position: fixed;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: none;
  color: var(--charcoal);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  transition: background 0.2s ease, transform 0.2s ease;
  padding: 0;
}
.lightbox-close:hover { background: var(--amber); transform: scale(1.06); }

.lightbox-close {
  top: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 32px);
  width: 46px; height: 46px;
  font-size: 1.5rem;
  line-height: 1;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 58px; height: 58px;
  font-size: 2rem;
  line-height: 1;
}
.lightbox-nav:hover { background: var(--amber); transform: translateY(-50%) scale(1.06); }
.lightbox-prev { left: clamp(14px, 3vw, 48px); }
.lightbox-next { right: clamp(14px, 3vw, 48px); }

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
}

@media (max-width: 700px) {
  .lightbox-nav { width: 46px; height: 46px; font-size: 1.6rem; }
  .lightbox-close { width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-figure img { max-height: 70vh; }
  .lightbox-caption { font-size: 0.84rem; }
}
