/* ========================================================================
   CLIENTS SECTION — Professional work grid
   Inspired by losangeleswebsitedesignexperts.com (clean, trust-focused)
   Branded with LAV gold/black luxury palette
   Build: 16.04.2026
   ======================================================================== */

:root {
  --lav-gold: #C9A84C;
  --lav-gold-soft: #E8D49A;
  --lav-gold-dim: rgba(201, 168, 76, 0.14);
  --lav-black: #0A0908;
  --lav-charcoal: #151311;
  --lav-stone: #1E1B18;
  --lav-cream: #F5F1E8;
  --lav-cream-dim: rgba(245, 241, 232, 0.55);
  --lav-line: rgba(245, 241, 232, 0.08);
}

/* =======================  SECTION SHELL  ======================= */
.clients {
  position: relative;
  padding: clamp(80px, 10vw, 140px) 0 clamp(80px, 10vw, 140px);
  background:
    radial-gradient(ellipse at top, rgba(201, 168, 76, 0.045), transparent 60%),
    var(--lav-black);
  overflow: hidden;
}

/* Subtle grain overlay for depth */
.clients::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: overlay;
  z-index: 0;
}

.clients > .container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* =======================  HEADER  ======================= */
.clients-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto clamp(40px, 6vw, 60px);
}

.clients-header .section-number {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--lav-gold);
  margin-bottom: 20px;
  font-weight: 500;
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  padding: 4px 12px;
  border: 1px solid var(--lav-gold-dim);
  border-radius: 999px;
}

.clients-header h2 {
  font-family: 'Fraunces', 'Plus Jakarta Sans', serif;
  font-optical-sizing: auto;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 400;
  color: var(--lav-cream);
  margin: 0 0 20px;
}

.clients-header h2 .gradient-text {
  background: linear-gradient(120deg, var(--lav-gold) 0%, var(--lav-gold-soft) 50%, var(--lav-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  font-weight: 300;
}

.clients-header .section-sub {
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.6;
  color: var(--lav-cream-dim);
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* =======================  CATEGORY CHIPS  ======================= */
.client-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: clamp(40px, 5vw, 60px);
}

.chip {
  padding: 8px 18px;
  border: 1px solid var(--lav-line);
  border-radius: 999px;
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--lav-cream-dim);
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  user-select: none;
}

.chip:hover {
  color: var(--lav-cream);
  border-color: rgba(201, 168, 76, 0.4);
}

.chip-active {
  background: var(--lav-gold);
  border-color: var(--lav-gold);
  color: var(--lav-black);
  font-weight: 500;
}

/* =======================  CLIENT GRID  ======================= */
.client-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
}

@media (min-width: 1100px) {
  .client-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
  }
  .client-card-featured {
    grid-column: span 2;
    grid-row: span 2;
  }
}

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

/* =======================  CLIENT CARD  ======================= */
.client-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--lav-charcoal);
  border: 1px solid var(--lav-line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--lav-cream);
  transition:
    transform 0.5s cubic-bezier(.16,.84,.32,1),
    border-color 0.5s ease,
    box-shadow 0.5s ease,
    background 0.5s ease;
  will-change: transform;
}

.client-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 76, 0.35);
  box-shadow:
    0 30px 60px -30px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(201, 168, 76, 0.18) inset;
}

/* Browser chrome */
.card-browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #1a1816, var(--lav-charcoal));
  border-bottom: 1px solid var(--lav-line);
}

.card-browser-bar .browser-dots {
  display: flex;
  gap: 5px;
}

.card-browser-bar .browser-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a3633;
}

.card-browser-bar .browser-dots span:nth-child(1) { background: #4a3e34; }
.card-browser-bar .browser-dots span:nth-child(2) { background: #4a4534; }
.card-browser-bar .browser-dots span:nth-child(3) { background: #354a36; }

.card-browser-bar .browser-url {
  flex: 1;
  text-align: center;
  font-family: 'Inter Tight', 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--lav-cream-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.card-browser-bar .live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulseLive 2s ease-in-out infinite;
}

@keyframes pulseLive {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

/* Screenshot area */
.card-shot-inner {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0c0b0a;
}

.card-shot-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.9s cubic-bezier(.16,.84,.32,1), filter 0.5s ease;
  filter: saturate(0.95) contrast(1.02);
}

.card-shot-inner img.fallback {
  object-position: center;
}

.client-card:hover .card-shot-inner img {
  transform: scale(1.05);
  filter: saturate(1.1) contrast(1.05);
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(10, 9, 8, 0) 50%, rgba(10, 9, 8, 0.85));
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.client-card:hover .card-overlay {
  opacity: 1;
}

.overlay-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--lav-gold);
  color: var(--lav-black);
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 18px;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(.16,.84,.32,1), opacity 0.4s ease;
}

.client-card:hover .overlay-cta {
  transform: translateY(0);
  opacity: 1;
}

/* Card info / text below screenshot */
.card-info {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-info h3 {
  font-family: 'Fraunces', 'Plus Jakarta Sans', serif;
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--lav-cream);
  margin: 0;
}

.card-category {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--lav-gold);
  text-transform: uppercase;
  margin: 4px 0 0;
  font-weight: 500;
}

.card-desc {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--lav-cream-dim);
  margin: 10px 0 0;
}

/* =======================  FEATURED CARD  ======================= */
.client-card-featured {
  background:
    radial-gradient(ellipse at top right, rgba(201, 168, 76, 0.08), transparent 50%),
    var(--lav-charcoal);
  border-color: rgba(201, 168, 76, 0.25);
}

.client-card-featured:hover {
  border-color: rgba(201, 168, 76, 0.55);
}

.client-card-featured .card-shot-inner {
  aspect-ratio: 16 / 9.5;
}

.client-card-featured .card-info {
  padding: 28px 32px 34px;
}

.card-badge {
  display: inline-block;
  width: max-content;
  padding: 4px 10px;
  background: var(--lav-gold);
  color: var(--lav-black);
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  border-radius: 4px;
  margin-bottom: 12px;
}

.client-card-featured .card-info h3 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
}

/* =======================  EMPTY SLOT (INVITATION)  ======================= */
.client-card-empty {
  background:
    linear-gradient(135deg, rgba(201, 168, 76, 0.04), rgba(201, 168, 76, 0.01));
  border: 1.5px dashed rgba(201, 168, 76, 0.35);
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.5s cubic-bezier(.16,.84,.32,1);
}

.client-card-empty:hover {
  border-style: solid;
  border-color: var(--lav-gold);
  background:
    linear-gradient(135deg, rgba(201, 168, 76, 0.12), rgba(201, 168, 76, 0.04));
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -30px rgba(201, 168, 76, 0.3);
}

.empty-inner {
  padding: 32px 28px;
  max-width: 320px;
}

.empty-plus {
  font-family: 'Fraunces', serif;
  font-size: 64px;
  line-height: 1;
  color: var(--lav-gold);
  font-weight: 200;
  margin-bottom: 18px;
  transition: transform 0.6s cubic-bezier(.16,.84,.32,1);
}

.client-card-empty:hover .empty-plus {
  transform: rotate(90deg) scale(1.1);
}

.client-card-empty h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
  color: var(--lav-cream);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.client-card-empty p {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--lav-cream-dim);
  margin: 0 0 18px;
}

.empty-arrow {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--lav-gold);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s ease;
}

.client-card-empty:hover .empty-arrow {
  gap: 12px;
}

/* =======================  FOOTER CTA  ======================= */
.clients-footer {
  text-align: center;
  margin-top: clamp(50px, 6vw, 72px);
  padding-top: clamp(40px, 5vw, 50px);
  border-top: 1px solid var(--lav-line);
}

.clients-footer-line {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 300;
  font-style: italic;
  color: var(--lav-cream);
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}

.clients-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--lav-gold);
  color: var(--lav-black);
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(.16,.84,.32,1), box-shadow 0.3s ease;
  box-shadow: 0 10px 30px -10px rgba(201, 168, 76, 0.5);
}

.clients-footer .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -10px rgba(201, 168, 76, 0.7);
}

/* =======================  MAGNETIC BUTTON EFFECT (JS-enhanced)  ======================= */
.magnetic {
  transition: transform 0.3s cubic-bezier(.16,.84,.32,1);
  will-change: transform;
}

/* =======================  ENTRANCE REVEAL  ======================= */
.clients [data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s cubic-bezier(.16,.84,.32,1),
    transform 0.9s cubic-bezier(.16,.84,.32,1);
}

.clients [data-animate="fade-up"].in-view {
  opacity: 1;
  transform: translateY(0);
}

/* =======================  RESPONSIVE  ======================= */
@media (max-width: 640px) {
  .client-card-featured .card-info h3 { font-size: 1.5rem; }
  .card-info { padding: 18px 18px 22px; }
  .client-card-featured .card-info { padding: 22px 22px 28px; }
  .chip { font-size: 12px; padding: 7px 14px; }
}

/* ========================================================================
   TESTIMONIALS · Aggregate Rating Badge + Trust Row
   ======================================================================== */

/* Google-style aggregate rating under section header */
.rating-aggregate {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 14px 26px;
  background: var(--lav-charcoal, #151311);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 999px;
  box-shadow: 0 20px 60px -30px rgba(201, 168, 76, 0.4);
}

.rating-stars-big {
  font-size: 22px;
  letter-spacing: 0.15em;
  color: var(--lav-gold, #C9A84C);
  text-shadow: 0 0 20px rgba(201, 168, 76, 0.5);
  line-height: 1;
}

.rating-score {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.1;
}

.rating-score strong {
  font-family: 'Fraunces', 'Plus Jakarta Sans', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--lav-cream, #F5F1E8);
  letter-spacing: -0.02em;
}

.rating-score span {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--lav-cream-dim, rgba(245, 241, 232, 0.55));
  margin-top: 2px;
  text-transform: uppercase;
}

/* Upgrade testimonial stars to glow gold */
.testimonial-stars {
  color: var(--lav-gold, #C9A84C);
  font-size: 18px;
  letter-spacing: 0.1em;
  text-shadow: 0 0 14px rgba(201, 168, 76, 0.45);
  margin-bottom: 16px;
}

/* Trust row below testimonial grid */
.rating-trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: clamp(40px, 5vw, 60px);
  padding: 32px clamp(20px, 4vw, 40px);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.06), rgba(201, 168, 76, 0.01));
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 16px;
}

.trust-metric {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trust-metric strong {
  font-family: 'Fraunces', 'Plus Jakarta Sans', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1;
  color: var(--lav-gold, #C9A84C);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #C9A84C, #E8D49A);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.trust-metric span {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--lav-cream-dim, rgba(245, 241, 232, 0.6));
  line-height: 1.4;
}

@media (max-width: 700px) {
  .rating-trust-row { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 24px 16px; }
  .rating-aggregate { gap: 10px; padding: 12px 18px; flex-wrap: wrap; justify-content: center; }
  .rating-score { text-align: center; align-items: center; }
}

/* ========================================================================
   MACBOOK MOCKUP · Wraps card-shot in realistic laptop silhouette
   Inspired by losangeleswebsitedesignexperts.com preview style
   ======================================================================== */

/* Replace plain browser bar with a MacBook-style top bezel */
.card-shot {
  position: relative;
  padding: 12px 14px 0;
  background:
    linear-gradient(180deg, #2a2826 0%, #1a1816 100%);
  border-radius: 14px 14px 0 0;
}

/* Add the MacBook notch/camera */
.card-shot::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 5px;
  background: #0a0908;
  border-radius: 3px;
  z-index: 2;
}

/* Tiny camera dot */
.card-shot::after {
  content: "";
  position: absolute;
  top: 7.5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 3px;
  background: #1a1a1a;
  border: 0.5px solid #333;
  border-radius: 50%;
  z-index: 3;
  box-shadow: inset 0 0 2px rgba(100, 100, 100, 0.4);
}

/* Browser chrome now sits inside the laptop bezel as inner frame */
.card-browser-bar {
  border-radius: 8px 8px 0 0;
  margin-top: 8px;
}

/* Screenshot screen with subtle reflection */
.card-shot-inner {
  border-radius: 0 0 6px 6px;
  overflow: hidden;
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 -6px 12px -8px rgba(0, 0, 0, 0.6);
}

/* Glossy screen sheen */
.card-shot-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 45%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 55%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
  transition: transform 1.2s cubic-bezier(.16,.84,.32,1);
  transform: translateX(-100%);
}

.client-card:hover .card-shot-inner::before {
  transform: translateX(100%);
}

/* MacBook bottom bezel — the laptop hinge/base */
.card-shot {
  margin-bottom: 0;
}

.client-card > .card-shot + .card-info {
  position: relative;
  padding-top: 28px;
}

/* Bottom of laptop mockup — thin silver bar + shadow */
.client-card > .card-shot + .card-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 14px;
  background:
    linear-gradient(180deg, #1e1c1a 0%, #0f0e0d 100%);
  border-radius: 0 0 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

/* Hinge notch in middle of base */
.client-card > .card-shot + .card-info::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 0 0 4px 4px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

/* Floor shadow — makes it feel like it's sitting on a surface */
.client-card {
  position: relative;
}

.client-card::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 10%;
  right: 10%;
  height: 40px;
  background: radial-gradient(ellipse at center, rgba(201, 168, 76, 0.18), transparent 70%);
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: -1;
}

.client-card:hover::after {
  opacity: 1;
}

/* Adjust padding inside the mockup for the featured card */
.client-card-featured .card-shot {
  padding: 16px 18px 0;
}

.client-card-featured .card-shot::before {
  width: 60px;
  height: 6px;
}

/* Mobile: reduce mockup chrome */
@media (max-width: 640px) {
  .card-shot { padding: 9px 10px 0; }
  .card-shot::before { width: 38px; height: 4px; }
  .card-shot::after { top: 5.5px; width: 2.5px; height: 2.5px; }
  .client-card > .card-shot + .card-info::before { height: 10px; left: 8%; right: 8%; }
  .client-card > .card-shot + .card-info::after { width: 60px; height: 3px; }
  .client-card > .card-shot + .card-info { padding-top: 22px; }
}

/* Empty card has no mockup */
.client-card-empty .card-shot,
.client-card-empty .card-shot::before,
.client-card-empty .card-shot::after {
  display: none;
}
.client-card-empty > .card-shot + .card-info::before,
.client-card-empty > .card-shot + .card-info::after {
  display: none;
}

/* ========================================================================
   HERO 3D CANVAS — Three.js overlay, sits behind hero text
   ======================================================================== */

.hero-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;                /* behind hero-content (z-index: 2) */
  pointer-events: none;
  opacity: 0.85;             /* let it blend with the dark bg */
  mix-blend-mode: screen;    /* gold glows against dark background */
}

/* Ensure hero-content sits above canvas */
.hero .hero-content {
  position: relative;
  z-index: 3;
}

.hero .particles {
  position: relative;
  z-index: 2;
}

/* Fade-in for 3D canvas on load */
.hero-3d-canvas {
  animation: canvas3dIn 2.5s ease-out forwards;
}

@keyframes canvas3dIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 0.85; transform: scale(1); }
}

/* Reduce motion: dim further, no animation */
@media (prefers-reduced-motion: reduce) {
  .hero-3d-canvas {
    animation: none;
    opacity: 0.5;
  }
}

/* Mobile: reduce opacity for readability */
@media (max-width: 768px) {
  .hero-3d-canvas { opacity: 0.55; }
}
