/* ===================================================================
 * Synapse Eco Group — Stylesheet
 * Written from scratch. Single file, no build step, no framework.
 * Structure:
 *   1. Reset
 *   2. Design tokens (:root)
 *   3. Base typography & layout utilities
 *   4. Navbar
 *   5. Hero
 *   6. Sections & cards (services / projects / team / jobs)
 *   7. Forms
 *   8. Footer
 *   9. Language modal
 *  10. Animations & responsive
 * ------------------------------------------------------------------- */

@import url("fonts.css");
@import url("font-awesome/css/fontawesome-all.css");

/* 1. Reset
 * ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

/* 2. Design tokens
 * ------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --color-primary: #f07c00;
  --color-primary-light: #ffb327;
  --color-primary-dark: #b85e00;
  --color-gold: #d4af37;

  /* Neutrals (dark theme) */
  --color-bg: #0a0a0c;
  --color-bg-elevated: #131316;
  --color-bg-card: #17181c;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #f4f4f5;
  --color-text-muted: #a1a1aa;
  --color-text-faint: #6b6b73;

  /* Typography */
  --font-heading: sans-serif;
  --font-body: sans-serif;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  /* Shape & motion */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --container-width: 1200px;
}

/* 3. Base typography & layout
 * ------------------------------------------------------------------- */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { color: var(--color-text-muted); }

.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section {
  padding-block: var(--space-6);
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-5);
}

.section-head.is-visible {
  max-width: 100%;
  width: 100%;
}

.section-head.is-visible h1,
.section-head.is-visible h2 {
  animation: headingIn 0.7s var(--ease) 0.15s both;
}

@keyframes headingIn {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: none; }
}

/* Gradient banner for the top of interior pages (About/Services/Projects/Careers/Contact) */
.section--top-gradient {
  position: relative;
  overflow: hidden;
}

.section--top-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(240, 124, 0, 0.22), transparent 55%),
    radial-gradient(circle at 85% 30%, rgba(212, 175, 55, 0.16), transparent 50%);
  animation: drift 18s ease-in-out infinite alternate;
  z-index: 0;
}

.section--top-gradient > .container {
  position: relative;
  z-index: 1;
}

.section-head .eyebrow {
  display: inline-block;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: var(--space-2);
}

.section-head p {
  margin-top: var(--space-2);
  font-size: 1.05rem;
}

.section--alt {
  background: var(--color-bg-elevated);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--ease) 0.2s, box-shadow var(--ease) 0.2s, background var(--ease) 0.2s;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: #1a1200;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(240, 124, 0, 0.35);
}

.btn--ghost {
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* 4. Navbar
 * ------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 1rem var(--space-3);
  background: rgba(10, 10, 12, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
}

.navbar__brand img { height: 32px; width: auto; }

.navbar__links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.navbar__links a {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--ease) 0.2s, background var(--ease) 0.2s;
}

.navbar__links a:hover,
.navbar__links a.is-active {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
}

.navbar__toggle {
  display: none;
  font-size: 1.5rem;
}

.language-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.language-toggle img { width: 18px; height: auto; border-radius: 2px; }
.language-toggle:hover { border-color: var(--color-primary); }

/* Homepage: single full-viewport screen, no scrolling */
body.page-home {
  height: 100vh;
  overflow: hidden;
}

body.page-home .navbar {
  position: absolute;
  inset-inline: 0;
  top: 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  z-index: 50;
}

body.page-home .hero {
  min-height: 100vh;
  height: 100vh;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

body.page-home .navbar__brand {
  display: none;
}

body.page-home .navbar {
  justify-content: flex-end;
}

/* 5. Hero
 * ------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: var(--space-6) var(--space-3);
  /* Gives .hero__inner's mouse-driven rotateX/rotateY (see ui.js
     initHeroParallax) an actual 3D vanishing point to tilt against. */
  perspective: 1400px;
}

/* Video background — the lowest layer */
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

.hero-video.is-active { opacity: 1; }

/* Soft dark wash so the copy stays legible over the video — kept
   deliberately subdued (no bright color blobs) so it never competes
   with the particle network animation drawn on top of it. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 6, 8, 0.5) 0%, rgba(6, 6, 8, 0.68) 55%, rgba(6, 6, 8, 0.86) 100%);
    z-index: 2;
    pointer-events: none;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(2%, -3%) scale(1.05); }
}

.hero__inner {
  position: relative;
  z-index: 4;
  max-width: var(--container-width);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-5);
  align-items: center;
  /* Transform is driven every frame by ui.js (initHeroParallax) —
     will-change hints the browser to keep this on its own layer,
     transform-style lets the rotateX/rotateY read as real 3D tilt. */
  will-change: transform;
  transform-style: preserve-3d;
}

/* Particle network animation — sits ABOVE the video and the dark
   wash (z-index 3, they're 1 and 2) so it's the most prominent
   moving element in the hero, not something buried behind color. */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Hero entrance animation, staggered */
.hero__eyebrow,
.hero h1,
.hero p.lead,
.hero__actions,
.hero__nav,
.hero__visual {
  opacity: 0;
  transform: translateY(18px);
  animation: heroIn 0.7s var(--ease) forwards;
}

.hero__eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.15s; }
.hero p.lead { animation-delay: 0.25s; }
.hero__actions { animation-delay: 0.35s; }
.hero__nav { animation-delay: 0.45s; }
.hero__visual { animation-delay: 0.3s; }

@keyframes heroIn {
  to { opacity: 1; transform: none; }
}

/* Menu-style button row shown inside the homepage hero */
.hero__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: var(--space-4);
}

.hero__nav a {
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color var(--ease) 0.2s, background var(--ease) 0.2s, transform var(--ease) 0.2s;
}

.hero__nav a:hover {
  border-color: var(--color-primary);
  background: rgba(240, 124, 0, 0.1);
  transform: translateY(-2px);
}

.hero__eyebrow {
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
}

.hero h1 { margin-bottom: var(--space-3); }

.hero p.lead {
  font-size: 1.15rem;
  max-width: 46ch;
  margin-bottom: var(--space-4);
}

.hero__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(240, 124, 0, 0.15), rgba(212, 175, 55, 0.05));
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

/* Subtle glow on the box's edge, on its own pseudo-element so it
   doesn't touch (and can't override) the entrance fade-in animation
   already set on .hero__visual itself above. */


.hero__visual img {
  opacity: 0.92;
}

@keyframes heroBorderGlow {
  0%, 100% {
    border-color: transparent;
    box-shadow: 0 0 0 rgba(255, 179, 39, 0);
  }
  50% {
    border-color: rgba(255, 179, 39, 0.55);
    box-shadow: 0 0 22px rgba(255, 179, 39, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__visual::after {
    animation: none;
  }
}

/* 6. Cards & grids
 * ------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  overflow: hidden;
  transition: transform var(--ease) 0.25s, border-color var(--ease) 0.25s, box-shadow var(--ease) 0.25s;
}

.card canvas.card-network {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

.card > * { position: relative; z-index: 1; }

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 124, 0, 0.4);
  box-shadow: var(--shadow-card);
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(240, 124, 0, 0.12);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: var(--space-2);
}

.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.95rem; margin: 0; }

.stat-card {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
  transition: transform var(--ease) 0.25s, border-color var(--ease) 0.25s, box-shadow var(--ease) 0.25s;
}

.stat-card canvas.card-network {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

.stat-card > * { position: relative; z-index: 1; }

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 124, 0, 0.4);
  box-shadow: var(--shadow-card);
}

.stat-card .stat-number {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.stat-card p { font-size: 0.88rem; }

/* Team members */
.team-card {
  text-align: center;
}

.team-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-2);
  border: 2px solid var(--color-border);
}

.team-card .role {
  display: block;
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.team-card .socials {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin-top: var(--space-2);
}

.team-card .socials a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--ease) 0.2s, color var(--ease) 0.2s;
}

.team-card .socials a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Job listing cards */
.job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.job-card .job-meta h3 { margin-bottom: 0.3rem; }
.job-card .job-meta p { margin: 0; font-size: 0.9rem; }

/* Contact info list */
.contact-list {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: var(--space-4);
}

.contact-list .card strong {
  display: block;
  color: var(--color-primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

/* 7. Forms
 * ------------------------------------------------------------------- */
.form-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr 1fr;
  max-width: 720px;
}

.form-grid .field--full { grid-column: 1 / -1; }

.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  transition: border-color var(--ease) 0.2s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.field textarea { resize: vertical; min-height: 130px; }

/* 8. Footer
 * ------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-3);
  background: var(--color-bg-elevated);
}

.footer__inner {
  max-width: var(--container-width);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--color-text-faint);
  font-size: 0.85rem;
}

.footer__socials {
  display: flex;
  gap: 0.8rem;
}

.footer__socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--ease) 0.2s, color var(--ease) 0.2s;
}

.footer__socials a:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* 9. Language modal
 * ------------------------------------------------------------------- */
.language-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
}

.language-modal.show { display: flex; }

.language-modal__card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  width: min(360px, 90vw);
}

.language-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.language-modal__head button {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-text-muted);
}

.language-modal a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  transition: background var(--ease) 0.2s;
}

.language-modal a:hover { background: rgba(255, 255, 255, 0.06); }
.language-modal a img { width: 28px; border-radius: 3px; }
.language-modal a small { display: block; color: var(--color-text-faint); }

/* 10. Reveal-on-scroll & responsive
 * ------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), max-width 0.7s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

#preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
body.page-home {

    overflow: auto;
}
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { max-width: 260px; margin-inline: auto; }
  .navbar__links { display: none; }
  .navbar__links.show-mobile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-2);
  }
  .navbar__toggle { display: block; }
  .form-grid { grid-template-columns: 1fr; }
}

/* 11. Toast notifications
 * ------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 2 * var(--space-3)));
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.45;
  animation: toastIn 0.35s var(--ease) forwards;
}

.toast--success { border-left-color: #34c77b; }
.toast--error { border-left-color: #e5484d; }

.toast.is-leaving {
  animation: toastOut 0.28s var(--ease) forwards;
}

.toast__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 0.05rem;
}

.toast--success .toast__icon { background: rgba(52, 199, 123, 0.16); color: #34c77b; }
.toast--error .toast__icon { background: rgba(229, 72, 77, 0.16); color: #e5484d; }

.toast__body { flex: 1; }

.toast__close {
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  opacity: 0.7;
}

.toast__close:hover { opacity: 1; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(24px); }
}

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
  .toast.is-leaving { animation: none; }
}

@media (max-width: 480px) {
  .toast-container {
    left: var(--space-3);
    right: var(--space-3);
    max-width: none;
  }
}


/* 12. Gallery
 * ------------------------------------------------------------------- */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: var(--space-4);
}

.gallery-filter {
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.gallery-filter:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.gallery-filter.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #1a1206;
  font-weight: 600;
}

/* Bento-style grid: every item defaults to 1x1, and one of the
   .gallery-item--WxH modifiers below stretches it across more
   columns/rows. grid-auto-flow: dense backfills any gaps left by
   the bigger tiles (and by filtered-out/hidden items) instead of
   leaving holes. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 130px;
  grid-auto-flow: dense;
  gap: 14px;
}

.gallery-item {
  position: relative;
  grid-column: span 1;
  grid-row: span 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  padding: 0;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.gallery-item.is-hidden { display: none; }

.gallery-item--2x1 { grid-column: span 2; grid-row: span 1; }
.gallery-item--1x2 { grid-column: span 1; grid-row: span 2; }
.gallery-item--2x2 { grid-column: span 2; grid-row: span 2; }
.gallery-item--2x3 { grid-column: span 2; grid-row: span 3; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent);
  color: #fff;
  font-size: 0.82rem;
  text-align: left;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.gallery-item:hover .gallery-item__caption,
.gallery-item:focus-visible .gallery-item__caption {
  opacity: 1;
  transform: none;
}

@media (max-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 115px;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 135px;
    gap: 10px;
  }

  /* Bento variety looks cramped on a 2-column phone screen — flatten
     everything back to uniform 1x1 tiles. */
  .gallery-item,
  .gallery-item--2x1,
  .gallery-item--1x2,
  .gallery-item--2x2,
  .gallery-item--2x3 {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 8, 0.94);
  padding: var(--space-3);
}

.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

.lightbox__caption {
  position: absolute;
  bottom: var(--space-4);
  left: 0;
  right: 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  padding: 0 var(--space-6);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox__close { top: var(--space-3); right: var(--space-3); }
.lightbox__prev { left: var(--space-3); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: var(--space-3); top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .lightbox__prev,
  .lightbox__next {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}

/* Hero marquee: aşağı kənara yapışmış sürüşən logo zolağı,
   sağda hərəkət etməyən "1200+ Partners" mətni ilə. */
.hero-marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  z-index: 2;
  overflow: hidden;
  background: rgba(10, 12, 18, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
}

.hero-marquee__track {
  display: flex;
  align-items: center;
  animation: hero-marquee-scroll 28s linear infinite;
}
.hero-marquee__set {
  display: flex;
  align-items: center;
  gap: 56px;
  padding-left: 56px;
  flex-shrink: 0;
}

.hero-marquee:hover .hero-marquee__track {
  animation-play-state: paused;
}

.hero-marquee__track img {
  height: 38px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
 
  opacity: 0.8;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.hero-marquee__track img:hover {
  opacity: 1;
}

@keyframes hero-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero-marquee__stat {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: 0 var(--space-3) 0 var(--space-5);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  background: linear-gradient(90deg, transparent, rgba(10, 12, 18, 0.85) 20%, #f07c00);
}

@media (max-width: 768px) {
  .hero-marquee { height: 70px; }
  .hero-marquee__track img { height: 28px; }
  .hero-marquee__stat { font-size: 0.85rem; padding: 0 var(--space-2) 0 var(--space-4); }
}
/* =====================================================================
 * 11. Support Chat Widget (üzən dəstək çatı)
 * ------------------------------------------------------------------- */

/* MÜHÜM: aşağıdakı .chat-widget__thread/.chat-widget__composer/
 * .chat-emoji-picker qaydaları JS-in idarə etdiyi HTML "hidden"
 * atributundan asılı olmadan display:flex/grid təyin edir — bu,
 * brauzerin defolt "[hidden]{display:none}" qaydasını ÜSTƏLƏYİR
 * (eyni spesifiklik + sonrakı sətir qalib gəlir), nəticədə element
 * "gizli" olsa belə görünür və altındakı/yanındakı düymələrin
 * kliklərini bloklayır. Bu qlobal qayda bunu düzəldir.
 */
[hidden] { display: none !important; }

.chat-widget {
  position: fixed;
  right: var(--space-3);
  bottom: var(--space-3);
  z-index: 300;
}

.chat-widget__bubble {
  visibility: hidden;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(240, 124, 0, 0.4);
  transition: transform var(--ease) 0.2s;
}
.chat-widget__bubble:hover { transform: scale(1.06); }
.chat-widget.is-open .chat-widget__bubble { display: none; }
.chat-widget__bubble.has-conversation::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2ecc71;
  border: 2px solid var(--color-bg);
}

.chat-widget__panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(360px, 90vw);
  max-height: min(560px, 75vh);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-widget.is-open .chat-widget__panel { display: flex; }

.chat-widget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
}
.chat-widget__head-info { display: flex; align-items: center; gap: 0.7rem; }
.chat-widget__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.chat-widget__head-info strong { display: block; font-size: 0.92rem; }
.chat-widget__head-info small { display: block; opacity: 0.85; font-size: 0.75rem; }
.chat-widget__head button {
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  opacity: 0.85;
}
.chat-widget__head button:hover { opacity: 1; }

.chat-widget__prechat {
  padding: var(--space-3);
  overflow-y: auto;
}
.chat-widget__intro { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: var(--space-2); }
.chat-widget__prechat .field { margin-bottom: 0.8rem; }

.chat-widget__thread {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--color-bg);
}

.chat-msg { display: flex; }
.chat-msg--customer { justify-content: flex-end; }
.chat-msg--admin { justify-content: flex-start; }
.chat-msg__bubble {
  max-width: 78%;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
  font-size: 0.87rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg--customer .chat-msg__bubble {
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 3px;
}
.chat-msg--admin .chat-msg__bubble {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 3px;
}

.chat-widget__composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: var(--space-2);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-card);
}
.chat-widget__composer textarea {
  flex: 1;
  resize: none;
  max-height: 100px;
  padding: 0.5rem 0.7rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.87rem;
  font-family: inherit;
}
.chat-widget__composer button[type="submit"] {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  flex-shrink: 0;
}

.chat-widget__emoji-wrap { position: relative; }
#chatEmojiToggle {
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
#chatEmojiToggle:hover { background: rgba(255, 255, 255, 0.06); }

.chat-emoji-picker {
  position: absolute;
  bottom: 46px;
  left: 0;
  width: 200px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.2rem;
  padding: 0.5rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.chat-emoji-picker button {
  font-size: 1.2rem;
  padding: 0.3rem;
  border-radius: 6px;
  transition: background var(--ease) 0.15s;
}
.chat-emoji-picker button:hover { background: rgba(255, 255, 255, 0.08); }

/* Hero-dakı ikon-only çat düyməsi (operator qulaqcığı) */
.btn--chat-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
}

@media (max-width: 480px) {
  .chat-widget { right: var(--space-2); bottom: var(--space-2); }
  .chat-widget__panel { width: 92vw; max-height: 80vh; }
}
