/*
  Our Work / Services Section
  Styles for template-parts/sections/our-work.php
*/

.our-work-section {
  background-color: var(--color-bg);
  border-bottom: 1px solid rgba(46, 65, 46, 0.04);
  padding-block: var(--space-20);
}

.our-work-shell {
  background-color: var(--color-green-deep);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.055'/%3E%3C/svg%3E");
  background-repeat: repeat;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(250, 248, 243, 0.08);
  padding-block: 64px;
  margin-inline: 32px;
  color: #D9D9D9;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(22, 27, 22, 0.15);
}

.our-work-shell__content {
  width: 100%;
  max-width: calc(var(--container-width) - 64px);
  margin-inline: auto;
  padding-inline: calc(var(--container-padding) - 32px);
}

.our-work-section__header {
  text-align: center;
  margin-bottom: 64px;
}

.our-work-section__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #FAF8F3;
  padding: 4px 12px;
  border: 1px solid rgba(250, 248, 243, 0.2);
  border-radius: var(--radius-pill);
  background-color: rgba(250, 248, 243, 0.08);
  margin-bottom: var(--space-4);
}

.our-work-section__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.1;
  color: #FAF8F3;
  margin-bottom: var(--space-4);
}

.our-work-section__description {
  font-size: var(--text-base);
  color: rgba(217, 217, 217, 0.8);
  max-width: 620px;
  margin-inline: auto;
  line-height: 1.6;
}

.our-work-section__body {
  display: grid;
  grid-template-columns: 58% 36%;
  column-gap: 6%;
  align-items: center;
}

.our-work-services {
  display: flex;
  flex-direction: column;
}

.our-work-service {
  position: relative;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(250, 248, 243, 0.1);
  padding-block: 28px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.our-work-service__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(250, 248, 243, 0.1);
  color: #FAF8F3;
  font-size: 0 !important;
  /* Hide original arrow character */
  margin-left: -40px;
  /* Net outer width 0 inside flex box to prevent clipping! */
  margin-right: 0;
  opacity: 0;
  flex-shrink: 0;
  transition: margin-left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
    margin-right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.4s ease,
    background-color 0.3s ease,
    color 0.3s ease;
  pointer-events: none;
}

.our-work-service__arrow::after {
  content: '→';
  font-size: 18px;
  display: inline-block;
  line-height: 1;
}

.our-work-service.active .our-work-service__arrow {
  margin-left: 0;
  margin-right: 16px;
  opacity: 1;
  background-color: #FAF8F3;
  color: var(--color-green-deep);
}

.our-work-service__text {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.3vw, 2.1rem);
  font-weight: 400;
  line-height: 1.25;
  background: linear-gradient(90deg, rgba(250, 248, 243, 0.45) 0%, rgba(250, 248, 243, 0.15) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 220ms ease;
  will-change: transform;
}

.our-work-service.active .our-work-service__text {
  background: linear-gradient(90deg, rgba(250, 248, 243, 1) 0%, rgba(250, 248, 243, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.our-work-service__muted {
  color: rgba(250, 248, 243, 0.25);
  font-weight: 600;
  transition: color 220ms ease;
}

.our-work-service.active .our-work-service__muted {
  color: rgba(250, 248, 243, 0.7);
}

/* Hover States (Inactive Items) */
@media (hover: hover) and (pointer: fine) {
  .our-work-service:hover:not(.active) .our-work-service__text {
    background: linear-gradient(90deg, rgba(250, 248, 243, 0.8) 0%, rgba(250, 248, 243, 0.35) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateX(4px);
  }

  .our-work-service:hover:not(.active) .our-work-service__muted {
    color: rgba(250, 248, 243, 0.5);
  }
}

.our-work-feature {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.our-work-feature__visual {
  height: 280px;
  width: 100%;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(117, 94, 52, 0.95) 0%, rgba(46, 65, 46, 0.95) 100%);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.4s ease;
}

.our-work-feature:hover .our-work-feature__visual {
  transform: scale(1.015);
  filter: brightness(1.05);
}

.our-work-feature__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.our-work-feature__bg.active {
  opacity: 1;
}

.our-work-feature__bg--1 {
  background-image: url("../../images/custom website.png");
}

.our-work-feature__bg--2 {
  background-image: url("../../images/cinematic-experiences.gif");
}

.our-work-feature__bg--3 {
  background-image: url("../../images/online store convert.webp");
}

.our-work-feature__bg--4 {
  background-image: url("../../images/visual identity.webp");
}

.our-work-feature__flash {
  position: absolute;
  inset: 0;
  background-color: #ffffff;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.our-work-feature__flash.play-flash {
  animation: flash-transition 0.5s ease-out;
}

@keyframes flash-transition {
  0% {
    opacity: 0;
  }

  15% {
    opacity: 0.85;
  }

  100% {
    opacity: 0;
  }
}

.our-work-feature__descriptions {
  position: relative;
  width: 100%;
}

.our-work-feature__description {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(217, 217, 217, 0.8);
  margin: 0;
  max-width: 100%;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.our-work-feature__description.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

/* Responsive Rules */
@media (max-width: 1100px) {
  .our-work-shell {
    padding-block: 48px;
    margin-inline: 20px;
  }

  .our-work-shell__content {
    padding-inline: 24px;
  }

  .our-work-section__header {
    margin-bottom: 40px;
  }

  .our-work-section__body {
    grid-template-columns: 1fr;
    row-gap: 28px;
    /* Connected feel between service list and image card */
    max-width: 760px;
    margin-inline: auto;
    width: 100%;
  }

  .our-work-services {
    max-width: 100%;
    width: 100%;
    margin-inline: auto;
  }

  .our-work-service {
    padding-block: 20px;
  }

  .our-work-service__text {
    font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  }

  .our-work-service__arrow::after {
    content: '↓';
  }

  .our-work-feature {
    max-width: 640px;
    /* Constrained image/card width */
    margin-inline: auto;
    width: 100%;
  }

  .our-work-feature__visual {
    height: 260px;
  }

  .our-work-feature__description {
    text-align: center;
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .our-work-shell {
    padding-block: 40px;
    margin-inline: 12px;
  }

  .our-work-shell__content {
    padding-inline: 16px;
  }

  .our-work-section__eyebrow {
    font-size: 10px;
  }

  .our-work-section__title {
    font-size: 1.75rem;
  }

  .our-work-section__description {
    font-size: var(--text-sm);
  }

  .our-work-section__body {
    max-width: 100%;
    row-gap: 32px;
  }

  .our-work-services {
    max-width: 100%;
  }

  .our-work-service {
    padding-block: 16px;
  }

  .our-work-service__text {
    font-size: clamp(1.1rem, 5vw, 1.35rem);
  }

  .our-work-feature {
    max-width: 100%;
  }

  .our-work-feature__visual {
    height: 200px;
  }

  .our-work-feature__description {
    text-align: left;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .our-work-shell {
    padding-block: 32px;
    margin-inline: 8px;
  }

  .our-work-shell__content {
    padding-inline: 12px;
  }

  .our-work-section__header {
    margin-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .our-work-service,
  .our-work-service__text,
  .our-work-service__arrow,
  .our-work-feature__visual {
    transition: none !important;
    transform: none !important;
    filter: none !important;
  }
}