/* assets/css/pages/about/philosophy.css */

.kiwi-aboutPh{
  padding: 56px 0;
}

.kiwi-aboutPh__inner{
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  grid-template-areas: "content media";
  align-items: center;
  gap: 28px;
}

.kiwi-aboutPh__content{
  grid-area: content;
  text-align: start;
}

.kiwi-aboutPh__title{
  margin: 0 0 12px;
  font-weight: 900;
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1.2;
  color: var(--kiwi-ink);
}

.kiwi-aboutPh__sep{
  font-weight: 900;
  color: rgba(58,35,23,.55);
  margin: 0 6px;
}

.kiwi-aboutPh__hl{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 8px 14px;
  font-weight: 900;
  line-height: 1;
  color: var(--kiwi-background);

  isolation: isolate;
  z-index: 0;

  --stroke-top: -0em;
  --stroke-bottom: -0.35em;
  --stroke-inline: -0.10em;
}

.kiwi-aboutPh__hl::before{
  content: "";
  position: absolute;
  inset: var(--stroke-top) var(--stroke-inline) var(--stroke-bottom) var(--stroke-inline);
  background: url("/assets/images/pattern/Paint%20stroke%20underline2.svg") center/100% 100% no-repeat;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

.kiwi-aboutPh__text{
  margin: 0;
  font-weight: 600;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.95;
  color: var(--kiwi-text-strong);
  max-width: 62ch;
}

.kiwi-aboutPh__media{
  grid-area: media;
  display: flex;
  justify-content: flex-end;
}

/* =========================================================
   Image Card
   Fix: Move fill/stroke layers to the wrapper (overflow: visible)
   so the stroke and rounded corners are not clipped.
   ========================================================= */

.kiwi-aboutPh__cardWrap{
  --img-w: clamp(280px, 32vw, 460px);
  --img-h: clamp(230px, 28vw, 360px);

  /* Fill offset (top layer) */
  --fill-x: 10px;
  --fill-y: 0px;

  /* Stroke offset (UP) */
  --stk-x: 0px;
  --stk-y: -10px;

  position: relative;
  width: var(--img-w);
  height: var(--img-h);
  overflow: visible;
  isolation: isolate;
}

/* Fill layer (above stroke) */
.kiwi-aboutPh__cardWrap::after{
  content: "";
  position: absolute;
  inset: 0;

  border-radius: 26px 0 26px 26px;

  background: var(--kiwi-gold);
  transform: translate3d(var(--fill-x), var(--fill-y), 0);

  z-index: 0;
  pointer-events: none;
}

/* Stroke layer (behind, shifted UP) */
.kiwi-aboutPh__cardWrap::before{
  content: "";
  position: absolute;
  inset: 0;

  border-radius: 26px 0 26px 26px;

  border: 1px solid var(--kiwi-gold);
  transform: translate3d(var(--stk-x), var(--stk-y), 0);

  z-index: -1;
  pointer-events: none;
}

/* The visible image card (clips only the image) */
.kiwi-aboutPh__card{
  position: relative;
  width: 100%;
  height: 100%;

  border-radius: 26px 0 26px 26px;
  overflow: hidden;

  transform: translate3d(var(--fill-x), var(--fill-y), 0);

  z-index: 1;
}

/* Image must NOT be transformed (avoids extra clipping) */
.kiwi-aboutPh__card img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: none;
}

/* Pattern like hero: absolute, above everything */
.kiwi-aboutPh__cardWrap--pattern{
  --pattern-top: -40px;
  --pattern-left: -30px;
  --pattern-right: auto;
  --pattern-size: 42px;
}

.kiwi-aboutPh__pattern{
  position: absolute;
  top: var(--pattern-top);
  left: var(--pattern-left);
  right: var(--pattern-right);

  width: var(--pattern-size);
  height: auto;

  z-index: 3;
  pointer-events: none;
  user-select: none;
  display: block;
}

/* ===== LTR Fixes (English) ===== */
html[dir="ltr"] .kiwi-aboutPh__hl::before{
  transform: scaleX(-1);
  transform-origin: center;
}

html[dir="ltr"] .kiwi-aboutPh__cardWrap{
  --fill-x: -10px;
}

html[dir="ltr"] .kiwi-aboutPh__cardWrap::after,
html[dir="ltr"] .kiwi-aboutPh__cardWrap::before,
html[dir="ltr"] .kiwi-aboutPh__card{
  border-radius: 0 26px 26px 26px;
}

html[dir="ltr"] .kiwi-aboutPh__cardWrap--pattern{
  --pattern-left: auto;
  --pattern-right: -30px;
}

html[dir="ltr"] .kiwi-aboutPh__pattern{
  transform: scaleX(-1);
  transform-origin: center;
}

/* Responsive */
@media (max-width: 980px){
  .kiwi-aboutPh{
    padding: 46px 0;
  }

  .kiwi-aboutPh__inner{
    grid-template-columns: 1fr;
    grid-template-areas: "content" "media";
    gap: 18px;
  }

  .kiwi-aboutPh__media{
    justify-content: flex-start;
  }

  .kiwi-aboutPh__cardWrap{
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .kiwi-aboutPh__pattern{
    display: none;
  }
}
