/* =========================================================
   ETS Kanzari — Styles
   Primary: pistachio green | Accent: gold | Neutral: light
   ========================================================= */

:root {
  --pistache-50: #f4f9ee;
  --pistache-100: #e8f3dc;
  --pistache-200: #d0e8b8;
  --pistache-300: #b5d992;
  --pistache-400: #9ec876;
  --pistache-500: #84b35a;
  --pistache-600: #6a9645;
  --pistache-700: #527a36;
  --pistache-800: #3d5e2a;
  --pistache-900: #2a421c;
  --pistache-950: #152a12;
  --gold-400: #e0c35a;
  --gold-500: #c9a227;
  --gold-600: #a8861a;
  --gold-700: #8a6e14;
  /* Logo accent — aligned with pistachio palette */
  --lime-400: var(--pistache-400);
  --lime-500: var(--pistache-500);
  --lime-glow: rgba(132, 179, 90, 0.22);
  --cream: #f6f4ef;
  --sand: #eee9df;
  --white: #ffffff;
  --ink: #1a211e;
  --muted: #5a6862;
  --brand-kanzari: #1c1c1c;
  --border: rgba(82, 122, 54, 0.12);
  --shadow-sm: 0 2px 10px rgba(26, 42, 18, 0.05);
  --shadow-md: 0 10px 28px rgba(26, 42, 18, 0.09);
  --shadow-lg: 0 22px 48px rgba(26, 42, 18, 0.13);
  --radius: 0.9rem;
  --radius-lg: 1.25rem;
  --header-h: 7.25rem;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
  --transition: 0.28s ease;
  --max-w: 72rem;
}

/* ---------- Brand name split (ETS green / Kanzari matte black) ---------- */
.brand-est {
  color: var(--pistache-600);
}

.brand-kanzari {
  color: var(--brand-kanzari);
}

/* On dark backgrounds: lighter green for ETS; Kanzari stays matte black */
.on-dark .brand-est {
  color: var(--pistache-400);
}

.on-dark .brand-kanzari {
  color: var(--brand-kanzari);
  text-shadow: 0 0 0.35em rgba(255, 255, 255, 0.22);
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--pistache-800);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold-600);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--pistache-950);
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
}

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2rem, var(--max-w));
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.55rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--pistache-950);
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.28);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #e4c96a, var(--gold-500) 55%, var(--pistache-400));
  color: var(--pistache-950);
  box-shadow: 0 12px 28px rgba(201, 162, 39, 0.32), 0 0 0 1px rgba(132, 179, 90, 0.2);
}

.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-400);
  color: var(--gold-400);
}

.btn-outline-green {
  background: transparent;
  border-color: var(--pistache-800);
  color: var(--pistache-800);
}

.btn-outline-green:hover {
  background: var(--pistache-900);
  border-color: var(--pistache-900);
  color: var(--white);
}

.btn-sm {
  padding: 0.6rem 1.15rem;
  font-size: 0.875rem;
  margin-top: auto;
}

.btn-block {
  width: 100%;
}

.btn-nav {
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--pistache-950);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo:hover {
  color: var(--pistache-800);
}

.logo-img {
  width: 5.875rem;
  height: 5.875rem;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-link {
  position: relative;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-500), var(--lime-500));
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--pistache-800);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.header-end {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  margin-left: 0.25rem;
}

.header-qualibat {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
  cursor: pointer;
  pointer-events: auto;
}

.header-qualibat-logo {
  display: block;
  height: 4.25rem;
  width: auto;
  max-height: 4.5rem;
  object-fit: contain;
  cursor: pointer;
  pointer-events: none; /* clicks go to the wrapping <a> */
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--white);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin-inline: auto;
  background: var(--pistache-900);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, var(--pistache-950) 0%, var(--pistache-900) 45%, var(--pistache-700) 100%);
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Geometric / construction-inspired details */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 40%, black 20%, transparent 70%);
  opacity: 0.7;
}

.hero-shape {
  position: absolute;
  border-radius: 1.25rem;
  border: 1px solid rgba(201, 162, 39, 0.28);
}

.hero-shape-1 {
  width: min(42vw, 28rem);
  height: min(42vw, 28rem);
  top: -8%;
  right: -6%;
  background: linear-gradient(
    160deg,
    rgba(201, 162, 39, 0.16),
    rgba(132, 179, 90, 0.08) 45%,
    transparent 65%
  );
  transform: rotate(18deg);
  animation: float-slow 12s ease-in-out infinite;
}

.hero-shape-2 {
  width: min(28vw, 18rem);
  height: min(28vw, 18rem);
  bottom: 8%;
  right: 18%;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
  transform: rotate(-12deg);
  animation: float-slow-alt 14s ease-in-out infinite;
}

.hero-shape-3 {
  width: 8rem;
  height: 8rem;
  bottom: 18%;
  left: 8%;
  border-radius: 50%;
  border: 2px solid rgba(201, 162, 39, 0.35);
  background: radial-gradient(circle, rgba(201, 162, 39, 0.15), transparent 70%);
}

.hero-beam {
  position: absolute;
  top: -20%;
  left: 35%;
  width: 40%;
  height: 140%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(201, 162, 39, 0.07) 40%,
    rgba(132, 179, 90, 0.06) 55%,
    transparent 72%
  );
  transform: rotate(18deg);
  animation: beam-drift 10s ease-in-out infinite alternate;
}

.hero-logo-watermark {
  position: absolute;
  right: clamp(-2rem, 4vw, 2rem);
  bottom: clamp(-1rem, 6vh, 3rem);
  width: min(44vw, 22rem);
  height: auto;
  opacity: 0.07;
  filter: grayscale(0.15) brightness(1.15);
  pointer-events: none;
  user-select: none;
  transform: rotate(-8deg);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: 5rem 5.5rem;
  max-width: 42rem;
  animation: fade-up 0.9s ease both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.badge-gold {
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.4);
  color: var(--gold-400);
}

.badge-gold i {
  color: var(--lime-400);
}

.hero-brand {
  display: block;
  font-size: clamp(3.2rem, 8vw, 5.25rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 0.4rem;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* SEO H1 suffix — keeps brand size intact */
.hero-h1-suffix {
  display: block;
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin-bottom: 0.55rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.3vw, 1.55rem);
  color: var(--gold-400);
  font-weight: 500;
  margin-bottom: 1.25rem;
  line-height: 1.35;
  max-width: 36rem;
}

.hero-lead {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.84);
  max-width: 34rem;
  margin-bottom: 2.15rem;
  font-weight: 300;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-collab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 1.85rem;
}

.hero-collab-label {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.hero-collab-text {
  position: relative;
  display: inline-block;
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.15;
  color: var(--gold-400);
  cursor: default;
  padding-bottom: 0.2rem;
  text-shadow: 0 0 12px rgba(224, 195, 90, 0.35);
  will-change: transform, text-shadow;
}

.hero-collab-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  transform: scaleX(var(--hero-underline, 0.55));
  transform-origin: left center;
  border-radius: 1px;
  opacity: 0.85;
  pointer-events: none;
}

/* ---------- Sections ---------- */
.section {
  padding: 5.75rem 0;
}

.section-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3.25rem;
}

.section-header-left {
  text-align: left;
  margin-left: 0;
}

.section-eyebrow {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.85rem);
  margin-bottom: 0.85rem;
}

.section-intro {
  color: var(--muted);
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ---------- Services ---------- */
.section-services {
  background: var(--white);
}

.section-header-services {
  margin-bottom: 3.5rem;
  padding-bottom: 2rem;
  position: relative;
}

.section-header-services::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(5rem, 40%);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--pistache-500),
    var(--gold-500),
    var(--pistache-500)
  );
  opacity: 0.75;
}

.section-header-services .section-intro {
  max-width: 36rem;
  margin-inline: auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 100%;
  padding: 2rem 1.85rem 1.75rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--pistache-600),
    var(--gold-500),
    var(--pistache-400)
  );
  opacity: 0.85;
  transition: opacity var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(132, 179, 90, 0.18);
  border-color: rgba(132, 179, 90, 0.32);
}

.service-card:hover::before {
  opacity: 1;
}

.service-number {
  position: absolute;
  top: 1.15rem;
  right: 1.25rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(82, 122, 54, 0.28);
  line-height: 1;
  transition: color var(--transition);
}

.service-card:hover .service-number {
  color: rgba(201, 162, 39, 0.55);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  padding-right: 2rem;
  color: var(--ink);
}

.service-card p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
  margin: 0;
  flex-grow: 1;
}

.service-card .btn {
  align-self: flex-start;
  margin-top: 0.35rem;
}

.service-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, var(--pistache-800), var(--pistache-600));
  color: var(--gold-400);
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
  box-shadow: 0 4px 14px rgba(42, 66, 28, 0.18);
  transition: transform var(--transition), color var(--transition),
    box-shadow var(--transition);
}

.service-card:hover .service-icon {
  transform: scale(1.06);
  color: var(--lime-400);
  box-shadow: 0 6px 18px rgba(42, 66, 28, 0.22), 0 0 0 3px var(--lime-glow);
}

/* ---------- About / Pourquoi nous choisir ---------- */
.section-about {
  background:
    radial-gradient(ellipse at 85% 15%, rgba(201, 162, 39, 0.1), transparent 42%),
    radial-gradient(ellipse at 8% 80%, rgba(132, 179, 90, 0.08), transparent 40%),
    linear-gradient(160deg, var(--pistache-950) 0%, var(--pistache-900) 55%, #24391a 100%);
  color: var(--white);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.about-media {
  position: relative;
  margin: 0;
  border-radius: 0.35rem;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: 36rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.about-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset -3px 0 0 0 var(--gold-400),
    inset 0 3px 0 0 var(--gold-400);
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-content {
  min-width: 0;
}

.about-title {
  font-family: var(--font-body);
  font-size: clamp(1.85rem, 3.6vw, 2.65rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0 0 1.15rem;
  color: var(--white);
}

.about-title-light {
  color: var(--white);
}

.about-title-accent {
  display: inline;
  color: var(--gold-400);
}

.about-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1.75rem;
  max-width: 38rem;
}

/* About intro: ETS + Kanzari same pistachio green */
.about-intro .brand-est,
.about-intro .brand-kanzari {
  color: var(--pistache-600);
}

.about-intro .brand-kanzari {
  text-shadow: none;
}

.about-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem 1.5rem;
  margin: 0 0 1.75rem;
}

.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
}

.about-check {
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-400), var(--gold-600));
  color: var(--pistache-950);
  font-size: 0.68rem;
  margin-top: 0.08rem;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.35);
}

.about-list li:hover .about-check {
  background: linear-gradient(145deg, var(--gold-400), var(--pistache-400));
}

.about-local {
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(224, 195, 90, 0.55);
  border-radius: 0.35rem;
  background: rgba(26, 42, 18, 0.35);
}

.about-local-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin: 0 0 0.55rem;
}

.about-local p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  font-style: italic;
  color: rgba(255, 255, 255, 0.88);
}

.about-qualibat {
  margin: 1.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

.about-qualibat a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
  text-decoration-color: rgba(224, 195, 90, 0.55);
  text-underline-offset: 0.2em;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.about-qualibat a:hover,
.about-qualibat a:focus-visible {
  color: var(--gold-400);
  text-decoration-color: var(--gold-400);
}

/* ---------- Projects — horizontal scroll + premium cadre ---------- */
.section-projects {
  background:
    linear-gradient(180deg, var(--pistache-50) 0%, var(--white) 18%, var(--white) 100%);
}

.section-header-projects {
  max-width: 38rem;
  margin-inline: auto;
  text-align: center;
}

.projects-carousel {
  position: relative;
}

.projects-scroll {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  cursor: grab;
  padding: 0.65rem 0.2rem 1.25rem;
  margin: 0;
  max-width: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 39, 0.55) rgba(82, 122, 54, 0.1);
}

.projects-scroll:active,
.projects-scroll.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.projects-scroll::-webkit-scrollbar {
  height: 6px;
}

.projects-scroll::-webkit-scrollbar-track {
  background: rgba(82, 122, 54, 0.08);
  border-radius: 999px;
}

.projects-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--pistache-600), var(--gold-500));
  border-radius: 999px;
}

/* Identical photo-frame cadre on every card */
.project-card.project-row {
  --cadre-border: rgba(201, 162, 39, 0.55);
  --cadre-glow: 0;
  --cadre-inset: rgba(82, 122, 54, 0.18);
  display: block;
  flex: 0 0 min(85vw, 360px);
  width: min(85vw, 360px);
  max-width: min(85vw, 360px);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  padding: 0.62rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(160deg, #f8f6f0 0%, #efece4 55%, #e8e4d8 100%);
  border: 1.5px solid var(--cadre-border);
  box-shadow:
    0 0 0 1px var(--cadre-inset),
    0 0 calc(18px * var(--cadre-glow)) rgba(201, 162, 39, calc(0.28 * var(--cadre-glow))),
    0 0 calc(36px * var(--cadre-glow)) rgba(106, 150, 69, calc(0.14 * var(--cadre-glow))),
    var(--shadow-md);
  transition: transform var(--transition);
  will-change: box-shadow, border-color;
}

.project-card.project-row:hover {
  transform: translateY(-3px);
}

.project-row .project-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 0.35rem);
  background: linear-gradient(145deg, var(--pistache-900), var(--pistache-700));
  box-shadow: inset 0 0 0 1px rgba(26, 33, 30, 0.08);
}

.project-row .project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s ease;
  pointer-events: none;
  user-select: none;
}

.project-card.project-row:hover .project-media img {
  transform: scale(1.035);
}

.project-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 3.1rem 1.15rem 1.1rem;
  background: linear-gradient(
    to top,
    rgba(21, 42, 18, 0.94) 0%,
    rgba(21, 42, 18, 0.58) 58%,
    transparent 100%
  );
  color: var(--white);
  pointer-events: none;
}

.project-caption::before {
  content: "";
  display: block;
  width: 2.35rem;
  height: 2px;
  margin-bottom: 0.7rem;
  background: linear-gradient(90deg, var(--gold-500), var(--pistache-400));
  border-radius: 999px;
}

.project-caption h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 1.9vw, 1.4rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--white);
  letter-spacing: 0.01em;
}

.project-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.projects-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--pistache-800);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), scale var(--transition);
}

.projects-nav:hover,
.projects-nav:focus-visible {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--ink);
  border-color: var(--gold-500);
  outline: none;
}

.projects-nav:active {
  scale: 0.96;
}

.projects-nav--prev {
  left: 0.35rem;
}

.projects-nav--next {
  right: 0.35rem;
}

@media (max-width: 700px) {
  .projects-nav {
    display: none;
  }

  .project-card.project-row {
    flex-basis: min(82vw, 320px);
    width: min(82vw, 320px);
    max-width: min(82vw, 320px);
    padding: 0.55rem;
  }
}

@media (min-width: 900px) {
  .projects-scroll {
    gap: 1.55rem;
    padding-inline: 0.35rem;
  }

  .project-card.project-row {
    flex-basis: min(40vw, 380px);
    width: min(40vw, 380px);
    max-width: min(40vw, 380px);
  }

  .project-caption {
    padding: 3.5rem 1.35rem 1.25rem;
  }

  .projects-nav--prev {
    left: -0.35rem;
  }

  .projects-nav--next {
    right: -0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .projects-scroll {
    scroll-behavior: auto;
  }

  .project-card.project-row {
    --cadre-glow: 0.35;
    --cadre-border: rgba(201, 162, 39, 0.5);
  }
}

/* ---------- CTA band ---------- */
.cta-band {
  padding: 4.5rem 0;
  background:
    linear-gradient(120deg, rgba(201, 162, 39, 0.12), transparent 40%),
    linear-gradient(145deg, var(--pistache-950), var(--pistache-800));
  color: var(--white);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-copy h2 {
  color: var(--white);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.cta-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ---------- Contact ---------- */
.section-contact {
  background:
    radial-gradient(ellipse at 90% 10%, rgba(82, 122, 54, 0.06), transparent 40%),
    var(--cream);
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.5rem;
  align-items: start;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}

.contact-company {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.contact-details {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  color: var(--muted);
}

.contact-details a {
  color: var(--pistache-800);
  font-weight: 500;
  word-break: break-word;
}

.contact-details a:hover {
  color: var(--gold-600);
}

.contact-icon {
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: rgba(82, 122, 54, 0.08);
  color: var(--pistache-800);
  transition: color var(--transition), background var(--transition);
}

.contact-details li:hover .contact-icon {
  color: var(--lime-500);
  background: var(--lime-glow);
}

.btn-maps {
  width: 100%;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pistache-950);
}

.required {
  color: var(--gold-600);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--pistache-600);
  box-shadow: 0 0 0 3px rgba(106, 150, 69, 0.18);
  background: var(--white);
}

.form-group input.is-invalid,
.form-group textarea.is-invalid {
  border-color: #b33a3a;
  box-shadow: 0 0 0 3px rgba(179, 58, 58, 0.12);
}

.field-error {
  display: block;
  min-height: 1.1rem;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  color: #b33a3a;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

.form-status {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
}

.form-status.is-success {
  background: rgba(82, 122, 54, 0.08);
  color: var(--pistache-800);
  border: 1px solid rgba(82, 122, 54, 0.18);
}

.form-status.is-info {
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-700);
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.form-status.is-error {
  background: rgba(179, 58, 58, 0.08);
  color: #8f2c2c;
  border: 1px solid rgba(179, 58, 58, 0.2);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--pistache-950);
  color: rgba(255, 255, 255, 0.78);
  padding-top: 3.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.footer-logo-img {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
  opacity: 0.95;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0;
}

/* Footer only: Kanzari white; ETS stays green via .on-dark / .brand-est */
.site-footer .brand-kanzari,
.footer-logo .brand-kanzari,
.footer-bottom .brand-kanzari {
  color: #ffffff;
  text-shadow: none;
}

.footer-tagline {
  color: var(--gold-400);
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.footer-qualibat {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin-top: 1.15rem;
  line-height: 0;
  cursor: pointer;
  pointer-events: auto;
}

.footer-qualibat-logo {
  display: block;
  width: 7.5rem;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  cursor: pointer;
  pointer-events: none; /* clicks go to the wrapping <a> */
}

.footer-contact p {
  margin: 0 0 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.footer-contact i {
  color: var(--gold-400);
  margin-top: 0.3rem;
}

.footer-contact a,
.footer-nav a {
  color: rgba(255, 255, 255, 0.82);
}

.footer-contact a:hover,
.footer-nav a:hover {
  color: var(--gold-400);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0;
}

/* ---------- Social floats (left stack) ---------- */
.whatsapp-float,
.facebook-float {
  position: fixed;
  left: 1.15rem;
  z-index: 1100;
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-size: 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.whatsapp-float {
  bottom: 1.35rem;
  background: #25d366;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.4);
}

/* Facebook above WhatsApp: button 3.5rem + 0.75rem gap */
.facebook-float {
  bottom: calc(1.35rem + 3.5rem + 0.75rem);
  background: #1877f2;
  box-shadow: 0 10px 28px rgba(24, 119, 242, 0.4);
  font-size: 1.55rem;
}

.whatsapp-float:hover {
  color: var(--white);
  transform: scale(1.06);
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.5);
}

.facebook-float:hover {
  color: var(--white);
  transform: scale(1.06);
  box-shadow: 0 14px 32px rgba(24, 119, 242, 0.5);
}

.whatsapp-tooltip,
.facebook-tooltip {
  position: absolute;
  left: calc(100% + 0.75rem);
  white-space: nowrap;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--pistache-950);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-body);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.whatsapp-float:hover .whatsapp-tooltip,
.whatsapp-float:focus-visible .whatsapp-tooltip,
.facebook-float:hover .facebook-tooltip,
.facebook-float:focus-visible .facebook-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Animations ---------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-slow {
  0%,
  100% {
    transform: rotate(18deg) translateY(0);
  }
  50% {
    transform: rotate(18deg) translateY(-12px);
  }
}

@keyframes float-slow-alt {
  0%,
  100% {
    transform: rotate(-12deg) translateY(0);
  }
  50% {
    transform: rotate(-12deg) translateY(10px);
  }
}

@keyframes beam-drift {
  from {
    opacity: 0.55;
    transform: rotate(18deg) translateX(0);
  }
  to {
    opacity: 0.95;
    transform: rotate(18deg) translateX(2%);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(1.1rem);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-media {
    aspect-ratio: 16 / 11;
    max-height: 22rem;
    width: 100%;
  }

  .contact-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .nav-toggle {
    display: flex;
  }

  .header-qualibat-logo {
    height: 3.25rem;
    max-height: 3.5rem;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.75rem;
    background: rgba(247, 245, 240, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition),
      visibility var(--transition);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav-link {
    display: block;
    padding: 0.75rem 0.5rem;
  }

  .btn-nav {
    width: 100%;
  }

  .hero-content {
    padding-block: 4rem;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .whatsapp-tooltip,
  .facebook-tooltip {
    display: none;
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .project-row .project-media {
    aspect-ratio: 4 / 5;
  }

  .project-caption {
    padding: 2.75rem 1.1rem 1.1rem;
  }

  .project-caption h3 {
    font-size: 1.15rem;
  }

  .footer-qualibat-logo {
    width: 6rem;
  }

  .logo-img {
    width: 3.875rem;
    height: 3.875rem;
  }

  .logo-text {
    font-size: 1.3rem;
  }

  .hero-logo-watermark {
    width: min(55vw, 16rem);
    opacity: 0.05;
  }

  .hero-actions,
  .cta-actions {
    width: 100%;
  }

  .hero-actions .btn,
  .cta-actions .btn {
    width: 100%;
  }

  .hero-collab {
    margin-top: 1.5rem;
  }

  .section {
    padding: 4rem 0;
  }

  .whatsapp-float,
  .facebook-float {
    left: 0.85rem;
    width: 3.15rem;
    height: 3.15rem;
  }

  .whatsapp-float {
    bottom: 0.95rem;
    font-size: 1.55rem;
  }

  .facebook-float {
    bottom: calc(0.95rem + 3.15rem + 0.75rem);
    font-size: 1.35rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-collab-text {
    will-change: auto;
    text-shadow: 0 0 8px rgba(224, 195, 90, 0.25);
    --hero-underline: 1;
  }
}
