/* =========================================================
   VARIABLES
========================================================= */

:root {
  --primary-dark: #061020;
  --primary: #0c54ed;
  --primary-hover: #0a42c0;
  --secondary: #29b6ff;
  --light: #1e3a5f;

  --text: #e8edf5;
  --muted: #8a9ab8;
  --bg: #080f1e;
  --dark: #e8edf5;
  --white: #ffffff;

  --shadow-soft: 0 8px 25px rgba(0, 0, 0, 0.35);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

  --radius: 18px;
  --radius-sm: 10px;

  --container: 1240px;
  --header-height: 90px;
}

/* =========================================================
   RESET
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Franklin Gothic Book",
    "Franklin Gothic",
    "ITC Franklin Gothic",
    "Inter",
    Arial,
    sans-serif;
  color: var(--text);
  background: #080f1e;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

.container {
  width: min(100% - 80px, var(--container));
  margin: auto;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}

/* =========================================================
   HEADER
========================================================= */

.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(8, 15, 30, 0.92);
  backdrop-filter: blur(12px);
  z-index: 999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.brand-logo {
  height: 64px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  padding: 5px;
  padding-right: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  margin-left: 48px;
}

.nav-list {
  display: flex;
  gap: 32px;
  font-weight: 600;
  font-size: 15px;
}

.nav-list a {
  position: relative;
}

.nav-list a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: 0.3s;
}

.nav-list a:hover::after,
.nav-list a.active::after {
  width: 100%;
}

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
@media (min-width: 1301px) and (max-width: 1600px) {
  .brand-logo {
    height: 54px;
    padding-right: 14px;
  }
  .nav {
    margin-left: 24px;
  }
  .nav-list {
    gap: 20px;
    font-size: 14px;
  }
  .lang-switch {
    margin-left: 20px;
  }
}

@media (max-width: 1300px) {
  .nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding: 24px;
    background: rgba(6, 12, 24, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
  .nav.open {
    display: flex;
  }
  .nav-list {
    flex-direction: column;
    gap: 4px;
  }
  .nav-list a {
    display: block;
    padding: 12px 4px;
    font-size: 17px;
  }
  .nav-list a::after {
    display: none;
  }
  .lang-switch {
    order: -1;
    align-self: center;
    margin: 0 0 24px;
  }
  .lang-switch button {
    padding: 8px 16px;
    font-size: 13px;
  }
  .burger {
    display: flex;
  }
}

@media (max-width: 700px) {
  :root {
    --header-height: 70px;
  }
  .brand-logo {
    height: 44px;
    padding-right: 12px;
  }
}
@media (max-width: 420px) {
  .brand-logo {
    height: 38px;
  }
}

.lang-switch {
  display: flex;
  gap: 2px;
  margin-left: 32px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
}
.lang-switch button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.lang-switch button:hover {
  color: var(--text);
}
.lang-switch button.active {
  background: var(--primary);
  color: #fff;
}

/* =========================================================
   HERO
========================================================= */

#bubbleCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, #061228 0%, #0a2044 50%, #0d3060 100%);
  padding-top: 200px;
  padding-bottom: 180px;
  color: white;
}

.site-wrapper {
  background: linear-gradient(
    to bottom,
    #0a1f3d 0%,
    #0a1830 18%,
    #0a1525 38%,
    #080f1e 58%,
    #060d1a 75%,
    #050b18 90%,
    #040a14 100%
  );
}

.hero,
.home-actus,
.home-prestations,
.home-refs,
.page-hero,
.bureau-valeurs,
.bureau-timeline,
.contact-offices,
.footer {
  background: transparent;
}
.home-actus,
.home-prestations,
.home-refs,
.page-hero,
.bureau-valeurs,
.bureau-timeline,
.contact-offices,
.footer {
  position: relative;
}
.home-actus::before,
.home-refs::before,
.bureau-valeurs::before,
.bureau-timeline::before,
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: auto;
}

.hero-logos {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-left: -60px;
  margin-right: -60px;
  margin-bottom: 90px;
}
@media (max-width: 1150px) {
  .hero-logos {
    margin-left: 0;
    margin-right: 0;
  }
}

.hero-logos a {
  display: inline-flex;
  align-items: center;
}
.hero-logo {
  height: 56px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  opacity: 0.92;
  transition: opacity 0.2s;
}
.hero-logo.secondary-logo {
  filter: brightness(0) invert(1);
}
.hero-logo:hover {
  opacity: 1;
}

.hero h1 {
  display: flex;
  min-height: 2.1em;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 25px;
  text-align: center;
}

.hero-text {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 650px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  margin-bottom: 50px;
}

.hero-bottom-action {
  position: absolute;
  z-index: 2;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.hero-bottom-action .btn {
  display: inline-flex;
  padding: 15px 28px;
  border-radius: 10px;
}

@media (max-width: 600px) {
  .hero-bottom-action {
    bottom: 80px;
  }

  .hero-bottom-action .btn {
    padding: 14px 22px;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1.2;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.stat-card {
  background: rgba(10, 25, 70, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.20);
  padding: 28px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.stat-card strong {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 6px;
}

/* =========================================================
   SECTIONS
========================================================= */

.section {
  padding: 140px 0;
}

.section-heading {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
  margin-bottom: 80px;
}

.section-heading h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.section-heading p {
  color: var(--muted);
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   REFERENCES
========================================================= */

.references-preview {
  background: var(--bg);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  align-items: stretch;
}

.reference-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d1a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  transition: 0.35s ease;
}

.reference-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.card-image {
  height: 360px;
  overflow: hidden;
  flex-shrink: 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.reference-card:hover img {
  transform: scale(1.06);
}

.card-body {
  display: flex;
  flex-direction: column;
  padding: 32px;
  gap: 14px;
  flex: 1;
}

.tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
}

.card-body h3 {
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 700;
}

.card-body p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

.card-link {
  margin-top: auto;
  font-weight: 600;
  color: var(--secondary);
}

.section-cta {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}
.btn-outline {
  padding: 14px 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
}
.btn-outline:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* =========================================================
   COMPETENCES
========================================================= */

.competences {
  background: #0a1525;
}

.competence-card {
  color: var(--text);
  background: #0d1a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 25px;
  margin: 25px 0;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

/* =========================================================
   CTA
========================================================= */

.callout-box {
  padding: 80px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =========================================================
   FOOTER
========================================================= */

/* ── ACCUEIL : section prestations ── */
.home-prestations {
  background: #071126;
}

.competence-showcase {
  overflow: visible;
}

.competence-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.competence-columns-heading {
  max-width: 650px;
  margin: 0 auto 42px;
  text-align: center;
}

.competence-columns-heading .section-kicker {
  margin-bottom: 8px;
  color: #5a9cff;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.competence-columns-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.competence-columns-heading > p:last-child {
  color: #afbdd3;
  font-size: 1rem;
  line-height: 1.55;
}

.competence-column {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 490px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(107, 149, 214, 0.22);
  border-radius: 15px;
  background: #0d1c39;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.competence-column:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.competence-column:hover,
.competence-column:focus-within {
  z-index: 2;
  border-color: rgba(90, 156, 255, 0.62);
  background: #102447;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.34);
  transform: translateY(-6px);
}

@media (prefers-reduced-motion: reduce) {
  .competence-column,
  .competence-column-image img {
    transition: none;
  }
  .competence-column:hover,
  .competence-column:focus-within {
    transform: none;
  }
}

.competence-column-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding: 28px 22px 24px;
}

.competence-column-copy h2 {
  min-height: 2.25em;
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(1.25rem, 1.5vw, 1.55rem);
  line-height: 1.15;
}

.competence-column-copy > p:not(.section-kicker) {
  min-height: 0;
  margin: 0 0 18px;
  color: #aebbd0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.competence-column-copy ul {
  display: grid;
  gap: 9px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: #d4dceb;
  font-size: 0.92rem;
}

.competence-column-copy li {
  position: relative;
  padding-left: 15px;
  line-height: 1.5;
}

.competence-column-copy li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 6px;
  height: 1px;
  background: #5a9cff;
}

.competence-column-link {
  margin-top: auto;
  color: #66a2ff;
  font-size: 0.95rem;
  font-weight: 700;
}

.competence-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
}

.competence-cta p {
  color: #b8c4d7;
  font-size: 1rem;
}

.competence-cta .btn {
  padding: 10px 19px;
  font-size: 0.9rem;
}

.competence-column-image {
  position: relative;
  display: block;
  height: 150px;
  overflow: hidden;
  color: #fff;
}

.competence-column-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.competence-column-image:hover img,
.competence-column:hover .competence-column-image img,
.competence-column:focus-visible .competence-column-image img {
  filter: brightness(1.08);
  transform: scale(1.04);
}

.competence-column-image span {
  position: absolute;
  inset: auto 0 0;
  padding: 32px 14px 12px;
  background: linear-gradient(transparent, rgba(2, 9, 18, 0.94));
  font-size: 0.86rem;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .competence-columns {
    grid-template-columns: repeat(5, minmax(240px, 1fr));
    overflow-x: auto;
    padding: 8px 2px 20px;
    scroll-snap-type: x mandatory;
  }
  .competence-column {
    scroll-snap-align: start;
  }
}

@media (max-width: 600px) {
  .competence-columns {
    grid-template-columns: 1fr;
    overflow: hidden;
  }
  .competence-column {
    min-height: 420px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }
  .competence-column:last-child {
    border-right: 0;
  }
  .competence-column-copy {
    min-height: 0;
  }
  .competence-column-copy h2,
  .competence-column-copy > p:not(.section-kicker) {
    min-height: 0;
  }
  .competence-cta {
    flex-direction: column;
    text-align: center;
  }
}

.competence-feature {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  padding: clamp(18px, 3vw, 38px);
  isolation: isolate;
  background: #081321;
}

.competence-feature::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -32px;
  background-image: var(--competence-background);
  background-position: center;
  background-size: cover;
  filter: blur(4px) saturate(0.95);
  transform: scale(1.025);
  transition: opacity 0.2s ease, background-image 0.35s ease;
}

.competence-feature::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(38, 153, 211, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(5, 15, 28, 0.38), rgba(4, 13, 24, 0.58));
}

.competence-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 354px;
  overflow: hidden;
  padding: clamp(28px, 3vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(8, 19, 33, 0.62);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
}

#heroAnimatedTitle {
  font-variant-ligatures: none;
}

.competence-copy .section-kicker {
  align-self: center;
}

.competence-copy h2 {
  margin: 6px 0 14px;
  font-size: clamp(2rem, 3.2vw, 3rem);
}

.competence-copy > p:not(.section-kicker) {
  max-width: 64ch;
  margin: 0 auto 20px;
  color: #d0d8e4;
  line-height: 1.55;
}

.competence-copy ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 7px 24px;
  width: min(100%, 720px);
  margin: 0 auto 24px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.96rem;
  text-align: left;
}

.competence-copy li {
  line-height: 1.4;
}

.competence-copy li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 11px 2px 0;
  border-radius: 50%;
  background: var(--primary);
}

.competence-link {
  align-self: center;
  color: var(--primary);
  font-weight: 700;
}

.competence-thumbnails {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  padding: 10px;
  background: #050e19;
}

.competence-thumb {
  position: relative;
  height: 138px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #0d1a2e;
  color: white;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.competence-thumb:hover,
.competence-thumb.active {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.competence-thumb:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.competence-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.66;
}

.competence-thumb span {
  position: absolute;
  inset: auto 0 0;
  padding: 26px 10px 11px;
  background: linear-gradient(transparent, rgba(2, 9, 18, 0.94));
  font-weight: 700;
  font-size: 0.84rem;
  text-align: left;
}

@media (max-width: 768px) {
  .competence-feature {
    min-height: 0;
    padding: 14px;
  }
  .competence-copy {
    min-height: 390px;
  }
  .competence-copy ul {
    grid-template-columns: 1fr;
    width: min(100%, 420px);
  }
  .competence-thumbnails {
    grid-template-columns: repeat(5, 150px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .competence-thumb {
    height: 110px;
    scroll-snap-align: start;
  }
}

.footer {
  background: #040a14;
  color: white;
  padding: 100px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.9rem;
}

.footer-swiss-made {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 52px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.footer-swiss-made-flag {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--secondary);
}


/* =========================================================
   REFERENCES PAGE
========================================================= */
.references-page {
  padding-top: 120px;
}

.page-hero {
  padding: 100px 0 60px;
  text-align: center;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.filter {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d1a2e;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: 0.25s;
}

.filter.active {
  background: var(--primary);
  color: white;
}

.references-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 120px;
}

.ref-card {
  cursor: pointer;
  background: #0d1a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: 0.3s;
}

.ref-card:hover {
  transform: translateY(-8px);
}

.ref-img {
  position: relative;
  height: 260px;
  overflow: hidden;
}

.ref-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(12, 84, 237, 0.12), rgba(13, 26, 46, 0.92)),
    #0d1a2e;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ref-tags {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ref-tag {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
}

.ref-info {
  padding: 20px;
}

.ref-info h3 {
  margin: 0;
  line-height: 1.3;
}

.ref-info p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.project-services {
  margin-top: 30px;
}

.meta-row[hidden],
.project-services[hidden] {
  display: none !important;
}

.project-services h4 {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 1rem;
}

.project-services p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-line;
}

.references-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
}

/* MODAL */

.ref-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.6);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.ref-modal.open {
  display: flex;
}

.ref-modal-content {
  position: relative;
  background: #0d1a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  width: 90%;
  max-width: 1100px;
  padding: 40px;
  max-height: 92vh;
  overflow-y: auto;
}

.modal-main-img {
  height: 420px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 20px;
}

.modal-main-img[hidden],
.modal-thumbs[hidden] {
  display: none !important;
}

.modal-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  margin-top: 25px;
}

.project-meta {
  display: grid;
  gap: 12px;
  margin-bottom: 30px;
}

.meta-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 25px;
}

.meta-row span {
  font-weight: 600;
  color: var(--muted);
  font-size: 14px;
}

.meta-row p {
  margin: 0;
  font-weight: 500;
}

.project-description h4 {
  margin-bottom: 10px;
  color: var(--primary);
}

.project-description p {
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-line;
}

.project-description ul {
  padding-left: 18px;
}

.project-description li {
  margin-bottom: 6px;
}

.modal-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, 120px);
  gap: 8px;
  margin-top: 36px;
}

.modal-thumbs img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 8px;
  opacity: 0.7;
}

.modal-thumbs img:hover {
  opacity: 1;
}

.modal-thumbs img.active {
  opacity: 1;
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.ref-close {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(105, 105, 105, 0.774);
  border-radius: 50%;
  cursor: pointer;
  transition: 0.25s;
}

.ref-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.ref-close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: #0f2854;
  transform-origin: center;
}

.ref-close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ref-close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1300px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .cards-grid,
  .references-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .project-meta {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
}

@media (max-width: 900px) {
  .callout-box {
    flex-direction: column;
    gap: 24px;
    text-align: center;
    padding: 56px 32px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 90px 0;
  }
  .section-heading {
    margin-bottom: 56px;
  }
  .section-heading h2 {
    font-size: 2.1rem;
  }
}

@media (max-width: 700px) {
  .cards-grid,
  .footer-grid,
  .references-grid {
    grid-template-columns: 1fr;
  }

  .card-image {
    height: 280px;
  }

  .hero {
    padding-top: 140px;
    padding-bottom: 100px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-logos {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
  }

  .modal-main-img {
    height: 220px;
  }
  .modal-thumbs {
    grid-template-columns: repeat(2, 120px);
  }
  .ref-modal-content {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.9rem;
  }
  .hero-logo {
    height: 44px;
  }
  .section-heading h2 {
    font-size: 1.7rem;
  }
  .btn-outline {
    padding: 12px 24px;
    font-size: 0.88rem;
  }
}

/* =========================================================
   TO-TOP BUTTON
========================================================= */

.to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition:
    background 0.2s,
    transform 0.2s;
  z-index: 100;
}

.to-top.show {
  display: flex;
}

.to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}
