/* ---------- Case study (napr. /work/toello-com/) ---------- */
/* Stavia na style.css: farby, písma, nav, footer, project-list. */

.nav__back {
  font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 1;
  color: var(--black2); /* nav je svetlá v oboch režimoch */
  padding: 8px 12px; border-radius: 16px;
  transition: color .2s;
}
.nav__back:hover {
  background: linear-gradient(90deg, var(--blue2), var(--red2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Hlavička: vľavo názov, vpravo štvorcový cover */
.case-head {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center;
  padding: calc(var(--gap) * 1.5) var(--gutter) var(--gap);
}
.case-head__text { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.case-head__text .h1, .case-head__text .h3 { text-align: left; }
.case-head__kicker { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.case-head__title { font-size: clamp(56px, 8.5vw, 150px); line-height: .9; overflow-wrap: anywhere; }
.case-head__cover { margin: 0; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--t-100); }
.case-head__cover img { width: 100%; height: 100%; object-fit: cover; }

/* Meta riadok (ako hlavička kreditov) */
.case-meta {
  display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 32px 48px; align-items: start;
  margin: 0 var(--gutter);
  padding: 32px 0 var(--gap);
  border-bottom: 1px solid var(--line);
}
.case-meta__label { font-size: 12px; line-height: 1.5; color: var(--list); margin-bottom: 8px; }
.case-meta__label--gap { margin-top: 20px; }
.case-meta__text { font-size: 20px; line-height: 1.35; letter-spacing: -.01em; max-width: 40ch; }
.case-meta__list { list-style: none; margin: 0; padding: 0; font-size: 20px; line-height: 1.35; letter-spacing: -.01em; }
.case-meta__cta { align-self: end; }
.case-visit { font-size: 20px; padding: 16px 32px; }
.btn.case-visit { display: inline-block; }

/* Médiá: 1 / 2 / 3 v rade, medzery ako v karuseli */
.case-media { display: flex; flex-direction: column; gap: 16px; padding: var(--gap) var(--gutter) 0; }
.m-row { display: grid; gap: 16px; }
.m-row--2 { grid-template-columns: 1fr 1fr; }
.m-row--3 { grid-template-columns: repeat(3, 1fr); }
.m {
  position: relative; margin: 0; overflow: hidden;
  border-radius: 8px;
  background: var(--t-100);
}
.m > img, .m > video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* „Scéna“ = farebná plocha, na ktorej stojí prehliadač alebo telefón */
.m--stage { display: grid; place-items: center; padding: 6%; aspect-ratio: 4 / 3; }
.m--full.m--stage { aspect-ratio: 16 / 10; padding: 5% 13%; }
.m--tall { aspect-ratio: 3 / 4; }
.m--stage { position: relative; }
.m--blue { background: var(--blue2); }
.m--red { background: var(--red2); }
.m--grey { background: #e9e9e9; }
:root[data-theme="dark"] .m--grey { background: #2a2a2a; }
.m--gradient { background: linear-gradient(90deg, var(--blue2), var(--red2)); }

/* Popisok v rohu média: invertuje sa voči podkladu */
.m__cap {
  position: absolute; left: 16px; bottom: 14px; z-index: 2;
  font-size: 12px; line-height: 1.2; letter-spacing: -.01em;
  color: #fff; mix-blend-mode: difference;
  pointer-events: none;
}
/* na farebnej scéne bez blendu, nech je popisok čistý */
.m--stage .m__cap { mix-blend-mode: normal; color: var(--list); }
.m--blue .m__cap, .m--red .m__cap, .m--gradient .m__cap { color: rgba(255,255,255,.85); }

/* Okno prehliadača */
.browser {
  width: 100%;
  border-radius: 10px; overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.06);
}
.m--full > .browser:not(.browser--inset) { border-radius: 8px; box-shadow: none; }
.browser__bar {
  height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 14px;
  background: #f1f1f1; border-bottom: 1px solid #e3e3e3;
  font-size: 12px; color: #808080;
}
.browser__bar i { width: 11px; height: 11px; border-radius: 50%; background: #d4d4d4; }
.browser__bar i:nth-child(1) { background: var(--red2); }
.browser__bar i:nth-child(2) { background: #f5c044; }
.browser__bar i:nth-child(3) { background: var(--blue2); }
.browser__bar span {
  margin: 0 auto; transform: translateX(-20px);
  padding: 4px 40px; border-radius: 6px; background: #fff;
}
.browser__screen { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.browser--small .browser__bar { height: 26px; gap: 5px; padding: 0 10px; font-size: 10px; }
.browser--small .browser__bar i { width: 8px; height: 8px; }
.browser--small .browser__bar span { padding: 2px 24px; }

/* Telefón: realistický mockup (rám, Dynamic Island, status bar, tlačidlá).
   Všetky rozmery v cqw = % šírky telefónu, takže sa škáluje ako obrázok. */
.phone {
  position: absolute; top: 7%; bottom: 7%; left: 50%; transform: translateX(-50%);
  aspect-ratio: 71.5 / 147.6;
  container-type: inline-size;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.22)) drop-shadow(0 6px 10px rgba(0,0,0,.18));
}
.m--stage:not(.m--tall) .phone { top: 6%; bottom: 6%; }
.phone__body {
  position: absolute; inset: 0;
  border-radius: 17.5cqw;
  padding: 1.1cqw;
  /* titánový rám */
  background: linear-gradient(140deg, #d9d9dc 0%, #8f8f94 18%, #4a4a4e 40%, #2c2c2f 60%, #6e6e73 82%, #c7c7cb 100%);
  box-shadow: inset 0 0 0 .35cqw rgba(255,255,255,.35), inset 0 0 0 .8cqw rgba(0,0,0,.35);
}
.phone__bezel {
  position: relative; width: 100%; height: 100%;
  border-radius: 16.4cqw;
  padding: 3.3cqw;
  background: #050505;
  box-shadow: inset 0 0 .6cqw rgba(255,255,255,.08);
}
.phone__display {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: 13.1cqw;
  background: var(--sb, #eee);
  display: flex; flex-direction: column;
}
.phone__status {
  flex: none; height: 13.2cqw; position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4cqw 8.5cqw 0 10.5cqw;
  font: 600 4.3cqw/1 -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color: #111; letter-spacing: -.01em;
}
.phone__status svg { height: 3.4cqw; width: auto; display: block; fill: currentColor; }
.phone__icons { display: flex; align-items: center; gap: 1.4cqw; }
.phone__island {
  position: absolute; left: 50%; top: 3.1cqw; transform: translateX(-50%);
  width: 30cqw; height: 8.8cqw; border-radius: 5cqw; background: #000; z-index: 3;
}
.phone .phone__screen {
  flex: 1; min-height: 0; width: 100%; height: auto;
  object-fit: cover; object-position: top; border-radius: 0; display: block; background: var(--sb, #eee);
}
.phone__home {
  position: absolute; left: 50%; bottom: 2.2cqw; transform: translateX(-50%);
  width: 36cqw; height: 1.35cqw; border-radius: 1cqw; background: rgba(0,0,0,.85); z-index: 3;
}
/* jemný odlesk skla */
.phone__display::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,0) 70%, rgba(255,255,255,.05) 100%);
}
/* bočné tlačidlá */
.phone__btn { position: absolute; width: 1.1cqw; border-radius: .6cqw; background: linear-gradient(90deg, #3a3a3d, #9a9a9f, #3a3a3d); }
.phone__btn--action { left: -.75cqw; top: 15.5%; height: 4.6%; }
.phone__btn--up { left: -.75cqw; top: 23.5%; height: 8%; }
.phone__btn--down { left: -.75cqw; top: 33.5%; height: 8%; }
.phone__btn--power { right: -.75cqw; top: 25%; height: 12.5%; }

/* Ďalší projekt */
.case-next { padding-top: calc(var(--gap) * 2); }
.case-next__link {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: var(--gap) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.case-next__title { transition: letter-spacing .4s cubic-bezier(.2,.8,.2,1); }
.case-next__link:hover .case-next__title {
  background: linear-gradient(90deg, var(--blue2), var(--red2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: .02em;
}
.case-spacer { height: var(--gap); }

/* Média sa jemne objavia pri scrolle */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 1199.98px) {
  .case-head { gap: 32px; }
  .case-meta { grid-template-columns: 1fr 1fr 1fr; }
  .case-meta__about { grid-column: 1 / -1; }
  .case-meta__cta { grid-column: 1 / -1; align-self: start; }
}
@media (max-width: 809.98px) {
  .case-head { grid-template-columns: 1fr; gap: 24px; padding-top: var(--gap); }
  .case-head__title { font-size: 56px; }
  .case-meta { grid-template-columns: 1fr 1fr; gap: 24px; }
  .case-meta__text, .case-meta__list { font-size: 16px; }
  .m-row--2, .m-row--3 { grid-template-columns: 1fr; }
  .m--full.m--stage { aspect-ratio: 4 / 3; padding: 6%; }
  .browser__bar { height: 22px; gap: 4px; padding: 0 8px; font-size: 9px; }
  .browser__bar i { width: 7px; height: 7px; }
  .browser__bar span { padding: 2px 16px; }
  .nav__back { font-size: 14px; }
}

.pl-case {
  margin-left: 8px; padding: 2px 6px; border-radius: 4px; vertical-align: 2px;
  font-size: 10px; letter-spacing: .04em; color: #fff;
  background: linear-gradient(90deg, var(--blue2), var(--red2));
}
.project-list .pl-row.is-current { color: var(--fg); }

/* Tlačidlá v meta riadku: VISIT SITE a pod ním INSTAGRAM */
.case-meta__cta { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.case-meta__cta .btn { text-align: center; }
.btn--ghost { background-color: transparent; color: var(--t-black2); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--ghost:hover { box-shadow: none; }

/* 4 vedľa seba (plagáty, LED vizuály) */
.m-row--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1199.98px) {
  .case-meta__cta { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 809.98px) {
  .m-row--4 { grid-template-columns: 1fr 1fr; }
  .case-meta__cta .btn { flex: 1 1 100%; }
}
