/* ============================================================
   Sobany & Sons — main stylesheet
   Phase 2: brand foundation + hero
   ============================================================ */

/* ---------- Self-hosted font (Inter variable, no CDN) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/InterVariable.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/InterVariable-Italic.woff2") format("woff2");
}
/* Montserrat (variable) — headings only; body stays Inter */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/Montserrat.woff2") format("woff2");
}

/* ---------- Brand tokens (hex derived from the logo) ---------- */
:root {
  --color-primary: #0360b4;        /* bright blue from the "S" */
  --color-primary-bright: #0277c9; /* brighter blue peak — hover/accents */
  --color-primary-dark: #024a8c;   /* darker blue for active/hover states */
  --color-dark: #282425;           /* grey wordmark / lower half of the "S" */
  --color-black: #120f10;          /* deepest near-black */

  --color-accent: #f5a800;         /* signal amber — used sparingly */
  --color-accent-dark: #d98f00;    /* amber hover/active */

  --color-navy: #0d2b5e;           /* deep navy for dark sections (from demo) */
  --color-navy-deep: #081f3f;      /* darker navy for footer */

  --color-bg: #ffffff;
  --color-bg-alt: #f4f6f8;         /* very light grey section background */
  --color-text: #1a1a1a;
  --color-muted: #5a6068;
  --color-border: #e5e7eb;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Montserrat", var(--font-sans);

  --nav-height: 4rem;
  --content-max: 1100px;
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
}

/* Consistent, visible keyboard focus on all interactive elements
   (element-specific overrides add stronger rings where needed). */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- Sticky top nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  color: var(--color-dark);   /* explicit: never fall back to default link blue */
  text-decoration: none;
}

.nav-logo:hover,
.nav-logo:focus {
  text-decoration: none;
}

.nav-logo__mark {
  height: 44px;
  width: auto;
}

.nav-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo__name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--color-dark);
}

.nav-logo__sub {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--color-dark);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* Hamburger toggle — hidden on desktop, shown < 768px (see media query). */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--color-dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Animate to an X when open. */
.site-nav.is-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-nav.is-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.site-nav.is-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Primary CTA = signal amber with near-black text (contrast ~9.5:1) */
.btn--primary {
  background: var(--color-accent);
  color: var(--color-black);
  border: 2px solid var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

.btn--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.btn--secondary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-black);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  /* The photo crops to fill; the section height is fixed, not photo-driven. */
  height: 100vh;
  display: flex;
  align-items: flex-end;            /* anchor the text block lower */
  padding: 3rem 1rem;
  background-image: url("../assets/img/hero.jpg");
  background-size: cover;
  background-position: 50% 40%;      /* focal point keeps the signal head in view */
  color: #fff;
  scroll-margin-top: var(--nav-height);
  overflow: hidden;
}

/* Overlay: darkest at the bottom-left (behind the text), fading lighter
   toward the top-right so more of the photo shows through. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top right,
      rgba(9, 12, 20, 0.85) 0%,
      rgba(9, 12, 20, 0.42) 42%,
      rgba(9, 12, 20, 0.08) 78%,
      rgba(9, 12, 20, 0.02) 100%
    ),
    linear-gradient(
      to top,
      rgba(9, 12, 20, 0.3) 0%,
      rgba(9, 12, 20, 0) 38%
    );
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.hero__content {
  max-width: 36rem;            /* keep line lengths intentional; fits the name on one line */
  padding-bottom: 1.5rem;
}

@media (min-width: 768px) {
  /* a bit more breathing room below the CTA buttons on desktop */
  .hero__content {
    padding-bottom: 3.5rem;
  }
}

.hero__name {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hero__tagline {
  margin: 0.5rem 0 0;
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  font-weight: 600;
  color: #eaf2fb;
}

.hero__lead {
  margin: 0.75rem 0 0;
  font-size: clamp(1rem, 3vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  color: #d7e3f2;
}

.hero__positioning {
  margin: 1.25rem 0 0;
  max-width: 46ch;
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
  color: #e8ebf0;
}

.hero__actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Section scaffolding ---------- */
.section-block {
  scroll-margin-top: var(--nav-height);
}

.section-block--alt {
  background: var(--color-bg-alt);
}

.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 5.5rem 1.25rem;
}

/* Small uppercase eyebrow label above each section heading (demo pattern) */
.section__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.section__title {
  margin: 0 0 1.5rem;
  font-family: var(--font-head);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.04;
  color: var(--color-dark);
}

/* Subtle fade-up on section headings (only when JS + motion are on;
   see js/anim.js). No-JS / reduced-motion leaves them visible. */
.js-anim .section__title {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js-anim .section__title.is-in {
  opacity: 1;
  transform: none;
}

.section__intro {
  margin: 0 0 2.5rem;
  max-width: 60ch;
  font-size: 1.1rem;
  color: var(--color-muted);
}

/* Placeholder sections still using the Phase 1 stub class */
.section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 1rem;
  scroll-margin-top: var(--nav-height);
}

/* ---------- Navy sections (dark) ---------- */
.section-block--navy {
  background: var(--color-navy);
  color: #b8cbe4;                 /* lightened body text (contrast ~7:1 on navy) */
}
.section-block--navy .section__title {
  color: #ffffff;
}
.section-block--navy .section__eyebrow {
  color: #7bbcff;
}

/* ---------- About (dark navy, split with the traffic light) ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.about__main p {
  margin: 0 0 1.15rem;
  font-size: 1.08rem;
  color: #b8cbe4;
}
.about__main strong {
  color: #ffffff;
}

.about__vision {
  margin: 1.75rem 0 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #7bbcff;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 8px 8px 0;
  font-size: 1.12rem;
  font-style: italic;
  color: #eaf2fb;
}

.about__vision-label {
  display: block;
  margin-bottom: 0.4rem;
  font-style: normal;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7bbcff;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.25rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.4rem 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.stat__num {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 900;
  color: #ffffff;                 /* number in white */
  letter-spacing: -0.02em;
}
.stat__suffix {
  color: var(--color-accent);     /* only the "+" / "/7" in amber */
}

.stat__label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8aafd6;
}

/* ---------- Signature traffic light ---------- */
.about__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.traffic-light {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tl-housing {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 18px 15px;
  background: #16233a;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 45px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.tl-housing::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  width: 40px;
  height: 12px;
  background: #16233a;
  border-radius: 4px 4px 0 0;
}

.tl-pole {
  width: 9px;
  height: 130px;
  background: linear-gradient(180deg, #2a3a50, #16223a);
  border-radius: 0 0 4px 4px;
}

.tl-light {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.tl-light--red {
  background: #3a1a1a;
}
.tl-light--amber {
  background: #3a2a0a;
}
.tl-light--green {
  background: #0a2a1a;
}
.tl-light--red.is-on {
  background: #e63946;
  box-shadow: 0 0 20px 6px rgba(230, 57, 70, 0.7), 0 0 60px 20px rgba(230, 57, 70, 0.3);
}
.tl-light--amber.is-on {
  background: var(--color-accent);
  box-shadow: 0 0 20px 6px rgba(245, 168, 0, 0.7), 0 0 60px 20px rgba(245, 168, 0, 0.3);
}
.tl-light--green.is-on {
  background: #2dc653;
  box-shadow: 0 0 20px 6px rgba(45, 198, 83, 0.7), 0 0 60px 20px rgba(45, 198, 83, 0.3);
}

/* ---------- Trusted Partners strip ---------- */
.partners {
  border-top: 1px solid var(--color-border);
}
.partners .section-inner {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.partners__label {
  margin: 0 0 1.75rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-muted);
}
.partners__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.75rem 3.5rem;
}
.partner {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Placeholder names now; drop in <img class="partner__logo"> later (one-line swap) */
.partner__name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #a3a9b2;
  transition: color 0.2s ease;
}
.partner:hover .partner__name {
  color: var(--color-dark);
}
.partner__logo {
  max-height: 46px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.partner:hover .partner__logo {
  filter: grayscale(0);
  opacity: 1;
}

/* ---------- Full-bleed category panel strip ---------- */
.section-inner--tight-bottom {
  padding-bottom: 2.5rem;
}
.section-inner--tight-top {
  padding-top: 3rem;
}

.cat-strip {
  display: flex;
  gap: 2px;
  margin: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-strip::-webkit-scrollbar {
  display: none;
}

.cat-panel {
  position: relative;
  flex: 0 0 100%;                 /* phones: one full-width panel at a time */
  min-width: 100%;
  scroll-snap-align: start;
  height: 68vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
  background: var(--color-primary);
  transition: flex-grow 0.3s ease;
}

.cat-panel__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.cat-panel__bigicon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 132px;
  height: 132px;
  color: #fff;
  opacity: 0.22;
}
.cat-panel__bigicon svg {
  width: 100%;
  height: 100%;
}

.cat-panel__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 10, 18, 0.3) 0%,
    rgba(6, 10, 18, 0.5) 55%,
    rgba(6, 10, 18, 0.78) 100%
  );
  transition: opacity 0.3s ease;
}
.cat-panel--blue .cat-panel__overlay {
  background: linear-gradient(
    to bottom,
    rgba(2, 40, 78, 0) 0%,
    rgba(2, 40, 78, 0.3) 100%
  );
}

.cat-panel__name {
  position: relative;
  z-index: 2;
  padding: 0 1rem;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 7vw, 2.4rem);   /* bold hero label on mobile */
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.cat-panel__plus {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
  color: #fff;
  transition: transform 0.25s ease;
}

/* hover / focus: overlay lightens, background eases in */
.cat-panel:hover .cat-panel__overlay,
.cat-panel:focus-visible .cat-panel__overlay {
  opacity: 0.6;
}

/* active category: brighter overlay, underlined name, "+" rotates to a close */
.cat-panel.is-active .cat-panel__overlay {
  opacity: 0.5;
}
.cat-panel.is-active .cat-panel__name {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 6px;
  text-decoration-thickness: 3px;
}
.cat-panel.is-active .cat-panel__plus {
  transform: translateX(-50%) rotate(45deg);
  color: var(--color-accent);
}
.cat-panel:hover .cat-panel__bg,
.cat-panel:focus-visible .cat-panel__bg {
  transform: scale(1.06);
}
.cat-panel:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -3px;
}

@media (min-width: 700px) {
  .cat-panel {
    flex: 0 0 50%;               /* tablet: two visible, arrows advance one */
    min-width: 50%;
    height: 420px;
  }
}

@media (min-width: 1200px) {
  .cat-strip {
    overflow: hidden;             /* all 8 fit — no scroll */
  }
  .cat-panel {
    flex: 1 1 0;                  /* equal slim columns filling the viewport */
    min-width: 0;                 /* release the floor so they can share width */
    height: 440px;
  }
  .cat-panel:hover,
  .cat-panel:focus-visible {
    flex-grow: 1.8;               /* gently grow; neighbours shrink */
  }
  .cat-panel__name {
    font-size: clamp(1rem, 1.4vw, 1.25rem);   /* small labels for slim columns */
  }
  .cat-arrow {
    display: none !important;     /* no carousel arrows on desktop */
  }
}

/* ---------- Mobile carousel arrows ---------- */
.cat-carousel {
  position: relative;
}

.cat-arrow {
  display: none;                  /* shown only when the strip is scrollable */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(6, 10, 18, 0.45);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.cat-carousel.is-scrollable .cat-arrow {
  display: flex;
}

.cat-arrow:hover {
  background: rgba(6, 10, 18, 0.72);
}

.cat-arrow[disabled] {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.cat-arrow:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.cat-arrow svg {
  width: 24px;
  height: 24px;
}

.cat-arrow--prev {
  left: 0.6rem;
}

.cat-arrow--next {
  right: 0.6rem;
}

/* ---------- Products: panels-first, on-demand grids ---------- */
/* "View all" link + "select a category" hint under the strip */
.products-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
}
.products-viewall {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-primary);
  text-decoration: none;
  padding: 0.4rem 0.2rem;
  border-bottom: 2px solid transparent;
}
.products-viewall:hover,
.products-viewall.is-active {
  border-bottom-color: var(--color-accent);
}
.products-hint {
  margin: 0 0 2rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ---------- Products (chrome-free tiles) ---------- */
/* Grids are present in the HTML but hidden until a category is chosen
   (js/products.js toggles .is-open; <noscript> reveals them all). */
.p-category {
  display: none;
  margin-bottom: 3rem;
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.p-category.is-open {
  display: block;
}

.p-category:last-child {
  margin-bottom: 0;
}

.p-category__title {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-primary);
}

.p-grid {
  display: grid;
  grid-template-columns: 1fr;                  /* phone: 1 column */
  gap: 2rem 1.5rem;
}

@media (min-width: 480px) {
  .p-grid { grid-template-columns: repeat(2, 1fr); }   /* small tablet: 2 */
}

@media (min-width: 700px) {
  .p-grid { grid-template-columns: repeat(3, 1fr); }   /* tablet: 3 */
}

@media (min-width: 1000px) {
  .p-grid { grid-template-columns: repeat(4, 1fr); }   /* desktop: 4 */
}

/* No card chrome — each tile floats on the section background. */
.p-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
}

/* Uniform image/icon zone; transparent so cutout PNGs drop in cleanly and
   mixed icon/photo tiles stay aligned. */
.p-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 160px;
}

.p-card__media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  /* melts the photos' light studio backdrop into the section background
     without any image editing (interim until cutout PNGs are available) */
  mix-blend-mode: multiply;
  transition: transform 0.25s ease;
}

.p-card:hover .p-card__media img {
  transform: scale(1.05);
}

.p-card__icon {
  width: 68px;
  height: 68px;
  color: var(--color-primary);
}

.p-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-dark);
}

.p-card__brand {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.08rem 0.45rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(3, 96, 180, 0.1);
  border-radius: 4px;
  vertical-align: middle;
}

.p-card__desc {
  margin: 0;
  max-width: 28ch;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--color-muted);
}

.p-loading,
.p-error {
  color: var(--color-muted);
}

/* ---------- Projects gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery__item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0d0f14;
  cursor: pointer;
}

.gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery__item:hover .gallery__img,
.gallery__item:focus-visible .gallery__img {
  transform: scale(1.05);
}

.gallery__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 0.85rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
}

.gallery__item:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 12, 16, 0.93);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  margin: 0;
  max-width: min(1100px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  background: #000;
}

.lightbox__caption {
  margin-top: 0.85rem;
  max-width: 60ch;
  color: #e8ebf0;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  font-size: 2rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.6);
}

.lightbox__prev {
  left: 0.75rem;
}

.lightbox__next {
  right: 0.75rem;
}

.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }
}

/* ---------- Clients & Experience ---------- */
.clients {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
}

.client-badge {
  padding: 0.6rem 1.1rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-dark);
}

.experience__heading {
  margin: 0 0 1.75rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-dark);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 720px;
}

.timeline__item {
  position: relative;
  padding: 0 0 1.6rem 1.75rem;
  border-left: 2px solid var(--color-border);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  /* final state (also the no-JS / reduced-motion state): filled */
  background: var(--color-primary);
  border: 2px solid var(--color-primary);
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

/* Metro-highlighted contracts get the amber accent dot */
.timeline__item--metro::before {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* With JS + motion, dots start unlit and light up in sequence (see js/anim.js) */
.js-anim .timeline__item::before {
  background: #fff;
  border-color: var(--color-border);
  transform: scale(0.7);
}
.js-anim .timeline__item.is-lit::before {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: scale(1);
}
.js-anim .timeline__item--metro.is-lit::before {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.timeline__date {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.timeline__client {
  font-weight: 700;
  color: var(--color-dark);
}

.timeline__tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.08rem 0.45rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(3, 96, 180, 0.1);
  border-radius: 4px;
  vertical-align: middle;
}

.timeline__desc {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.experience__note {
  margin: 1.75rem 0 0;
  font-size: 0.82rem;
  color: var(--color-muted);
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.contact__address {
  margin: 0 0 1.25rem;
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-dark);
}

.contact__list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.contact__list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  padding: 0.4rem 0;
  font-size: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.contact__list span {
  min-width: 64px;
  font-weight: 600;
  color: var(--color-muted);
}

.contact__list a,
.contact__people a {
  color: var(--color-primary);
  text-decoration: none;
}

.contact__list a:hover,
.contact__people a:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.contact__people {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-bottom: 1.25rem;
}

.contact__people strong {
  color: var(--color-dark);
}

.contact__reg {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.contact__map iframe {
  width: 100%;
  min-height: 340px;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

@media (min-width: 820px) {
  .contact {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

/* Contact on navy: lighten text, amber links */
.section-block--navy .contact__address {
  color: #eaf2fb;
}
.section-block--navy .contact__address strong {
  color: #ffffff;
}
.section-block--navy .contact__list li {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
.section-block--navy .contact__list span {
  color: #8aafd6;
}
.section-block--navy .contact__list a,
.section-block--navy .contact__people a {
  color: #eaf2fb;                 /* light links; amber only as a hover underline */
}
.section-block--navy .contact__list a:hover,
.section-block--navy .contact__people a:hover {
  color: #ffffff;
}
.section-block--navy .contact__people strong {
  color: #ffffff;
}
.section-block--navy .contact__reg {
  color: #8aafd6;
}

/* ---------- Footer (navy) ---------- */
.site-footer {
  background: var(--color-navy-deep);
  color: #9fb6d4;
}

.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
}

.site-footer__brand strong {
  color: #fff;
  font-size: 1.05rem;
}

.site-footer__brand span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9aa0a8;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-footer__links a {
  color: #cfd3d8;
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer__links a:hover {
  color: var(--color-accent);
}

.site-footer__copy {
  width: 100%;
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: #9aa0a8;
}

/* ---------- About: text + traffic light ---------- */
@media (min-width: 900px) {
  .about {
    grid-template-columns: 1fr auto;   /* text | traffic light */
    gap: 4.5rem;
  }
}

/* Below 900px the traffic light is the signature element: keep it, shrink it,
   and centre it ABOVE the text rather than hiding it. */
@media (max-width: 899.98px) {
  .about__visual {
    order: -1;
  }
  .tl-light {
    width: 42px;
    height: 42px;
  }
  .tl-housing {
    gap: 12px;
    padding: 15px 13px;
  }
  .tl-pole {
    height: 96px;
  }
}

/* ---------- Collapsing hamburger nav (< 992px) ---------- */
@media (max-width: 991.98px) {
  .nav-toggle {
    display: flex;
  }

  /* Inline links become a full-width panel that slides down below the header.
     max-height + visibility keep it collapsed AND out of the tab order while
     closed, yet still animatable. */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0;
    padding: 0 1.25rem;
    background: var(--color-bg);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-height: 0;
    visibility: hidden;
    transition: max-height 0.28s ease, visibility 0.28s ease, padding 0.28s ease;
  }

  .site-nav.is-open .nav-links {
    max-height: 80vh;
    visibility: visible;
    padding: 0.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.95rem 0.25rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links li:last-child a {
    border-bottom: 0;
  }
}

/* ---------- Mobile hero height ---------- */
@media (max-width: 768px) {
  .hero {
    height: 90vh;
  }
}

/* ---------- Small screens (≤400px, e.g. 375px) ---------- */
@media (max-width: 400px) {
  .nav-logo__mark {
    height: 38px;
  }
  .nav-logo__name {
    font-size: 1.05rem;
  }
  .hero__actions .btn {
    flex: 1 1 100%;
    text-align: center;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
