/* ===================================================
   template.projects.css - Projects showcase page
   Inherits: template.css (reset, variables, buttons, nav, footer)
   =================================================== */

/* --- Typography (same as websites page) --- */
.label {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--orange);
}

.h1-display {
  font-size: clamp(48px, 6.5vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin: 0;
}

.h2-section {
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  font-weight: 400;
  margin: 0;
}

.body-lg {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.45;
  font-weight: 300;
  color: var(--dark);
}

/* =========================================================
   HERO
   ========================================================= */
.proj-hero {
  position: relative;
  padding: 180px 80px 120px;
  text-align: center;
  overflow: hidden;
}

.proj-hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.proj-hero .label {
  margin-bottom: 32px;
  justify-content: center;
}

.proj-hero h1 {
  margin: 0 0 28px;
}

.proj-hero h1 span {
  color: var(--orange);
}

.proj-hero .lead {
  max-width: 52ch;
  margin: 0 auto;
}

/* =========================================================
   PROJECTS SHOWCASE
   ========================================================= */
.proj-showcase {
  padding: 80px 80px 120px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Single project row */
.proj-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: center;
  padding: 80px 0;
  border-bottom: 1px solid rgba(7, 40, 52, 0.08);
}

.proj-row:last-child {
  border-bottom: none;
}

/* Reversed row: image on the left */
.proj-row.reverse {
  grid-template-columns: 1.3fr 1fr;
}

.proj-row.reverse .proj-text {
  order: 2;
}

.proj-row.reverse .proj-vis {
  order: 1;
}

/* Project text */
.proj-text {
  padding: 20px 0;
}

.proj-num {
  font-family: 'Clash Grotesk', sans-serif;
  font-size: 13px;
  color: var(--orange);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 16px;
}

.proj-title {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--text);
}

.proj-type {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 24px;
  font-weight: 500;
}

.proj-desc {
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.6;
  color: var(--dark);
  font-weight: 300;
  max-width: 44ch;
  margin: 0;
  margin-bottom: 24px;
}

/* Project visual — 3D browser mockup */
.proj-vis {
  perspective: 1200px;
  perspective-origin: 50% 50%;
  display: flex;
  align-items: center;
}

.proj-row.reverse .proj-vis {
  perspective-origin: 50% 50%;
}

/* Stage: holds one or more mockup frames, carries the 3D tilt + height animation */
.proj-stage {
  position: relative;
  width: 100%;
  transform: rotateY(12deg) rotateX(4deg);
  transform-style: preserve-3d;
  transition: transform .3s ease-out, height .45s cubic-bezier(.4, 0, .2, 1);
  will-change: transform, height;
}

.proj-row.reverse .proj-stage {
  transform: rotateY(-12deg) rotateX(4deg);
}

.proj-stage:hover {
  transform: rotateY(6deg) rotateX(2deg);
}

.proj-row.reverse .proj-stage:hover {
  transform: rotateY(-6deg) rotateX(2deg);
}

/* A single mockup frame — browser chrome by default */
.proj-frame {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  background: var(--white);
  border: 1px solid rgba(7, 40, 52, 0.1);
  border-radius: 14px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, .18),
    0 8px 20px rgba(0, 0, 0, .12),
    20px 20px 40px rgba(0, 0, 0, .08);
  overflow: hidden;
  transition: box-shadow .3s ease-out;
}

.proj-stage:hover .proj-frame {
  box-shadow:
    0 35px 80px rgba(0, 0, 0, .22),
    0 12px 28px rgba(0, 0, 0, .14),
    24px 24px 50px rgba(0, 0, 0, .1);
}

/* Phone mockup — narrower, centered, dark bezel + notch */
.proj-frame--phone {
  width: auto;
  max-width: 270px;
  margin: 0 auto;
  background: #0c1722;
  border: none;
  border-radius: 40px;
  padding: 10px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, .25),
    0 8px 20px rgba(0, 0, 0, .16);
}

.proj-frame--phone .proj-screen-body {
  border-radius: 30px;
}

.proj-phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 42%;
  height: 18px;
  background: #0c1722;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}

.proj-screen-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--cream);
  border-bottom: 1px solid rgba(7, 40, 52, 0.08);
  flex-shrink: 0;
  text-align: left;
  direction: ltr;
}

.proj-screen-bar > span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(7, 40, 52, 0.18);
}

.proj-screen-bar > span:first-child {
  background: #FF6B5B;
}

.proj-screen-bar > span:nth-child(2) {
  background: #FFC95B;
}

.proj-screen-bar > span:nth-child(3) {
  background: var(--green);
}

.proj-url {
  margin-right: 16px;
  background: var(--white);
  border: 1px solid rgba(7, 40, 52, 0.08);
  border-radius: 999px;
  padding: 5px 16px;
  font-family: 'Clash Grotesk', sans-serif;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  direction: ltr;
  flex: 1;
}

.proj-screen-body {
  overflow: hidden;
  background: #f0f0f0;
  position: relative;
  min-width: 0;
}

.proj-screen-body img {
  width: 100%;
  display: block;
}

/* --- Multi-frame fade slideshow --- */
/* Stage height is set inline by JS to match the active frame; frames stack and cross-fade. */
.proj-stage.has-slideshow .proj-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.proj-stage.has-slideshow .proj-frame--phone {
  width: 270px;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
}

.proj-stage.has-slideshow .proj-frame.active {
  opacity: 1;
  z-index: 2;
}

.proj-slideshow-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.proj-slideshow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s;
}

.proj-slideshow-dot.active {
  background: #fff;
}

/* --- Project tags --- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
    font-size: 11px;
  font-weight: 500;
  border-radius: 100px;
  background: rgba(38, 136, 191, 0.08);
  color: #2688BF;
  border: 1px solid rgba(38, 136, 191, 0.18);
  letter-spacing: 0.01em;
}

/* =========================================================
   STATS SECTION
   ========================================================= */
.proj-stats-section {
  background: var(--navy-deep);
  color: var(--white);
  padding: 140px 80px;
  position: relative;
  overflow: hidden;
}

.proj-stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1.2px);
  background-size: 24px 24px;
  pointer-events: none;
}

.proj-stats-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

.proj-stats-head {
  text-align: center;
  margin-bottom: 80px;
}

.proj-stats-head h2 {
  color: var(--white);
  margin-bottom: 20px;
}

.proj-stats-head h2 em {
  font-style: normal;
  color: var(--orange);
}

.proj-stats-head .lead {
  color: rgba(255, 255, 255, 0.7);
  max-width: 48ch;
  margin: 0 auto;
}

.proj-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
}

.proj-stat-card {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: all .3s ease;
}

.proj-stat-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 139, 34, 0.3);
  transform: translateY(-4px);
}

.proj-stat-num {
  display: block;
  font-family: 'Clash Grotesk', sans-serif;
  font-size: clamp(30px, 6vw, 80px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 12px;
}

.proj-stat-label {
  display: block;
  font-size: 15px;
  font-weight: 400;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .proj-hero {
    padding: 140px 32px 80px;
  }

  .proj-showcase {
    padding: 40px 32px 80px;
  }

  .proj-row,
  .proj-row.reverse {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 0;
  }

  .proj-row.reverse .proj-text {
    order: 0;
  }

  .proj-row.reverse .proj-vis {
    order: 0;
  }

  .proj-stage,
  .proj-row.reverse .proj-stage {
    transform: rotateY(0deg) rotateX(0deg);
  }

  .proj-stage:hover,
  .proj-row.reverse .proj-stage:hover {
    transform: rotateY(0deg) rotateX(0deg);
  }

  .proj-stats-section {
    padding: 80px 32px;
  }

  .proj-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .proj-stat-card {
    padding: 28px 16px;
  }
}

@media (max-width: 480px) {
  .proj-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .proj-hero h1 {
    font-size: 36px;
  }
}




.clients-title {
    font-size: clamp(18px, 1.4vw, 22px);
    line-height: 1.45;
    font-weight: 300;
    color: var(--dark);
}


.clients-section {
  padding: 120px 80px;
  background: var(--cream);
  overflow: hidden;
}

.clients-types {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px auto 50px;
}

.client-type-btn {
  padding: 2px 10px;
  border-radius: 100px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  color: #555;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.client-type-btn:hover {
  border-color: rgba(38,136,191,0.5);
  color: #222;
  background: rgba(38,136,191,0.06);
}

.client-type-btn.active {
  background: #2688BF;
  border-color: #2688BF;
  color: #fff;
}

.clients-stage {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 200px));
  justify-content: center;
  gap: 20px;
  margin: 0 auto;
  direction: rtl;
  max-width: 100%;
}

.client-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/10;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.3s ease, border-color 0.3s ease, opacity 0.5s ease, box-shadow 0.3s ease;
  opacity: 1;
}

.client-logo-wrap:hover {
  border-color: rgba(38,136,191,0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(38,136,191,0.15);
}

.client-logo-wrap.hidden {
  display: none;
}

/* Staggered animation for page transitions */
.client-logo-wrap.fade-out {
  animation: clientFadeOut 0.3s ease forwards;
}

.client-logo-wrap.fade-in {
  opacity: 0;
  animation: clientFadeIn 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes clientFadeOut {
  0% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.92) translateY(8px); }
}

@keyframes clientFadeIn {
  0% { opacity: 0; transform: scale(0.92) translateY(-8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Filter animation */
.client-logo-wrap.filter-out {
  animation: filterOut 0.3s ease forwards;
}

.client-logo-wrap.filter-in {
  opacity: 0;
  animation: filterIn 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes filterOut {
  0% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.92) translateY(8px); }
}

@keyframes filterIn {
  0% { opacity: 0; transform: scale(0.92) translateY(-8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.client-logo {
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
  filter: grayscale(0.3) brightness(1.1);
  transition: filter 0.3s ease;
}

.client-logo-wrap:hover .client-logo {
  filter: grayscale(0) brightness(1);
}

/* Navigation */
.clients-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-direction: row-reverse;
}

.clients-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clients-nav-btn:hover {
  background: rgba(38,136,191,0.1);
  border-color: #2688BF;
  color: #2688BF;
}

.clients-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.clients-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.clients-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  cursor: pointer;
  transition: all 0.3s ease;
}

.clients-dot.active {
  width: 24px;
  border-radius: 4px;
  background: #2688BF;
}

@media (max-width: 768px) {
  .clients-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
  }
  .clients-section {
    padding: 60px 20px;
  }
  .clients-types {
    gap: 8px;
    margin: 24px auto 32px;
  }
  .client-type-btn {
    font-size: 13px;
    padding: 2px 8px;
  }
  .clients-nav {
    gap: 10px;
    margin-top: 28px;
  }
  .clients-nav-btn {
    width: 36px;
    height: 36px;
  }
  .client-logo-wrap {
    padding: 12px;
  }
  .client-logo {
    max-height: 36px;
  }
  .clients-stage {
    min-height: 220px;
  }
  .clients-dots {
    display: none;
  }
}

.btn-go-web {
  float: left;
}

.ap-eyebrow {
  font-size: 72px;
}

@media (max-width: 768px) {
  .ap-eyebrow {
    font-size: 48px;
  }
}



.brand-bar-wrap {
  max-width: 20%;
  margin: 50px auto;
}


.proj-client-logo {
    height: 140px;
    max-width: 70%;
    object-fit: contain;
    position: absolute;
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
    z-index: 2;
    pointer-events: none;
}

.client-logo.invert {
  filter: invert(1) grayscale(0.3) brightness(1.1);
}

.client-logo-wrap:hover .client-logo.invert {
  filter: invert(1) grayscale(0.3) brightness(1.1);
}