/* OurProcesses/02-briefing-process/style.css - Section-specific styles */

/* one process section: photo on the left, heading + intro + numbered steps alongside */
.opx {
  padding-block: clamp(56px, 6.4cqi, 96px);
}

.opx-in {
  display: grid;
  grid-template-columns: minmax(0, 3.1fr) minmax(0, 8.9fr);
  grid-template-areas: "art head" "art steps";
  column-gap: clamp(32px, 3.6cqi, 52px);
  align-items: start;
}

.opx-hr {
  border: 0;
  height: 1px;
  margin: 0;
  background: var(--line);
}

/* photo with the amber block behind its top-left corner and two squares at the bottom-left */
.opx-art {
  grid-area: art;
  position: sticky;
  top: 112px;
  padding: clamp(18px, 1.8cqi, 26px) 0 0 clamp(16px, 1.6cqi, 22px);
}

.opx-blk {
  position: absolute;
  left: 0;
  top: 0;
  width: 58%;
  height: 44%;
  border-radius: clamp(18px, 1.9cqi, 28px);
  background: var(--amber);
}

.opx-ph {
  position: relative;
  z-index: 1;
  aspect-ratio: .7;
  border-radius: clamp(18px, 1.9cqi, 28px);
  overflow: hidden;
  background: #D9C3A3;
  box-shadow: 0 30px 50px -36px rgba(40, 30, 20, .5);
}

.opx-ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 1.2s var(--ease);
}

.opx-art:hover .opx-ph img {
  scale: 1.03;
}

.opx-q {
  position: absolute;
  z-index: 2;
  display: block;
  aspect-ratio: 1;
  border-radius: clamp(5px, .6cqi, 9px);
  transition: transform .6s var(--ease);
}

.opx-q.a {
  left: 0;
  bottom: clamp(22px, 2.2cqi, 32px);
  width: 17%;
  background: #FBE6C3;
}

.opx-q.b {
  left: 17%;
  bottom: 0;
  width: 9%;
  background: #D9CDF2;
}

.opx-art:hover .opx-q.a {
  transform: translate(-3px, 3px);
}

.opx-art:hover .opx-q.b {
  transform: translate(3px, 4px);
}

/* heading block */
.opx-head {
  grid-area: head;
  padding-top: clamp(6px, .8cqi, 12px);
}

.opx-h {
  font-family: var(--fd);
  font-weight: 700;
  font-size: clamp(34px, 3.9cqi, 56px);
  line-height: 1.04;
  letter-spacing: -.034em;
  margin-top: clamp(16px, 1.6cqi, 22px);
  text-wrap: balance;
}

.opx-h .p {
  color: var(--purple);
}

.opx-intro {
  margin-top: clamp(16px, 1.6cqi, 22px);
  padding-left: clamp(18px, 1.7cqi, 24px);
  border-left: 1.5px solid rgba(0, 0, 0, .22);
  font-size: clamp(17px, 1.4cqi, 20px);
  line-height: 1.5;
  color: rgba(0, 0, 0, .8);
  max-width: 36em;
  text-wrap: pretty;
}

/* numbered steps with arrows between them */
.opx-steps {
  --g: clamp(20px, 1.9cqi, 28px);
  grid-area: steps;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: var(--g);
  margin-top: clamp(34px, 3.4cqi, 48px);
  padding-top: 12px;
  counter-reset: none;
}

.opx-s {
  --c: var(--purple);
  --t1: #E9E4F5;
  --t2: #D9D0EF;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 1.4cqi, 20px) clamp(16px, 1.35cqi, 20px) clamp(62px, 5.4cqi, 76px);
  border-radius: clamp(14px, 1.3cqi, 18px);
  background: #FFFEF9;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .085);
  transition: box-shadow .35s, transform .45s var(--ease);
}

.opx-s.am {
  --c: var(--amber);
  --t1: #FDEFD8;
  --t2: #FBE0B8;
}

.opx-s.ol {
  --c: var(--olive);
  --t1: #EFEDDC;
  --t2: #DEDBB8;
}

.opx-s:hover {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent), 0 24px 40px -32px rgba(40, 30, 20, .45);
  transform: translateY(-3px);
}

.opx-n {
  position: absolute;
  left: clamp(16px, 1.5cqi, 22px);
  top: -12px;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--c);
  color: #FFFFFF;
  font-family: var(--fd);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

.opx-s.am .opx-n {
  color: #000;
}

.opx-ic {
  display: block;
  width: clamp(34px, 2.9cqi, 42px);
  margin-left: clamp(40px, 3.4cqi, 48px);
  color: var(--c);
}

.opx-ic .ic {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  stroke-width: 1.6;
}

.opx-t {
  margin-top: clamp(12px, 1.2cqi, 16px);
  font-family: var(--fd);
  font-weight: 700;
  font-size: clamp(18px, 1.5cqi, 21px);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.opx-d {
  margin-top: clamp(8px, .9cqi, 12px);
  font-size: clamp(14.5px, 1.08cqi, 15.5px);
  line-height: 1.55;
  color: rgba(0, 0, 0, .76);
  text-wrap: pretty;
}

.opx-sq {
  position: absolute;
  right: clamp(12px, 1.2cqi, 16px);
  bottom: clamp(12px, 1.2cqi, 16px);
  width: clamp(36px, 3.2cqi, 46px);
  aspect-ratio: 1;
  pointer-events: none;
}

.opx-sq i {
  position: absolute;
  width: 50%;
  aspect-ratio: 1;
  border-radius: 4px;
  transition: transform .5s var(--ease);
}

.opx-sq i:first-child {
  right: 0;
  top: 0;
  background: var(--t1);
}

.opx-sq i:last-child {
  left: 0;
  bottom: 0;
  background: var(--t2);
}

.opx-s:hover .opx-sq i:first-child {
  transform: translate(2px, -2px);
}

.opx-s:hover .opx-sq i:last-child {
  transform: translate(-2px, 2px);
}

.opx-ar {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: calc(var(--g) / -2);
  width: 32px;
  height: 32px;
  margin: -16px -16px 0 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #E9E4F5;
  color: var(--purple);
  box-shadow: 0 0 0 4px var(--paper);
}

.opx-ar .ic {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

/* aligned card rows: titles share a baseline, descriptions start on one line */
@container page (min-width: 761px) {
  .opx-steps {
    grid-template-rows: auto;
    row-gap: 0;
  }
  .opx-s {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
    align-content: start;
  }
  .opx-t {
    align-self: end;
  }
}
@media (min-width: 761px) {
  .opx-steps {
    grid-template-rows: auto;
    row-gap: 0;
  }
  .opx-s {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
    align-content: start;
  }
  .opx-t {
    align-self: end;
  }
}

@container page (max-width: 1100px) {
  .opx-in {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr);
    grid-template-areas: "art head" "steps steps";
    row-gap: 0;
    align-items: center;
  }
  .opx-art {
    position: relative;
    top: auto;
    max-width: 300px;
  }
  .opx-steps {
    margin-top: clamp(40px, 4.6cqi, 52px);
  }
}
@media (max-width: 1100px) {
  .opx-in {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr);
    grid-template-areas: "art head" "steps steps";
    row-gap: 0;
    align-items: center;
  }
  .opx-art {
    position: relative;
    top: auto;
    max-width: 300px;
  }
  .opx-steps {
    margin-top: clamp(40px, 4.6vw, 52px);
  }
}

@container page (max-width: 760px) {
  .opx-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .opx-s {
    padding-bottom: 64px;
  }
  .opx-ar {
    top: auto;
    bottom: -30px;
    right: 50%;
    margin: 0 -16px 0 0;
    transform: rotate(90deg);
  }
}
@media (max-width: 760px) {
  .opx-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .opx-s {
    padding-bottom: 64px;
  }
  .opx-ar {
    top: auto;
    bottom: -30px;
    right: 50%;
    margin: 0 -16px 0 0;
    transform: rotate(90deg);
  }
}

@container page (max-width: 640px) {
  .opx {
    padding-block: 52px;
  }
  .opx-in {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "art" "head" "steps";
  }
  .opx-art {
    max-width: 250px;
    margin-bottom: 30px;
  }
  .opx-h {
    font-size: clamp(30px, 8.6cqi, 36px);
  }
  .opx-intro {
    font-size: 17px;
  }
}
@media (max-width: 640px) {
  .opx {
    padding-block: 52px;
  }
  .opx-in {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "art" "head" "steps";
  }
  .opx-art {
    max-width: 250px;
    margin-bottom: 30px;
  }
  .opx-h {
    font-size: clamp(30px, 8.6vw, 36px);
  }
  .opx-intro {
    font-size: 17px;
  }
}
