/* Featured Work: the original colorful cards, made consistent.
   Each card keeps its own gradient and title color; every card shares the
   same structure: label and title at the top, a white rounded text box
   below, links on their own row, and a height that fits the content. */

.work-section .div-block-20.project-card {
  --card-bg: linear-gradient(45deg, #c5c3af, #969f97);
  --card-title: #fff;
  position: absolute;
  inset: 0 auto auto 0;
  width: 400px;
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0 10px 10px;
  text-align: center;
  background: var(--card-bg);
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 20px;
  box-shadow: 0 2px 5px 4px rgba(0, 0, 0, .2);
}

.work-section .project-card .card-head {
  padding: 16px 12px 12px;
  color: var(--card-title);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

.work-section .project-card .card-eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: inherit;
  opacity: .9;
}

.work-section .project-card .card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  font-family: inherit;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  color: inherit;
}

.work-section .div-block-20.project-card .text-block-13 {
  position: static;
  inset: auto;
  display: block;
  margin: 0;
  padding: 14px 18px 16px;
  background: #fff;
  border-radius: 14px;
  opacity: 1;
  font-size: 16px;
  line-height: 26px;
  color: #333;
  text-align: left !important;
}

.work-section .project-card .card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 10px;
}

/* Each project's own colors, as in the original cards */
.work-section .project-card.card-alphanation { --card-bg: linear-gradient(45deg, #e0a65c, #127991); --card-title: #fff; }
.work-section .project-card.card-mission { --card-bg: linear-gradient(45deg, #98c48e, #4479a4); --card-title: #b3f8e6; }
.work-section .project-card.card-bewts { --card-bg: linear-gradient(45deg, #8a9a7b, #c8c3a0); --card-title: #fffbe6; }
.work-section .project-card.card-tiki { --card-bg: linear-gradient(45deg, #50f9ff, #ff6b50); --card-title: #fff; }
.work-section .project-card.card-store { --card-bg: linear-gradient(225deg, #3d9eff, #faefb1); --card-title: #141c5a; }
.work-section .project-card.card-store .card-head { text-shadow: 0 1px 1px rgba(255, 255, 255, .5); }

/* Alphanation keeps its emblem and Cooper wordmark */
.work-section .project-card .an-emblem {
  display: inline-block;
  flex: none;
  width: 46px;
  aspect-ratio: 674 / 348;
  background: #fff;
  -webkit-mask: url("../images/alphanation-emblem.png") center / contain no-repeat;
  mask: url("../images/alphanation-emblem.png") center / contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3));
}
.work-section .project-card .an-wordmark {
  font-family: "Cooper Black Wordmark", "Cooper Black", Georgia, serif;
  font-weight: 400;
}

@media screen and (max-width: 767px) {
  .work-section .div-block-20.project-card {
    position: relative;
    inset: auto;
    width: auto;
    max-width: 400px;
    height: auto;
    margin: 16px auto 0;
    border-radius: 20px;
  }
  .work-section .project-card .card-title { font-size: 22px; }
  .work-section .div-block-20.project-card .text-block-13 { font-size: 15px; line-height: 24px; }
}

@media screen and (max-width: 479px) {
  .work-section .div-block-20.project-card { margin: 12px 12px 0; padding: 0 8px 8px; }
  .work-section .div-block-20.project-card .text-block-13 { padding: 12px 14px 14px; }
}

/* Fine Art row: same layout as the case-study rows. A brushwork panel in
   the flamenco's colours sits behind, and the framed painting stands in
   for the phone, hanging over the panel's top and bottom edges. */
.work-section .columns-2.art-row {
  position: relative;
  background-image: none;
}
.work-section .columns-2.art-row::before {
  display: block;
  content: "";
  position: absolute;
  inset: 38px 0;
  background: #2c2726 url('../images/art-row-bg.jpg?v=7') 50% 50% / cover no-repeat;
}
.work-section .columns-2.art-row > .w-col { position: relative; z-index: 1; }
.work-section .columns-2.art-row .phone { overflow: visible; min-height: 597px; align-items: center; }
.work-section .project-card.card-art { --card-bg: linear-gradient(45deg, #2a2320, #6e5536 55%, #b08a52); --card-title: #f6e6c4; }
.work-section .art-row-frame {
  display: block;
  width: min(500px, 46vw);
  box-shadow: 0 26px 46px rgba(0, 0, 0, .6), 0 4px 10px rgba(0, 0, 0, .4);
  transition: transform .3s ease;
}
.work-section .art-row-frame:hover { transform: translateY(-4px); }
.work-section .art-row-frame img { display: block; width: 100%; height: auto; }
@media screen and (max-width: 767px) {
  .work-section .columns-2.art-row::before { inset: 0; background-image: url('../images/art-row-bg-tall.jpg?v=4'); }
  .work-section .columns-2.art-row .phone { min-height: 0; }
  .work-section .columns-2.art-row { min-height: 800px; display: flex; flex-direction: column; justify-content: center; }
  .work-section .art-row-frame { width: 300px; margin: 28px auto; }
}

/* --- Row polish: every row gets the same 960x540 panel the phones overhang,
   and every card is centred vertically on that panel. --- */
@media screen and (min-width: 768px) {
  .work-section .columns-2 > .column-4 {
    top: 0;
    min-height: 597px;
    margin-top: 10px;
    justify-content: center;
  }
  .work-section .columns-2.alpha > .column-4.alpha { top: 0; }
  .work-section .columns-2 > .column-4 > .div-block-20 { position: relative; inset: auto; left: -40px; }

  /* Alphanation and BEWTS used full-height backgrounds, so their phones sat
     inside the panel instead of hanging over it. Move them to an inset panel. */
  .work-section .columns-2.alphanation-row,
  .work-section .columns-2.bewts.case {
    position: relative;
    background: none !important;
    border-radius: 0;
  }
  .work-section .columns-2.alphanation-row::before,
  .work-section .columns-2.bewts.case::before {
    content: "";
    display: block;
    position: absolute;
    inset: 38px 0;
    z-index: 0;
  }
  .work-section .columns-2.alphanation-row::before {
    background: linear-gradient(100deg, #f0d1a9, #c5cfcb 40%, #62aab9) center / cover,
                url("../images/alphanation-wave-texture.jpg") center / cover no-repeat;
    background-blend-mode: screen;
    border-radius: 28px;
  }
  .work-section .columns-2.bewts.case::before {
    background: url("../images/TROOPS-BG.jpg") 50% 50% / cover no-repeat;
  }
  .work-section .columns-2.alphanation-row > .w-col,
  .work-section .columns-2.bewts.case > .w-col { position: relative; z-index: 1; }

  /* Fine Art: a little larger, hanging further off the left edge */
  .work-section .art-row-frame { width: min(560px, 50vw); margin-left: -70px; }
}

/* Glare sweeping across the painting, driven by the same mouse-move interaction */
.work-section .art-row-frame { position: relative; overflow: hidden; }
.work-section .art-row-frame .art-glare { width: 600px; height: 600px; opacity: .16; filter: blur(80px); pointer-events: none; }

/* Animation & VFX showreel row: same layout as the other rows, with the
   original Instant Karma phone mockup; tapping it opens the full reel with sound. */
.work-section .columns-2.reel-row { position: relative; background-image: none; }
.work-section .columns-2.reel-row::before {
  content: "";
  display: block;
  position: absolute;
  inset: 38px 0;
  background: #3b3a22 url('../images/acorn-bg.jpg') 50% 50% / cover no-repeat;
}
.work-section .columns-2.reel-row > .w-col { position: relative; z-index: 1; }
.work-section .reel-row .image-tiki.karma { background-image: url('../images/karma-phone.png'); }
/* Keep the moving glare inside the phone's outline instead of a rectangle */
.work-section .reel-row .phone { -webkit-mask: url('../images/karma-phone.png') 50% 0 / auto 100% no-repeat; mask: url('../images/karma-phone.png') 50% 0 / auto 100% no-repeat; }
.work-section .reel-phone-play { padding: 0; border: 0; background-color: transparent; cursor: pointer; }
.work-section .reel-phone-play:focus-visible { outline: 3px solid #ffd166; outline-offset: -6px; }
.work-section .project-card.card-reel { --card-bg: linear-gradient(45deg, #5b3a22, #8a6a3a 45%, #7f9a45); --card-title: #fff; }
.work-section .reel-link { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }

.reel-dialog { width: min(1100px, 94vw); max-width: none; padding: 0; border: 0; border-radius: 14px; overflow: visible; background: #000; }
.reel-dialog::backdrop { background: rgba(0, 0, 0, .85); }
.reel-dialog video { display: block; width: 100%; border-radius: 14px; }
.reel-close {
  position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .15); color: #fff; font-size: 26px; line-height: 44px; cursor: pointer;
}
.reel-close:hover { background: rgba(255, 255, 255, .3); }

@media screen and (max-width: 767px) {
  .work-section .columns-2.reel-row::before { inset: 0; background-position: 64% 50%; }
  .reel-close { top: -50px; }
}
