/* ==========================================================================
   Shared case-study system for /ultahost/ and /borbalo/
   Same section system and values as /wineland/ and /dippi/ (cs-*, sf-*, fp-*,
   dz-* classes), minus hover transforms. Brand colors come from the page CSS
   (--accent, --ph-*).

   Screenshot slots: every placeholder is a <div class="ph"> marked with a
   "SLOT" comment in the HTML. To add a screenshot, replace the .ph div with
   <img class="ph-img" src="..." alt="..."> (same position, same size).
   ========================================================================== */
body.cs-page { background: #fff; color: #1c1b1f; }
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 70; padding: 10px 16px; border-radius: 8px;
  background: #111; color: #fff; font-size: 15px; font-weight: 500;
}
.skip-link:focus-visible { top: 16px; }
.cs-page main { overflow-x: clip; }

/* --- section shell ------------------------------------------------------- */
.cs-sec { padding: 70px 120px; max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.cs-title {
  font-size: 24px; font-weight: 700; letter-spacing: 4px; line-height: 1.4;
  text-transform: uppercase; text-align: center; color: #000; text-wrap: balance;
}
.cs-link-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; align-self: flex-start;
  min-width: 140px; height: 40px; padding: 0 20px; border: 1px solid #1c1b1f; border-radius: 6px;
  font-size: 16px; font-weight: 500; color: #1c1b1f; background: transparent;
  transition: background-color .2s, color .2s;
}
.cs-link-btn:hover { background: #1c1b1f; color: #fff; }
.cs-link-btn .ext { width: 20px; height: 20px; }
.cs-meta { margin: 0; display: grid; gap: 32px; font-size: 14px; line-height: 1.2; }
.cs-meta dt { font-weight: 500; }
.cs-meta dd { margin: 3px 0 0; }

/* --- facts card (Role / Type / Timeline) --------------------------------- */
.hero-card-wrap { position: relative; z-index: 2; display: flex; justify-content: center; padding: 0 20px; margin-top: -82px; }
.hero-card {
  width: 858px; max-width: 100%; padding: 24px 61px; background: #fff;
  border: 1px solid #e5e5e5; border-radius: 8px; box-shadow: 0 0 20px rgba(0,0,0,.07);
  display: flex; justify-content: center; gap: 70px;
}
.hc-item {
  width: 200px; padding: 24px 12px; border: 1px solid #e5e5e5; border-radius: 8px; background: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.hc-label { display: flex; flex-direction: column; align-items: center; line-height: 1.2; font-size: 14px; font-weight: 500; color: rgba(0,0,0,.6); }
.hc-ico {
  display: block; width: 24px; height: 25px; background: var(--accent);
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.hc-val { line-height: 1.3; font-size: 14px; font-weight: 500; color: #000; }

/* --- tech stack ---------------------------------------------------------- */
.cs-stack { margin-top: 24px; gap: 56px; padding-bottom: 90px; }
.cs-stack .tools { gap: 24px 10px; }
.cs-page .tool { border-radius: 12px; padding: 12px 24px; gap: 12px; border-color: #e5e5e5; }
.cs-page .tool img, .cs-page .tool .tool-icon { border-radius: 12px; }
.cs-page .tool img.round { border-radius: 36px; object-fit: cover; }
.cs-page .tool h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 28px; color: #171717; }
.cs-page .tool p { color: #525252; font-size: 16px; line-height: 24px; }

/* --- challenge ----------------------------------------------------------- */
.cs-challenge { padding: 70px 170px; gap: 16px; }
.cs-challenge p { max-width: 1100px; font-size: 16px; line-height: 1.2; color: #000; }
.cs-challenge p + p { margin-top: 3px; }

/* --- solution flow (2 x 2 with dividers) --------------------------------- */
.cs-flow { padding: 77px 0 56px; gap: 56px; }
.sf-grid {
  position: relative; display: grid; grid-template-columns: repeat(2, 584px); column-gap: 100px;
  align-items: start;
}
.sf-grid::before { content: ""; position: absolute; left: 50%; top: -16px; bottom: 0; width: 1px; background: #e5e5e5; }
.sf-hr { grid-column: 1 / -1; height: 1px; background: #e5e5e5; margin: 38px -16px 58px; }
.sf-item { display: flex; flex-direction: column; gap: 12px; }
.sf-media {
  position: relative; padding: 19.5px; border: 1px solid #e5e5e5; border-radius: 12px;
  background: #fff; box-shadow: 0 0 20px rgba(0,0,0,.07); margin-bottom: 11px; overflow: hidden;
}
.sf-box { position: relative; padding-bottom: 60.73%; border-radius: 8px; overflow: hidden; }  /* 545 x 331 */
.sf-h { font-size: 24px; font-weight: 700; line-height: 1.4; color: #1c1b1f; text-wrap: balance; }
.sp { color: transparent; user-select: none; }
.sf-rows { margin: 0; }
.sf-row { display: flex; align-items: center; gap: 24px; min-height: 100px; padding: 16px; }
.sf-row dt { width: 65px; flex: none; font-weight: 700; font-size: 16px; }
.sf-row dd { margin: 0; flex: 1; min-height: 70px; display: flex; align-items: center; padding-left: 24px; border-left: 1px solid #e5e5e5; font-size: 16px; line-height: 1.2; }

/* --- final products ------------------------------------------------------ */
.cs-final { padding-top: 83px; gap: 32px; }
.fp-row { display: flex; align-items: flex-start; justify-content: center; gap: 56px; width: 100%; }
.fp-sep { width: 1px; align-self: stretch; background: #e5e5e5; }
.fp-item { width: 329px; display: flex; flex-direction: column; gap: 16px; }
.fp-media {
  position: relative; padding: 12px 16px; border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden;
  box-shadow: 0 0 11.25px rgba(0,0,0,.07); background: #fff;
}
.fp-box { position: relative; padding-bottom: 80.13%; border-radius: 6px; overflow: hidden; }  /* 297 x 238 */
.fp-pill {
  height: 44px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
  border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; box-shadow: 0 0 20px rgba(0,0,0,.07);
}
.fp-item h3 { font-size: 20px; font-weight: 700; color: #1c1b1f; line-height: 1.4; margin-top: 4px; margin-bottom: -8px; }
.fp-desc { font-size: 14px; line-height: 1.2; }
.fp-link { font-size: 14px; display: flex; align-items: center; gap: 8px; margin-top: -8px; }
.fp-link a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.fp-link a:hover { text-decoration: underline; }
.fp-link .ext { width: 20px; height: 20px; }

/* --- designs gallery (Wineland "Designs") -------------------------------- */
.cs-designs { padding-top: 98px; gap: 32px; }
.dz-group { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 40px; }
.dz-group + .dz-group { margin-top: 64px; }
.dz-h { font-size: 20px; font-weight: 700; color: #1c1b1f; line-height: 1.4; }
.dz-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 20px; width: 1200px; max-width: 100%; }
.dz-card {
  width: 363px; padding: 20px; border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden;
  background: #fff; box-shadow: 0 0 11.25px rgba(0,0,0,.07);
}
.dz-grid.is-4 .dz-card { width: calc((100% - 60px) / 4); padding: 16px; }
.dz-box { position: relative; padding-bottom: 124.46%; border-radius: 4px; overflow: hidden; }  /* 323 x 402 */
.dz-box.is-post { padding-bottom: 125%; }  /* 4:5 */
.dz-grid.is-2 .dz-card { width: calc((100% - 20px) / 2); }
.dz-card.is-post { padding: 0; }
.dz-card.is-post img { display: block; width: 100%; height: auto; }
/* landscape phone screens: dark bezel drawn in CSS */
.shot-wide { overflow: hidden; background: #111; border: 8px solid #111; border-radius: 30px; }
.shot-wide img { display: block; width: 100%; height: auto; border-radius: 22px; }

/* --- Figma board --------------------------------------------------------- */
.cs-figma { padding-top: 66px; display: flex; flex-direction: column; align-items: center; gap: 56px; }
.fg-board { width: 100%; padding: 85px 20px 120px; display: flex; flex-direction: column; align-items: center; background: var(--fg-bg, #e9e9e9); }
.fg-slot { position: relative; width: 1212px; max-width: 100%; }
.fg-img { display: block; width: 100%; height: auto; border-radius: 8px; }
.fg-box { position: relative; padding-bottom: 46.53%; border-radius: 8px; overflow: hidden; }  /* 2424 x 1128 */

/* --- full-bleed tinted band (page sets --band) ---------------------------- */
.cs-page main { isolation: isolate; }
.band { position: relative; }
.band::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw;
  z-index: -1; background: var(--band, #fafafa);
}

/* --- Branding (logo, colors, typography) -------------------------------- */
.cs-brand { padding-top: 90px; gap: 0; }
.br2 { width: 1200px; max-width: 100%; display: flex; flex-direction: column; gap: 64px; margin-top: 48px; }
.br2-h { display: flex; gap: 10px; align-items: baseline; font-size: 24px; line-height: 1.4; font-weight: 700; }
.br2-h .hash { font-weight: 400; color: var(--accent); }
.br2-p { margin-top: 6px; max-width: 70ch; font-size: 15px; line-height: 1.6; color: var(--body, #4d4d4d); }
.br2-logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.br2-tile {
  height: 220px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line, #e5e5e5); border-radius: var(--radius-card, 12px);
}
.br2-colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.br2-color { margin: 0; overflow: hidden; background: #fff; border: 1px solid var(--line, #e5e5e5); border-radius: var(--radius-card, 12px); }
.br2-color .sw { display: block; height: 120px; border-bottom: 1px solid var(--line, #e5e5e5); }
.br2-color figcaption { padding: 14px 16px 16px; }
.br2-color .nm { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 700; color: var(--ink, #111); }
.br2-color .hx { font-weight: 500; color: #666; font-variant-numeric: tabular-nums; }
.br2-color .rl { display: block; margin-top: 4px; font-size: 13px; line-height: 1.4; color: #666; }
.br2-type { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; margin-top: 24px; }
.br2-card { padding: 28px; border: 1px solid var(--line, #e5e5e5); border-radius: var(--radius-card, 12px); background: #fff; }
.br2-aa { font-size: 120px; line-height: 1; font-weight: 700; color: var(--ink, #111); }
.br2-font { margin-top: 20px; font-size: 22px; font-weight: 700; color: var(--ink, #111); }
.br2-font + p { margin-top: 4px; font-size: 14px; line-height: 1.5; color: #666; }
.br2-weights li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line, #e5e5e5); }
.br2-weights li:first-child { padding-top: 0; }
.br2-weights li:last-child { border-bottom: 0; padding-bottom: 0; }
.br2-weights .smp { font-size: 30px; line-height: 1.2; color: var(--ink, #111); }
.br2-weights .wt { flex: none; font-size: 13px; color: #666; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Screenshot placeholders
   -------------------------------------------------------------------------- */
.ph, .ph-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph-img { object-fit: cover; object-position: top center; }
.ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; text-align: center; color: var(--ph-fg);
  background-color: var(--ph-bg);
  background-image: radial-gradient(circle at 1px 1px, var(--ph-dot) 1px, transparent 1.6px);
  background-size: 16px 16px;
}
.ph-id {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--ph-line); background: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--ph-strong);
}
.ph-name { font-size: 16px; line-height: 1.25; font-weight: 500; color: var(--ph-strong); }
.ph-note { font-size: 12px; line-height: 1.3; color: var(--ph-fg); }

/* phone frame (the site's iPhone PNG; the screen sits underneath it) */
.shot-phone { position: relative; flex: none; margin: 0; }
.ph-post, .dz-card, .shot-browser { margin: 0; }
.phone-in { position: relative; padding-bottom: 201.6%; }  /* 372 x 750 frame */
.phone-in > .ph, .phone-in > .ph-img { left: 5.4%; top: 1.9%; width: 89.2%; height: 96.1%; border-radius: 12% / 5.6%; overflow: hidden; }
.phone-in > .ph { padding: 18% 6px 8px; gap: 6px; background-size: 12px 12px; }
.phone-in > .ph .ph-name { font-size: 14px; }
.phone-in > .frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* phones laid out inside a media box (solution flow / final products / designs) */
.phones { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4%; background: var(--stage); }
.phones > .shot-phone { width: 27%; }
.fp-box .phones > .shot-phone { width: 36%; }
.dz-box .phones > .shot-phone { width: 56%; }
.phones.is-posts > .ph-post { position: relative; width: 42%; }
.ph-post .post-in { position: relative; padding-bottom: 125%; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.sf-box .ph-id, .fp-box .ph-id { height: 20px; padding: 0 8px; font-size: 10px; }
.sf-box .ph-name, .fp-box .ph-name, .sf-box .phone-in > .ph .ph-name, .fp-box .phone-in > .ph .ph-name { font-size: 12px; }
.sf-box .phone-in > .ph .ph-note, .fp-box .phone-in > .ph .ph-note { display: none; }

/* --------------------------------------------------------------------------
   Responsive (same breakpoints as /wineland/)
   -------------------------------------------------------------------------- */
@media (max-width: 1299px) {
  .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; width: calc(100% - 80px); }
  .sf-hr { margin-left: 0; margin-right: 0; }
  .sf-row dt { width: 70px; }
}
@media (max-width: 1199px) {
  .cs-sec { padding-left: 40px; padding-right: 40px; }
  .cs-challenge { padding-left: 40px; padding-right: 40px; }
  .hero-card-wrap { margin-top: -40px; }
  .hero-card { gap: 24px; padding: 24px; }
  .dz-grid { width: 100%; }
  .dz-card { width: calc((100% - 40px) / 3); }
  .fp-row { gap: 40px; }
}
@media (max-width: 809px) {
  .cs-sec { padding: 56px 20px; }
  .cs-challenge { padding: 56px 20px; }
  .cs-title { font-size: 20px; letter-spacing: 3px; }
  .hero-card-wrap { margin-top: -24px; }
  .hero-card { gap: 8px; padding: 10px; }
  .hc-item { flex: 1 1 0; width: auto; min-width: 0; padding: 14px 6px; gap: 6px; }
  .hc-label { font-size: 12px; }
  .hc-val { font-size: 13px; }
  .cs-stack { margin-top: 0; gap: 32px; padding-bottom: 40px; }
  .cs-page .tool { padding: 10px 14px; }
  .cs-flow { padding: 56px 0; gap: 32px; }
  .sf-grid { grid-template-columns: 1fr; width: calc(100% - 40px); row-gap: 48px; }
  .sf-grid::before, .sf-hr { display: none; }
  .sf-media { padding: 12px; margin-bottom: 4px; }
  .sf-h { font-size: 20px; }
  .sf-rows { margin-top: 2px; }
  .sf-row { flex-direction: column; align-items: flex-start; min-height: 0; padding: 12px 0; gap: 4px; }
  .sf-row + .sf-row { border-top: 1px solid #e5e5e5; }
  .sf-row dt { width: auto; font-size: 14px; }
  .sf-row dd { display: block; min-height: 0; padding: 0; border-left: 0; font-size: 15px; line-height: 1.45; }
  .cs-final { padding-top: 56px; }
  .fp-row { flex-direction: column; gap: 40px; min-height: 0; }
  .fp-sep { width: 100%; height: 1px; align-self: auto; }
  .fp-item { width: 100%; max-width: 380px; }
  .cs-designs, .cs-figma { padding-top: 64px; }
  .dz-grid { gap: 12px; }
  .dz-card, .dz-grid.is-4 .dz-card { width: calc((100% - 12px) / 2); padding: 10px; }
  .dz-grid.is-2 .dz-card { width: 100%; }
  .dz-card.is-post { padding: 0; }
  .shot-wide { border-width: 5px; border-radius: 20px; }
  .shot-wide img { border-radius: 15px; }
  .dz-group + .dz-group { margin-top: 48px; }
  .dz-group { gap: 24px; }
  .fg-board { padding: 32px 12px 48px; }
  .cs-brand { padding-top: 56px; }
  .br2 { gap: 48px; margin-top: 32px; }
  .br2-h { font-size: 22px; }
  .br2-logos, .br2-type { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .br2-tile { height: 160px; }
  .br2-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .br2-color .sw { height: 84px; }
  .br2-color figcaption { padding: 12px; }
  .br2-color .nm { flex-direction: column; gap: 2px; font-size: 14px; }
  .br2-card { padding: 20px; }
  .br2-aa { font-size: 88px; }
  .br2-weights li { flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 0; }
  .br2-weights .smp { font-size: 20px; }
  .sf-box { padding-bottom: 72%; }
  .phones { gap: 2.5%; }
  .phones > .shot-phone { width: 31%; }
  .phones.is-posts > .ph-post { width: 45%; }
  .dz-box { padding-bottom: 160%; }
  .dz-box .phones > .shot-phone { width: 74%; }
  .phone-in > .ph .ph-name { font-size: 12px; }
  .phone-in > .ph .ph-note { display: none; }
  .ph-name { font-size: 14px; }
}
