/* ==========================================================================
   Entrance Makleri — case study
   ========================================================================== */

body.cs-page { background: #fff; color: #1c1b1f; }
.cs-page main { overflow-x: clip; }

/* --- shared case-study blocks ------------------------------------------ */
.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;
}
.cs-link-btn {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  height: 40px; padding: 0 20px; border: 1px solid #1c1b1f; border-radius: 4px;
  font-size: 16px; font-weight: 500; color: #1c1b1f; background: #fff;
  transition: background-color .2s, color .2s, transform .2s var(--ease-out);
}
.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; color: #1c1b1f; }
.cs-meta dt { font-weight: 500; }
.cs-meta dd { margin: 3px 0 0; }

/* hero card (scope / duration / team) */
.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;
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
.hc-item:hover { box-shadow: 0 8px 20px rgba(0,0,0,.06); }
.hc-label { display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.2; font-size: 14px; font-weight: 500; color: rgba(0,0,0,.6); }
.hc-label svg { width: 24px; height: 25px; }
.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 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; }
.cs-page .tool img.round { border-radius: 36px; }

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

/* solution flow */
.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 { /* vertical divider */
  content: ""; position: absolute; left: 50%; top: -16px; bottom: -80px; 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; height: 370px; 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-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; transition: transform .6s var(--ease-out); }
.sf-item:hover .sf-media img { }
.sf-h { font-size: 24px; font-weight: 700; line-height: 1.4; color: #1c1b1f; }
.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: center; justify-content: center; gap: 56px; width: 100%; min-height: 500px; }
.fp-sep { width: 1px; align-self: stretch; background: #e5e5e5; }
.fp-item { width: 329px; display: flex; flex-direction: column; gap: 16px; }
.fp-media {
  position: relative; height: 262px; border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden;
  box-shadow: 0 0 11.25px rgba(0,0,0,.07); background: #fff;
}
.fp-media > img { position: absolute; top: 12px; left: 50%; width: 297px; height: 238px; transform: translateX(-50%); object-fit: cover; transition: transform .5s var(--ease-out); }
.fp-item:hover .fp-media > img { }
.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; }


/* branding shared */
.br-wrap { width: 1200px; max-width: 100%; display: flex; flex-direction: column; gap: 35px; }
.br-block { position: relative; display: flex; flex-direction: column; gap: 24px; }
.br-h { display: flex; gap: 8px; align-items: baseline; font-size: 24px; font-weight: 700; color: rgba(0,0,0,.85); line-height: 1.4; }
.br-h .hash { font-weight: 400; color: #cb663a; }
.br-copy { display: grid; gap: 0; font-size: 14px; line-height: 36px; color: rgba(0,0,0,.85); margin-top: -20px; }
.br-note { font-size: 14px; color: rgba(0,0,0,.85); margin-top: 12px; }

/* Figma sneak peek */
.cs-figma { padding-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 56px; }
.fg-board { width: 100%; background: #1e1e1e; padding: 85px 20px 275px; display: flex; flex-direction: column; align-items: center; }
.fg-img { width: 1212px; max-width: 100%; height: auto; }
.fg-rule { width: 971px; max-width: 90%; height: 1px; border: 0; background: #e2e8f0; margin: 109px 0 107px; }


/* ==========================================================================
   Hero
   ========================================================================== */
.en-hero { position: relative; height: 775px; overflow: hidden; background: #121213; color: #fff; }
.en-hero-inner { position: relative; max-width: 1440px; height: 100%; margin: 0 auto; }
.en-stripe { position: absolute; background: #fff; border-radius: 106px; transform: rotate(-50deg); pointer-events: none; }
.en-stripe.s1 { left: -73px; width: 1822px; top: 347px; height: 145px; }
.en-stripe.s2 { left: 164px; width: 1822px; top: 361.6px; height: 58px; }
.en-hero-text { position: absolute; left: 119.5px; top: 163px; width: 520px; display: flex; flex-direction: column; gap: 24px; z-index: 1; }
.en-titles { display: flex; flex-direction: column; gap: 16px; }
.en-hero h1 { font-size: 48px; font-weight: 700; line-height: 1.2; color: #fff; }
.en-kicker { display: flex; gap: 16px; font-size: 20px; font-weight: 700; text-transform: uppercase; line-height: 1.2; }
.en-lead { font-size: 16px; line-height: 1.2; max-width: 510px; }
.en-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: flex-start;
  width: 140px; height: 40px; border: 1px solid #1c1b1f; border-radius: 6px; background: #fff; color: #1c1b1f;
  font-size: 16px; font-weight: 500; transition: transform .2s var(--ease-out), box-shadow .2s;
}
.en-btn:hover { box-shadow: 0 8px 24px rgba(255,255,255,.18); }
.en-btn .ext { width: 20px; height: 20px; }
.en-hero .cs-meta { color: #fff; margin-top: 8px; }
.en-hero .cs-meta dt { color: #e5e5e5; }

.en-dev-fit { position: absolute; left: 753.5px; top: 105.8px; width: 804px; height: 553px; }
.en-devices { position: relative; width: 804px; height: 553px; }
.en-devices img { position: absolute; max-width: none; object-fit: cover; }
.dv-imac { position: absolute; left: 239px; top: 0; width: 516px; height: 432px; }
.dv-imac-bg { position: absolute; left: 210px; top: 245px; width: 289px; height: 66px; background: #fff; }
.dv-imac-screen { left: 18.5px; top: 27.9px; width: 479px; height: 238px; }
.dv-imac-frame { left: 0; top: 2px; width: 516px; height: 432px; }
.dv-mac { position: absolute; left: 0; top: 137px; width: 570px; height: 339px; }
.dv-mac-bg { position: absolute; left: 63.5px; top: 32px; width: 443px; height: 275px; background: #0a0a0a; }
.dv-mac-strip { position: absolute; left: 65px; top: 216px; width: 432px; height: 107px; overflow: hidden; }
.dv-mac-strip img { left: 0; top: 0; width: 433px; height: 214px; }
.dv-mac-screen { left: 63.3px; top: 39px; width: 432px; height: 215px; }
.dv-mac-frame { left: 0; top: 0; width: 570px; height: 339px; }
.dv-ipad { position: absolute; left: 578px; top: 257px; width: 226px; height: 296px; }
.dv-ipad-b { left: 8px; top: 143px; width: 209px; height: 149px; }
.dv-ipad-t { left: 8px; top: 8px; width: 209px; height: 225px; }
.dv-ipad-frame { left: 0; top: 0; width: 226px; height: 296px; }
.en .hero-card-wrap { margin-top: -110px; }

/* tech stack: Heurio logo (clipped wordmark) */
.tool-icon.heurio { position: relative; display: block; width: 50px; height: 52px; overflow: hidden; background: #fff; flex: none; border-radius: 0; }
.tool-icon.heurio svg { position: absolute; left: 1px; top: 0; width: 208px; height: 52px; max-width: none; }

/* final products – device composite */
.fp-devices { width: 100%; }
.fp-devices img { position: absolute; max-width: none; object-fit: cover; }
.fpd-ipad { position: absolute; left: 59px; top: 10.3px; width: 176px; height: 231px; }
.fpd-ipad .b { left: 10px; top: 111px; width: 163px; height: 116px; }
.fpd-ipad .t { left: 10px; top: 8px; width: 163px; height: 176px; }
.fpd-ipad .f { left: 4px; top: 2.5px; width: 172px; height: 226px; }
.fpd-phone { position: absolute; left: 201px; top: 95px; width: 87px; height: 158px; overflow: hidden; }
.fpd-phone .s { left: 7.1px; top: 2.5px; width: 71px; height: 153px; border-radius: 5px; }
.fpd-phone .f { left: 4.5px; top: 0; width: 78px; height: 158px; }
.fp-item:hover .fpd-ipad, .fp-item:hover .fpd-phone { }
.fpd-ipad, .fpd-phone { transition: transform .5s var(--ease-out); }

/* ==========================================================================
   Branding
   ========================================================================== */
.cs-brand { padding-top: 103px; gap: 56px; }
.en .cs-stack { margin-top: 14px; }
.br-sub18 { font-size: 18px; font-weight: 500; color: rgba(0,0,0,.85); line-height: 1.4; }
.br-h .hash { color: #0d0d0d; }
.br-block > .br-h + .br-p { margin-top: -11px; }
.br-p { font-size: 14px; color: rgba(0,0,0,.85); line-height: 1.4; }
.br-block > .br-sub18 { margin-top: 12px; }
.br-rule { border: 0; height: 1px; background: #e5e5e5; margin: 20px 0 24px; width: 100%; }

/* palettes */
.pals { position: relative; width: 1110px; max-width: 100%; margin: 14px auto 0; display: flex; flex-direction: column; gap: 35px; }
.pal { position: relative; height: 145px; }
.pal-name { position: absolute; left: 4px; top: 0; font-size: 20px; font-weight: 500; color: #111928; line-height: 1.4; }
.pal-token { position: absolute; left: 4px; top: 28px; font-size: 18px; color: #6b7280; line-height: 1.4; }
.pal-bar { position: absolute; left: 0; right: 0; top: 70px; height: 75px; display: flex; border-radius: 15px; overflow: hidden; }
.pal-bar li {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-family: "Inter", var(--font-sans); font-weight: 600; font-size: 16px; color: #1f2a37;
  transition: transform .25s var(--ease-out);
}
.pal-bar li.lt { color: #fff; }
.pal-bar li:hover { }
.pal-line { position: absolute; top: 38px; width: 2px; height: 474px; background: #1c1b1f; z-index: 1; pointer-events: none; }
.pal-line::before, .pal-line::after { content: ""; position: absolute; left: -2px; width: 6px; height: 6px; border-radius: 50%; background: #1c1b1f; }
.pal-line::before { top: -3px; } .pal-line::after { bottom: -3px; }
.pal-line.l1 { left: 435px; } .pal-line.l2 { left: 545px; }

/* font principles */
.br-copy { margin-top: -19px; }
.fp-sub { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.indent { padding: 0 28px; font-size: 14px; line-height: 22px; color: rgba(0,0,0,.85); max-width: 1156px; }
.fs-img { width: 600px; max-width: 100%; height: auto; margin: -12px 0 8px; }
.fs-scroll { overflow-x: auto; max-width: 100%; }
.fs-box { margin: 0; display: inline-block; padding: 24px 32px; border: 1px solid #e5e5e5; border-radius: 12px; }
.fs-grid { position: relative; width: 843px; height: 122px; font-size: 14px; color: #000; }
.fs-lab { position: absolute; left: 0; top: 0; padding: 10px; border: 1px solid #000; background: #fff; line-height: 1.4; }
.fs-lab.sm { top: auto; bottom: 0; font-size: 12px; padding: 12px 8px; }
.fs-line { position: absolute; left: 0; top: 61px; width: 781px; height: 1px; background: #000; }
.fs-nums { position: absolute; left: 125px; top: 14px; display: grid; grid-auto-flow: column; grid-template-rows: auto auto; column-gap: 47px; row-gap: 54px; font-family: "Figtree", var(--font-sans); line-height: 20px; }

/* type system */
.ts-card { width: 100%; padding: 32px 0; background: #fff; border: .7px solid #e5e5e5; border-radius: 12px; box-shadow: 0 0 14.25px rgba(0,0,0,.07); margin-top: 4px; }
.ts-scroll { overflow-x: auto; }
.ts { width: 1135px; margin: 0 auto; color: #191919; }
.ts-title { font-size: 23.94px; color: #1c2b36; line-height: 1.3; padding-bottom: 6px; border-bottom: 1.5px solid #1c2b36; }
.ts-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 32px; }
.ts-tbl + .ts-tbl { margin-top: 56px; }
.ts-tbl col, .ts-tbl th, .ts-tbl td { text-align: left; font-weight: 400; }
.ts-tbl thead th { font-size: 10.47px; padding: 0 0 8px; border-bottom: 1px solid #1c2b36; color: #191919; }
.ts-tbl thead th:first-child { text-transform: uppercase; color: #1c2b36; width: 274px; }
.ts-tbl thead th:nth-child(2) { width: 136px; }
.ts-tbl thead th:nth-child(3) { width: 132px; }
.ts-tbl thead th:nth-child(4) { width: 140px; }
.ts-tbl thead th:nth-child(5) { width: 136px; }
.ts-tbl tbody th { color: #1c2b36; line-height: 1.3; padding: 11px 0; }
.ts-tbl tbody td { font-size: 9.73px; padding: 11px 0; }
.ts-tbl td.lh { padding-left: 2px; }
.ts-tbl tbody tr { border-bottom: 1px solid #d5dde3; transition: background-color .2s; }
.ts-tbl tbody tr:hover { background: #f7f9fa; }

/* figma */
.cs-figma { padding-top: 140px; }
.en-fg { padding: 64px 20px 189px; }
.en-fg .g2 { width: 888px; margin-top: 100px; }
.en-fg .g3 { width: 702px; margin-top: 99px; }
.en-fg .g4 { width: 702px; margin-top: 41px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@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-media { height: auto; aspect-ratio: 584 / 370; }
  .sf-row dt { width: 70px; }
}
@media (max-width: 1199px) {
  .cs-sec, .cs-challenge { padding-left: 40px; padding-right: 40px; }
  .en-hero { height: auto; padding-bottom: 150px; }
  .en-hero-inner { display: flex; flex-direction: column; }
  .en-hero-text { position: relative; left: auto; top: auto; width: auto; max-width: 600px; padding: 110px 40px 0; }
  .en-dev-fit { position: relative; left: auto; top: auto; width: auto; height: auto; margin: 40px 40px 0; display: flex; justify-content: center; }
  .en .hero-card-wrap { margin-top: -110px; }
  .hero-card { gap: 24px; padding: 24px; }
  .en-stripe.s1 { left: -700px; width: 3000px; top: 620px; }
  .en-stripe.s2 { left: -330px; width: 3000px; top: 640px; }
  .br-wrap { width: 100%; }
  .pals { width: 100%; }
  .pal-line { display: none; }
  .fp-row { gap: 40px; }
  .ts-card { padding: 28px 24px; }
}
@media (max-width: 1023px) {
  .sf-grid { column-gap: 40px; }
  .sf-row { padding: 12px 0; gap: 14px; }
  .sf-row dd { padding-left: 14px; }
}
@media (max-width: 809px) {
  .cs-sec, .cs-challenge { padding: 56px 20px; }
  .cs-title { font-size: 20px; letter-spacing: 3px; }
  .en-hero { padding-bottom: 90px; }
  .en-hero-text { padding: 76px 20px 0; }
  .en-hero h1 { font-size: 36px; }
  .en-kicker { font-size: 17px; flex-wrap: wrap; gap: 4px 12px; }
  .en-dev-fit { margin: 32px 20px 0; }
  .en-stripe.s1 { left: -1300px; width: 3000px; top: 800px; height: 110px; }
  .en-stripe.s2 { left: -1080px; width: 3000px; top: 830px; height: 44px; }
  .en .hero-card-wrap { margin-top: -60px; }
  .hero-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .hc-item { width: auto; padding: 16px 12px; }
  .cs-stack { margin-top: 0; gap: 32px; padding-bottom: 40px; }
  .cs-stack .tools { gap: 10px; }
  .cs-page .tool { padding: 10px 14px; flex: 1 1 100%; }
  .cs-page .tool h3 { font-size: 18px; line-height: 24px; }
  .cs-page .tool p { font-size: 14px; line-height: 20px; }
  .cs-page .tool img { width: 40px; height: 40px; }
  .tool-icon.heurio { width: 40px; height: 42px; }
  .tool-icon.heurio svg { width: 166px; height: 42px; }
  .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-row { min-height: 0; padding: 12px 0; gap: 14px; }
  .sf-row dt { width: 64px; font-size: 15px; }
  .sf-row dd { font-size: 15px; padding-left: 14px; min-height: 0; padding-top: 4px; padding-bottom: 4px; }
  .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: 329px; max-width: 100%; }
  .cs-brand, .cs-figma { padding-top: 64px; }
  .br-h { font-size: 22px; }
  .pals { gap: 24px; }
  .pal { height: auto; }
  .pal-name, .pal-token { position: static; }
  .pal-name { font-size: 18px; }
  .pal-token { font-size: 15px; margin-bottom: 10px; }
  .pal-bar { position: static; display: grid; grid-template-columns: repeat(5, 1fr); height: auto; border-radius: 12px; }
  .pal-bar li { height: 52px; font-size: 13px; }
  .indent { padding: 0 0 0 16px; }
  .br-copy { line-height: 1.5; gap: 10px; margin-top: 0; }
  .br-block > .br-h + .br-p { margin-top: 0; }
  .fs-scroll { overflow-x: auto; overflow-y: hidden; }
  .fs-box { padding: 16px 20px; }
  .ts-card { padding: 20px 16px; }
  .fg-board, .en-fg { padding: 32px 12px 48px; }
  .en-fg .g2, .en-fg .g3, .en-fg .g4 { margin-top: 24px; }
}

/* Phones: wide type tables scroll sideways — say so, and keep the text readable */
@media (max-width: 809px) {
  .ts { width: 760px; }
  .ts-tbl thead th, .ts-tbl tbody td { font-size: 12px; }
  .ts-card::after, .fs-scroll::after { content: "Swipe to explore →"; display: block; margin-top: 12px; font-size: 12px; color: #737373; text-align: right; position: sticky; left: 0; }
}
