/* ==========================================================================
   FlexUp HR case study  (/flexuphr/)
   Shares the case-study section system with /dippi/ (dp-* classes)
   ========================================================================== */
.page-flexup { background: #fff; color: #000; }
.page-flexup main { position: relative; }

/* --------------------------------------------------------------------------
   Hero (blue, tilted product screens)
   -------------------------------------------------------------------------- */
.fx-hero { position: relative; height: 530px; background: #0b3f79; color: #fff; overflow: hidden; }
.fx-hero-stage { position: relative; height: 100%; max-width: 1440px; margin: 0 auto; }
.fx-hero-copy { position: absolute; left: 124px; top: 80px; width: 475px; z-index: 2; }
.fx-hero-copy h1 { font-size: 32px; line-height: 1.2; font-weight: 700; white-space: nowrap; }
.fx-tags { display: flex; gap: 16px; margin-top: 16px; font-size: 20px; line-height: 24px; font-weight: 700; text-transform: uppercase; }
.fx-intro { margin-top: 16px; font-size: 16px; line-height: 1.2; }
.fx-meta { margin-top: 32px; font-size: 14px; line-height: 1.2; }
.fx-meta .k { color: rgba(255,255,255,.6); font-weight: 500; }

/* art box = the right 800x560 of the 1440 desktop frame; children positioned in % */
.fx-art { position: absolute; right: 0; top: 0; width: min(800px, calc(100% - 640px)); aspect-ratio: 800 / 560; }
.fx-art > * { position: absolute; }
.art-logo { left: 4.25%; top: 7.679%; width: 16.5%; }
.fx-logo { width: 100%; height: auto; }
.art-shot { height: auto; border-radius: 16px; object-fit: cover; box-shadow: 0 10px 40px rgba(0, 20, 60, .25); }
.art-profile { left: 13.44%; top: 33.57%; width: 73%; transform: rotate(15deg); }
.art-profile.is-in { transform: rotate(15deg); }
.art-dash { left: 35.75%; top: 57.32%; width: 63.5%; transform: rotate(-15deg); object-position: left top; }
.art-dash.is-in { transform: rotate(-15deg); }
.art-card { height: auto; }
.art-recruit { left: 31.375%; top: 5.357%; width: 42.125%; }
.art-employees { left: 70.25%; top: 31.786%; width: 29.75%; }
.art-card, .art-logo { transition: opacity 1s var(--ease-out), transform 1.4s var(--ease-spring), translate .4s var(--ease-out); }
.fx-art:hover .art-recruit { }
.fx-art:hover .art-employees { }

/* --------------------------------------------------------------------------
   Facts card overlapping hero
   -------------------------------------------------------------------------- */
.dp-facts {
  position: relative; z-index: 3;
  display: flex; justify-content: center; gap: 70px;
  width: min(858px, calc(100% - 40px)); margin: -124px auto 0; padding: 23px 58px;
  background: #fff; border-radius: 8px; box-shadow: 0 0 20px rgba(0,0,0,.07);
}
.fact {
  flex: 1 1 200px; max-width: 200px; height: 115px; padding-top: 24px;
  display: flex; flex-direction: column; align-items: center;
  border: 1px solid #e5e5e5; border-radius: 8px; background: #fff;
  font-size: 14px; line-height: 1.2; font-weight: 500; text-align: center;
  transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s;
}
.fact:hover { border-color: #d4d0f2; box-shadow: 0 8px 20px rgba(108, 94, 207, .12); }
.fact img { width: 24px; height: 25px; }
.fact .k { color: rgba(0,0,0,.6); }
.fact .v { margin-top: 8px; color: #000; }

/* --------------------------------------------------------------------------
   Generic sections
   -------------------------------------------------------------------------- */
.dp-section { padding: 70px 0; margin-top: 24px; }
.dp-title {
  font-size: 24px; line-height: 36px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase;
  text-align: center; color: #000;
}

/* Tech stack */
.dp-stack .tools { max-width: 1200px; gap: 24px 10px; margin-top: 56px; padding: 0 20px; }
.page-dippi .tool { padding: 12px 24px; border-radius: 12px; border-color: #e5e5e5; }
.page-dippi .tool img { width: 50px; height: 50px; border-radius: 12px; }
.page-dippi .tool img.round { border-radius: 36px; object-fit: cover; }
.page-dippi .tool img.sq { border-radius: 0; object-fit: cover; }
.page-dippi .tool h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 28px; color: #171717; }
.page-dippi .tool p { color: #525252; }

/* Challenge */
.dp-challenge { margin-top: 0; }
.dp-prose { max-width: 1140px; margin: 16px auto 0; padding: 0 20px; font-size: 16px; line-height: 1.2; }
.dp-prose p + p { margin-top: 19.2px; }

/* --------------------------------------------------------------------------
   Solution flow
   -------------------------------------------------------------------------- */
.dp-flow { padding-top: 56px; }
.flow-grid {
  position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 584px));
  justify-content: center; gap: 100px; margin: 56px auto 0; padding: 0 20px; max-width: 1308px;
}
.flow-grid::before { /* vertical divider */
  content: ""; position: absolute; left: 50%; top: -17px; bottom: -85px; width: 1px; background: #e5e5e5;
}
.flow-grid::after { /* horizontal divider */
  content: ""; position: absolute; left: 4px; right: 4px; top: calc(50% - 9px); height: 1px; background: #e5e5e5;
}
.flow-item { position: relative; z-index: 1; }
.flow-media {
  margin: 0; padding: 20px; height: 370px; border-radius: 12px; background: #fff;
  box-shadow: 0 0 20px rgba(0,0,0,.07); overflow: hidden;
}
.flow-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; transition: transform .6s var(--ease-out); }
.flow-item:hover .flow-media img { }
.flow-item h3 { margin-top: 23px; font-size: 24px; line-height: 1.2; font-weight: 700; color: #1c1b1f; }
.flow-item h3 .sp { display: inline-block; width: .3em; }
.flow-rows { margin: 12px 0 0; }
.flow-rows > div { display: flex; align-items: center; min-height: 100px; padding: 15px 0; }
.flow-rows dt { flex: none; width: 105px; padding-left: 16px; font-weight: 700; font-size: 16px; line-height: 1.2; }
.flow-rows dd {
  margin: 0; flex: 1; min-height: 70px; display: flex; align-items: center;
  padding: 0 13px 0 26px; border-left: 1px solid #e5e5e5; font-size: 16px; line-height: 1.2;
}

/* --------------------------------------------------------------------------
   Final products
   -------------------------------------------------------------------------- */
.products {
  display: grid; grid-template-columns: repeat(3, minmax(0, 329px)); justify-content: center; column-gap: 116px;
  margin: 32px auto 0; padding: 0 20px;
}
.product { position: relative; padding: 26px 0; }
.product + .product::before {
  content: ""; position: absolute; left: -58px; top: 0; bottom: 0; width: 1px; background: #e5e5e5;
}
.product-media {
  margin: 0; height: 262px; padding: 12px 16px; border-radius: 8px; background: #fff;
  box-shadow: 0 0 11.25px rgba(0,0,0,.07);
}
.product-media > img { width: 100%; height: 100%; border-radius: 6px; object-fit: fill; transition: transform .5s var(--ease-out); }
.product:hover .product-media > img { }
.product-qr { padding-top: 23px; }
.qr-card {
  position: relative; height: 100%; border-radius: 6px; box-shadow: 0 0 20px rgba(0,0,0,.07); overflow: hidden;
}
.qr-card img { width: 100%; height: 100%; object-fit: fill; }
.qr-card span {
  position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 20px; line-height: 24px; font-weight: 500; color: #000;
}
.qr-top { top: 16px; }
.qr-bottom { top: 198px; }
.product-tag {
  display: flex; align-items: center; justify-content: center; height: 44px; margin-top: 16px;
  background: #fff; border-radius: 8px; box-shadow: 0 0 20px rgba(0,0,0,.07);
  font-size: 16px; font-weight: 700;
}
.product h3 { margin-top: 16px; font-size: 20px; line-height: 24px; font-weight: 700; color: #1c1b1f; }
.product-desc { margin-top: 8px; font-size: 14px; line-height: 1.2; }
.product-link { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 14px; line-height: 1.2; }
.product-link a { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; transition: color .2s; }
.product-link a img { width: 20px; height: 20px; transition: transform .25s var(--ease-out); }
.product-link a:hover { color: #6c5ecf; }
.product-link a:hover img { }
.product-note { margin-top: 8px; font-size: 12px; line-height: 1.2; color: #a3a3a3; }

/* --------------------------------------------------------------------------
   Branding + design system
   -------------------------------------------------------------------------- */
.brand-board {
  position: relative; width: min(1062px, calc(100% - 40px)); aspect-ratio: 1062 / 588; margin: 56px auto 0;
  background: #e9e9e9; overflow: hidden;
}
.brand-board img { position: absolute; object-fit: contain; object-position: top left; }

.ds { max-width: 1240px; margin: 56px auto 0; padding: 0 20px; color: rgba(0,0,0,.85); }
.ds-h { display: flex; align-items: center; gap: 10px; font-size: 24px; line-height: 36px; font-weight: 700; }
.ds-h span { font-family: "Inter", var(--font-sans); font-weight: 400; color: #6c5ecf; }
.ds-p { margin-top: 8px; font-size: 14px; line-height: 28px; }
.ds-sub { margin-top: 24px; font-size: 18px; line-height: 36px; font-weight: 500; }
.ds-note { padding-left: 28px; max-width: 1138px; font-size: 14px; line-height: 22px; }
.ds-p-tight { margin-top: 24px; line-height: 22px; }
.ds-hr { margin: 56px 0; border: 0; border-top: 1px solid #e5e5e5; }


/* --------------------------------------------------------------------------
   Figma sneak peak board
   -------------------------------------------------------------------------- */
.dp-peek { padding-bottom: 0; }
.peek-board { margin-top: 56px; background: #e9e9e9; }
.peek-stage { position: relative; max-width: 1442px; margin: 0 auto; aspect-ratio: 1442 / 3048; }
.peek-stage img { position: absolute; height: auto; }


/* ---- FlexUp-specific overrides ---- */
.page-flexup .dp-facts { margin-top: -86px; }
.page-flexup .dp-facts::after, .page-flexup .product-media::after { content: none; }
.page-flexup .dp-facts { border: 1px solid #e5e5e5; }
.page-flexup .dp-stack { margin-top: 45px; }
.page-flexup .dp-stack .tools { max-width: 1070px; }
.page-flexup .tool img.wide { width: 165px; height: 52px; border-radius: 35px; object-fit: cover; }
.page-flexup .tool img.cov { object-fit: cover; }
.page-flexup .tool h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 28px; color: #171717; }
.page-flexup .tool p { color: #525252; }
.page-flexup .tool { padding: 12px 24px; border-radius: 12px; border-color: #e5e5e5; }
.page-flexup .tool img { width: 50px; height: 50px; border-radius: 12px; }
.page-flexup .tool img.round { border-radius: 36px; object-fit: cover; }
.page-flexup .tool img.sq { border-radius: 0; object-fit: cover; }

.page-flexup .flow-media { border: 1px solid #e5e5e5; padding: 19px; }
.page-flexup .flow-media img { object-position: left top; }
.flow-item h3 .n { display: inline-block; min-width: 34px; }
.page-flexup .products { grid-template-columns: repeat(2, minmax(0, 329px)); min-height: 500px; align-items: center; }
.page-flexup .product { padding: 0; }
.page-flexup .product + .product::before { top: -40px; bottom: -40px; }
.page-flexup .product-media { border: 1px solid #e5e5e5; }
.page-flexup .product-media > img { object-fit: cover; object-position: left top; border: 1px solid #e5e5e5; }
.page-flexup .product-tag { border: 1px solid #e5e5e5; }

.page-flexup .ds-h span { color: #0b3f79; }
.ds-board { display: block; width: 100%; height: auto; margin-top: 8px; }
.page-flexup .ds-hr:last-child { margin-bottom: 0; }

.page-flexup .peek-stage { aspect-ratio: 1442 / 2605; }
.peek-stage img.rounded { border-radius: 70px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .fx-hero { height: auto; }
  .fx-hero-stage { padding: 100px 40px 110px; }
  .fx-hero-copy { position: relative; left: auto; top: auto; width: 100%; max-width: 600px; }
  .fx-art { position: relative; right: auto; width: 100%; max-width: 800px; margin: 24px 0 0 auto; }

  .flow-grid { column-gap: 48px; }
  .flow-grid::before { top: -17px; bottom: -40px; }
  .flow-media { height: auto; aspect-ratio: 584 / 370; }
  .page-flexup .products { column-gap: 48px; }
  .product + .product::before { left: -24px; }
}

@media (max-width: 809px) {
  .fx-hero-stage { padding: 76px 20px 100px; }
  .fx-hero-copy h1 { font-size: clamp(24px, 7vw, 32px); white-space: normal; }
  .fx-tags { font-size: 18px; }
  .fx-art { margin-top: 12px; width: 112%; margin-left: -4%; max-width: none; }
  .art-shot { border-radius: 10px; }

  .page-flexup .dp-facts { gap: 8px; padding: 12px; margin-top: -70px; }
  .fact { flex: 1 1 0; min-width: 0; max-width: none; height: auto; padding: 16px 6px 14px; font-size: 13px; }

  .dp-section { padding: 48px 0; margin-top: 8px; }
  .page-flexup .dp-stack { margin-top: 16px; }
  .dp-title { font-size: 20px; line-height: 30px; letter-spacing: 3px; padding: 0 20px; }
  .dp-stack .tools { margin-top: 32px; gap: 10px; }
  .page-flexup .tool { padding: 8px 14px 8px 10px; }
  .page-flexup .tool img { width: 38px; height: 38px; border-radius: 9px; }
  .page-flexup .tool img.wide { width: 110px; height: 38px; }
  .page-flexup .tool h3 { font-size: 16px; line-height: 22px; }

  .flow-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; margin-top: 32px; }
  .flow-grid::before, .flow-grid::after { display: none; }
  .flow-item + .flow-item { padding-top: 48px; border-top: 1px solid #e5e5e5; }
  .flow-media, .page-flexup .flow-media { padding: 12px; }
  .flow-item h3 { font-size: 20px; }
  .flow-item h3 .n { min-width: 26px; }
  .flow-rows > div { min-height: 0; padding: 10px 0; }
  .flow-rows dt { width: 84px; padding-left: 4px; font-size: 15px; }
  .flow-rows dd { min-height: 0; padding: 8px 0 8px 16px; font-size: 15px; }

  .page-flexup .products { grid-template-columns: minmax(0, 360px); row-gap: 48px; min-height: 0; }
  .page-flexup .product + .product::before { left: 0; right: 0; top: -24px; bottom: auto; width: auto; height: 1px; }
  .product-media { height: auto; aspect-ratio: 329 / 262; }

  .brand-board { margin-top: 32px; }
  .ds { margin-top: 40px; }
  .ds-h { font-size: 22px; }
  .ds-hr { margin: 40px 0; }

  .peek-board { margin-top: 32px; padding: 20px 16px; }
  .page-flexup .peek-stage { aspect-ratio: auto; display: flex; flex-direction: column; gap: 20px; }
  .peek-stage img { position: static; width: 100% !important; }
  .peek-stage img.rounded { border-radius: 24px; }
}
