/* Кейси — окрема сторінка. Побудована як звичайний responsive-флоу
   (CSS Grid/Flexbox), а не як абсолютний Figma-canvas головної сторінки:
   для цього блоку немає готового Figma-макета, тому лейаут зроблений
   одразу адаптивним під бренд-стиль сайту (кольори/шрифти зі style.css). */

.cases-page{ background:#fff; color:#060608; -webkit-font-smoothing:antialiased; overflow-x:hidden; }
.cases-page *{ box-sizing:border-box; }
.cases-page img{ display:block; max-width:100%; }
.cases-page a{ color:inherit; text-decoration:none; }

.cases-wrap{ max-width:1280px; margin:0 auto; padding:0 24px; }

/* ---------- Header, nav drawer, final-CTA form and footer ----------
   Reused verbatim from the homepage's mobile build (assets/css/style.css,
   the @media(max-width:768px) block: .m-header/.m-nav-*/.m-btn/.m-cta*/
   .m-footer*) rather than reinvented, since the user asked for the same
   logo, menu, CTA button, form and footer as the homepage. That block is
   scoped to ≤768px there (it's the *mobile* layout for a page that also
   has a separate fixed-1440px desktop build) - this page has no such
   separate desktop build, so the same rules are repeated here unscoped,
   applying at every width instead of only on phones. Values are copied
   as-is; only the @media wrapper is dropped. */
.m-btn{
  position:relative; display:flex; align-items:center; justify-content:center; gap:10px;
  font-family:'Unbounded',sans-serif; font-weight:500; font-size:15px;
  background-repeat:no-repeat; background-size:100% 100%; background-position:center;
  border:none; cursor:pointer;
}
.m-btn--red{ background-image:url('/assets/figma/buttonFaceRed.svg'); color:#fff; box-shadow:0 10px 22px -8px rgba(240,11,15,.5); }
.m-btn--dark{ background-image:url('/assets/figma/buttonFaceRed2.svg'); color:#fff; box-shadow:0 10px 22px -8px rgba(240,11,15,.5); }

.m-header{
  position:sticky; top:0; z-index:100;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px; background:rgba(255,255,255,.97);
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  border-bottom:1px solid #eee;
}
.m-logo-link img{ height:22px; width:auto; }
.m-header .m-btn--red{ width:auto; height:44px; padding:0 20px; font-size:13px; }
.m-burger{
  width:42px; height:42px; border-radius:10px; border:1px solid #e6e5e2;
  display:flex; align-items:center; justify-content:center; background:#fff; flex:none;
}
.m-burger-bars{ width:18px; height:13px; position:relative; }
.m-burger-bars span{
  position:absolute; left:0; width:100%; height:2px; background:#060608; border-radius:2px;
  transition:transform .25s ease, opacity .2s ease, top .25s ease;
}
.m-burger-bars span:nth-child(1){ top:0; }
.m-burger-bars span:nth-child(2){ top:5.5px; }
.m-burger-bars span:nth-child(3){ top:11px; }
.m-burger.is-active .m-burger-bars span:nth-child(1){ top:5.5px; transform:rotate(45deg); }
.m-burger.is-active .m-burger-bars span:nth-child(2){ opacity:0; }
.m-burger.is-active .m-burger-bars span:nth-child(3){ top:5.5px; transform:rotate(-45deg); }

.m-nav-scrim{
  position:fixed; inset:0; background:rgba(6,6,8,.55); z-index:199;
  opacity:0; visibility:hidden; transition:opacity .3s ease, visibility .3s;
}
.m-nav-scrim.is-open{ opacity:1; visibility:visible; }
.m-nav-panel{
  position:fixed; top:0; right:0; bottom:0; width:82%; max-width:340px;
  background:#0c0c0d; color:#fff; z-index:200;
  transform:translateX(100%); transition:transform .35s cubic-bezier(.16,.84,.32,1);
  padding:22px 24px 32px; display:flex; flex-direction:column; overflow-y:auto;
}
.m-nav-panel.is-open{ transform:translateX(0); }
.m-nav-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:32px; }
.m-nav-close{
  width:38px; height:38px; border-radius:50%; border:1px solid rgba(255,255,255,.25);
  background:none; color:#fff; font-size:18px; line-height:1; flex:none; cursor:pointer;
}
.m-nav-links{ display:flex; flex-direction:column; }
.m-nav-links a{
  padding:15px 2px; font-family:'Manrope',sans-serif; font-size:17px; color:#fff;
  border-bottom:1px solid rgba(255,255,255,.1);
}
.m-nav-lang{ display:flex; gap:10px; margin:24px 0; }
.m-nav-lang a{
  font-family:'Manrope',sans-serif; font-size:13px; color:rgba(255,255,255,.65);
  padding:6px 12px; border:1px solid rgba(255,255,255,.2); border-radius:8px;
}
.m-nav-lang a[aria-current="true"]{ color:#fff; border-color:#f00b0f; background:rgba(240,11,15,.15); }
.m-nav-panel .m-btn{ margin-top:auto; width:100%; height:52px; }

/* ---------- Desktop header + form/footer canvases (≥769px) ----------
   These two blocks (.cf-header-canvas, .cf-footer-canvas) are LITERAL
   copies of the homepage's own desktop header markup and its "Ексклюзивно"
   contact section + footer markup - same elements, same left/top/width/
   height figures - rather than a flexbox reconstruction. Since that markup
   is absolutely-positioned against a fixed pixel canvas (the same
   technique the whole homepage desktop build uses), each one is wrapped in
   its own small self-scaling canvas via cases/index.html's fit() script,
   which keeps it pixel-identical to the homepage at any viewport width.
   Hidden below 769px in favour of the burger header / .cases-mobile-only
   form+footer. */
.cf-scale-wrap{ position:relative; z-index:5; width:100%; overflow:hidden; margin:0 auto; display:none; }
.cf-canvas{ position:relative; }
.cf-canvas .abs{ position:absolute; pointer-events:none; }
.cf-canvas a, .cf-canvas button, .cf-canvas input,
.cf-canvas select, .cf-canvas textarea{ pointer-events:auto !important; }
.cf-header-canvas{ width:1440px; height:82px; background:#fff; }
/* The header canvas is short (82px) - unlike the footer canvas, allow
   overflow so the language-switcher dropdown isn't clipped when it opens
   below the button. */
.cf-header-wrap{ overflow:visible; }
.cf-footer-canvas{ width:1440px; height:550px; background:#d9d9d9; overflow:hidden; }
.cf-footer-canvas input::placeholder,
.cf-footer-canvas textarea::placeholder{ color:#fff; opacity:1; }

@media (min-width:769px){
  .cases-header-mobile{ display:none; }
  .cases-mobile-only{ display:none; }
  .cf-scale-wrap{ display:block; }
}

.m-section{ padding:56px 20px; }
.m-h2{ font-family:'Unbounded',sans-serif; font-weight:600; font-size:26px; line-height:1.25; color:#060608; margin-bottom:24px; }

/* ---------- Final CTA (Ексклюзивно) ---------- */
.m-cta{ background:#0c0c0d; color:#fff; }
.m-cta .eyebrow{ font-family:'Unbounded',sans-serif; font-weight:600; font-size:13px; color:#f00b0f; margin-bottom:10px; display:block; }
.m-cta .m-h2{ color:#fff; }
.m-cta-checklist{ list-style:none; margin:22px 0 28px; padding:0; display:flex; flex-direction:column; gap:12px; }
.m-cta-checklist li{ display:flex; align-items:center; gap:10px; font-family:'Manrope',sans-serif; font-size:14px; color:#fff; }
.m-cta-checklist img{ width:17px; height:17px; flex:none; }
.m-cta-form{ display:flex; flex-direction:column; gap:12px; max-width:520px; }
.m-cta-form input, .m-cta-form select, .m-cta-form textarea{
  width:100%; background:rgba(255,255,255,.04); border:1px solid #3a3a3d; border-radius:10px;
  padding:14px; font-family:'Manrope',sans-serif; font-size:14px; color:#fff;
}
.m-cta-form textarea{ min-height:88px; resize:vertical; }
.m-cta-form select{ -webkit-appearance:none; appearance:none; }
.m-cta-form ::placeholder{ color:rgba(255,255,255,.5); }
.m-cta-form .m-btn{ width:100%; height:56px; }

/* Footer contact lines (email/phone/city/region), each icon-prefixed
   the same way as the homepage's desktop footer. */
.m-footer-contact-line{
  display:flex; align-items:center; gap:8px;
  font-family:'Manrope',sans-serif; font-size:13px; color:#bfc2c9; padding:5px 0;
}
.m-footer-contact-line img{ width:15.7px; height:15.7px; flex:none; }

/* ---------- Footer ---------- */
.m-footer{ background:#0c0c0d; color:#fff; padding:40px 20px 28px; }
.m-footer-brand{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.m-footer-brand img.mark{ width:26px; height:26px; }
.m-footer-brand img.word{ height:17px; width:auto; }
.m-footer p.desc{ font-family:'Manrope',sans-serif; font-size:13.5px; color:#bfc2c9; line-height:1.5; margin-bottom:24px; }
.m-footer-cols{ display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:28px; max-width:520px; }
.m-footer-cols h5{ font-family:'Manrope',sans-serif; font-weight:600; font-size:13px; margin-bottom:12px; }
.m-footer-cols a, .m-footer-cols li{ display:block; font-family:'Manrope',sans-serif; font-size:13px; color:#bfc2c9; padding:5px 0; }
.m-footer-social{ display:flex; gap:12px; margin-bottom:24px; }
.m-footer-social img{ height:34px; width:auto; }
.m-footer-bottom{
  display:flex; flex-wrap:wrap; gap:8px 20px; padding-top:20px; border-top:1px solid rgba(255,255,255,.1);
  font-family:'Manrope',sans-serif; font-size:12px; color:#8b8d94;
}
@media (min-width:640px){
  .m-footer-cols{ grid-template-columns:repeat(4, auto); gap:40px; }
  .m-footer-bottom{ justify-content:space-between; }
}
/* ---------- Hero ---------- */
.cases-hero{ padding:64px 0 40px; }
.cases-hero__grid{ display:flex; align-items:center; justify-content:space-between; gap:48px; }
.cases-hero__copy{ flex:1 1 auto; min-width:0; }
.cases-hero__eyebrow{ display:inline-block; width:26px; height:3px; background:#f00b0f; border-radius:2px; margin-bottom:16px; }
.cases-hero h1{ font-family:'Unbounded',sans-serif; font-weight:600; font-size:44px; line-height:1.15; margin:0 0 16px; }
.cases-hero h1 span{ color:#f00b0f; }
.cases-hero p{ font-family:'Manrope',sans-serif; font-size:17px; line-height:1.6; color:#61636b; max-width:680px; margin:0; }
.cases-hero__note{
  margin-top:20px; display:inline-flex; align-items:flex-start; gap:8px;
  font-family:'Manrope',sans-serif; font-size:12.5px; line-height:1.5; color:#8a8d94;
  max-width:680px;
}
.cases-hero__stat{
  flex:none; display:flex; flex-direction:column; align-items:flex-start; gap:6px;
  padding:26px 30px; border-radius:20px; min-width:190px;
  background:#fbfbfa; border:1px solid #eeece8; box-shadow:0 14px 34px -18px rgba(0,0,0,.18);
}
.cases-hero__stat-num{ font-family:'Unbounded',sans-serif; font-weight:600; font-size:52px; line-height:1; color:#f00b0f; }
.cases-hero__stat-label{ font-family:'Manrope',sans-serif; font-size:13.5px; line-height:1.35; color:#61636b; max-width:120px; }
@media (max-width:640px){
  .cases-hero{ padding:40px 0 28px; }
  .cases-hero h1{ font-size:30px; }
  .cases-hero p{ font-size:15px; }
  .cases-hero__grid{ flex-direction:column; align-items:flex-start; gap:24px; }
  .cases-hero__stat{ flex-direction:row; align-items:center; gap:14px; padding:18px 22px; }
  .cases-hero__stat-num{ font-size:36px; }
}

/* ---------- Grid ---------- */
.cases-grid-section{ padding:0 0 96px; }
.cases-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:20px;
}
@media (max-width:1024px){ .cases-grid{ grid-template-columns:repeat(2, 1fr); } }
@media (max-width:640px){ .cases-grid{ grid-template-columns:1fr; gap:16px; } }

.case-tile{
  position:relative; display:block; width:100%; aspect-ratio:4/3;
  border-radius:18px; overflow:hidden; border:none; padding:0; cursor:pointer;
  background:#0d0d0f; text-align:left; font:inherit;
  transition:transform .25s ease, box-shadow .25s ease;
}
.case-tile:hover{ transform:translateY(-4px); box-shadow:0 20px 40px -18px rgba(0,0,0,.35); }
.case-tile:focus-visible{ outline:2px solid #f00b0f; outline-offset:3px; }
.case-tile__bg{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  transition:transform .5s ease;
}
.case-tile:hover .case-tile__bg{ transform:scale(1.05); }
.case-tile__scrim{
  position:absolute; inset:0;
  /* Darkening kept tight to the bottom text zone only (was a heavy
     fade covering most of the card) so the actual photo reads clearly
     above it instead of looking near-black overall. */
  background:
    linear-gradient(0deg, rgba(6,6,8,.82) 0%, rgba(6,6,8,.4) 32%, rgba(6,6,8,.06) 55%, rgba(6,6,8,0) 72%);
}
.case-tile__num{
  position:absolute; left:16px; top:16px; z-index:2;
  width:30px; height:30px; border-radius:50%; border:1.5px solid rgba(255,255,255,.55);
  display:flex; align-items:center; justify-content:center;
  font-family:'Unbounded',sans-serif; font-weight:600; font-size:12px; color:#fff;
  background:rgba(0,0,0,.25); backdrop-filter:blur(4px);
}
.case-tile__body{ position:absolute; left:20px; right:20px; bottom:18px; z-index:2; display:flex; flex-direction:column; gap:6px; }
.case-tile__niche{ font-family:'Unbounded',sans-serif; font-weight:600; font-size:17px; line-height:1.25; color:#fff; }
.case-tile__meta{ font-family:'Manrope',sans-serif; font-size:12.5px; color:rgba(255,255,255,.72); }
.case-tile__cta{
  margin-top:6px; display:inline-flex; align-items:center; gap:6px;
  font-family:'Manrope',sans-serif; font-weight:600; font-size:12.5px; color:#ff5a5d;
  opacity:0; transform:translateY(4px); transition:opacity .2s ease, transform .2s ease;
}
.case-tile:hover .case-tile__cta, .case-tile:focus-visible .case-tile__cta{ opacity:1; transform:translateY(0); }
.case-tile__cta svg{ flex:none; }

/* ---------- Modal ---------- */
body.case-modal-open{ overflow:hidden; }
.case-modal{
  position:fixed; inset:0; z-index:1000;
  display:flex; align-items:center; justify-content:center;
  background:rgba(6,6,8,.72); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px);
  padding:24px;
  opacity:0; pointer-events:none;
  transition:opacity .2s ease;
}
.case-modal.is-open{ opacity:1; pointer-events:auto; }
.case-modal__panel{
  position:relative; width:100%; max-width:920px; max-height:88vh; overflow-y:auto;
  background:#fff; border-radius:20px; box-shadow:0 40px 80px -20px rgba(0,0,0,.5);
  transform:translateY(16px); transition:transform .25s ease;
}
.case-modal.is-open .case-modal__panel{ transform:translateY(0); }
.case-modal__close{
  position:absolute; right:16px; top:16px; z-index:5;
  width:38px; height:38px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(0,0,0,.35); color:#fff; display:flex; align-items:center; justify-content:center;
  backdrop-filter:blur(4px);
}
.case-modal__close:hover{ background:rgba(0,0,0,.55); }

.case-modal__hero{ position:relative; padding:32px 32px 24px; overflow:hidden; min-height:200px; display:flex; flex-direction:column; justify-content:flex-end; }
.case-modal__hero img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.case-modal__hero-scrim{
  position:absolute; inset:0;
  background:linear-gradient(0deg, rgba(6,6,8,.94) 0%, rgba(6,6,8,.72) 55%, rgba(6,6,8,.35) 100%);
}
.case-modal__num{
  position:relative; z-index:1; width:34px; height:34px; border-radius:50%; border:1.5px solid rgba(255,255,255,.6);
  display:flex; align-items:center; justify-content:center; margin-bottom:12px;
  font-family:'Unbounded',sans-serif; font-weight:600; font-size:13px; color:#fff;
}
.case-modal__hero h2{ position:relative; z-index:1; font-family:'Unbounded',sans-serif; font-weight:600; font-size:26px; line-height:1.25; color:#fff; margin:0 0 14px; max-width:560px; }
.case-modal__pills{ position:relative; z-index:1; display:flex; flex-wrap:wrap; gap:8px; max-width:100%; }
/* `white-space:nowrap` forced every pill onto one line regardless of how
   long its text was - fine for the short "niche · geo · duration" pill,
   but the tagline pill (e.g. "Страви, кебаби, бургери, американське
   барбекю") could easily exceed the modal's own width on a narrow phone
   screen and run off it. Pills now wrap their own text instead. */
.case-modal__pills .pill{
  display:inline-flex; padding:7px 14px; border-radius:999px;
  background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.25);
  font-family:'Manrope',sans-serif; font-size:12.5px; color:#fff; max-width:100%;
}

.case-modal__body{ padding:28px 32px 36px; display:grid; grid-template-columns:220px 1fr; gap:32px; }
@media (max-width:720px){ .case-modal__body{ grid-template-columns:1fr; gap:24px; } }

/* The 32px side padding on `__hero`/`__body` (sized for the 920px desktop
   panel) ate a disproportionate chunk of a narrow phone's width, pushing
   the segment cards and side info in far enough to visibly waste space -
   halved here, plus a smaller outer overlay margin, to give content back
   its width on a ~360-400px screen. */
@media (max-width:640px){
  .case-modal{ padding:12px; }
  .case-modal__hero{ padding:24px 20px 20px; }
  .case-modal__body{ padding:20px 20px 28px; }
}

.case-modal__side{ display:flex; flex-direction:column; gap:20px; }
.case-modal__block h3{
  display:flex; align-items:center; gap:8px;
  font-family:'Manrope',sans-serif; font-weight:700; font-size:13px; color:#060608; margin:0 0 8px;
}
.case-modal__block p{ font-family:'Manrope',sans-serif; font-size:13px; line-height:1.55; color:#61636b; margin:0; }
.case-modal__note{ display:inline-block; margin-top:6px; font-size:11.5px; color:#a0a3aa; }

.case-modal__main h3{ font-family:'Unbounded',sans-serif; font-weight:600; font-size:17px; margin:0 0 12px; }
.case-modal__result{ font-family:'Manrope',sans-serif; font-size:14.5px; line-height:1.6; color:#31343b; margin:0 0 20px; }

.case-modal__segments{ display:grid; grid-template-columns:repeat(2, 1fr); gap:12px; margin-bottom:22px; }
@media (max-width:520px){ .case-modal__segments{ grid-template-columns:1fr; } }
.case-segment{
  background:#f7f7f6; border-radius:14px; padding:16px 18px;
}
.case-segment h4{ font-family:'Manrope',sans-serif; font-weight:700; font-size:13.5px; margin:0 0 8px; color:#060608; }
.case-segment p{ font-family:'Manrope',sans-serif; font-size:12.5px; line-height:1.65; color:#54575e; margin:0; }
.case-segment p b{ color:#060608; }

.case-modal__footer-pills{ display:flex; flex-wrap:wrap; gap:10px; }
.fpill{
  flex:1 1 140px; border:1px solid #e6e5e2; border-radius:12px; padding:10px 14px;
  font-family:'Manrope',sans-serif;
}
.fpill b{ display:block; font-size:11px; font-weight:600; color:#8a8d94; margin-bottom:2px; }
.fpill span{ display:block; font-size:13.5px; font-weight:700; color:#060608; }
